I’m the shepherd for the upstream compiler issue get_extern_state potential NULL dereference · Issue #12037 · ocaml/ocaml · GitHub , which is about a potential code improvement noticed by gcc -fanalyzer
. The issue has somewhat-detailed explanations of what could be done to solve it nicely.
If you have been looking for an opportunity to contribute to the upstream OCaml compiler, this may be one. This is in the runtime code, implemented in C, and extern.c
is the marshaller (what runs when you use output_value
or Marhsal.to_string
).
Assuming you are already familiar with C and typical git+github workflows, but have never contributed to the OCaml compiler codebase, here would be a time estimate:
- 1h to get familiar with the github/ocaml repository (clone it, configure it, build it, etc.; I am assuming that you are not trying to program from a Windows machine, which may be harder), which includes skimming ocaml/CONTRIBUTING.md at trunk · ocaml/ocaml · GitHub and ocaml/HACKING.adoc at trunk · ocaml/ocaml · GitHub
- 1h-2h to write an initial patch that you are happy with and send a PR
- 1h-3h of addressing CI issues and review comments
Edit: ah, if you start working on this, please post a message on the issue to avoid other people duplicating work.