Skip to content

cli: rebuild loader_lib.c when the layout of jl_options changes - #63064

Merged
Keno merged 1 commit into
JuliaLang:masterfrom
levy:pr-cli-loader-options-dep
Sep 8, 2026
Merged

cli: rebuild loader_lib.c when the layout of jl_options changes#63064
Keno merged 1 commit into
JuliaLang:masterfrom
levy:pr-cli-loader-options-dep

Conversation

@levy

@levy levy commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

cli/loader_lib.c defines jl_options for the public library, but its rule did not depend on src/jloptions.h. After a field is added to jl_options_t, an incremental build leaves the library with the old size while libjulia-internal reads the new layout: a read past the end of the object. Found while adding an option in #63069. The header goes into the rule's dependencies.

Disclosure: developed with Claude Code (Opus 5) under my direction. It wrote the code and this text; the measurements were run on my machine. I reviewed the changes. The commits carry an Assisted-by trailer.

@vchuravy

vchuravy commented Sep 8, 2026

Copy link
Copy Markdown
Member

Hi @levy, thank you for your PR and contribution. Please read https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#contributor-checklist in particular

If your pull request contains substantive contributions from a generative AI tool, please disclose so with details, and review all changes before opening. Open the pull request yourself once you have reviewed it, rather than having a tool open it on your behalf.

Some of your other PRs feel like they should have a generative AI disclosure.

We also have some rules for AI attribution in https://github.com/JuliaLang/julia/blob/master/AGENTS.md#for-all-changes

@levy

levy commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Ah, I'm sorry, I was not aware of that. I took care of reviewing to my best knowledge.

`loader_lib.c` defines `jl_options` for the public library, and its rule did
not depend on `jloptions.h`. A field added to `jl_options_t` therefore left the
library reserving the old size while the runtime read the new one, which is a
read past the end of the object and a value out of nowhere.

Assisted-by: Claude Code (Opus 5)
@levy
levy force-pushed the pr-cli-loader-options-dep branch from 5f32073 to 8b5e61d Compare September 8, 2026 08:48
@Keno
Keno merged commit d5f77ed into JuliaLang:master Sep 8, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants