Skip to content

Commit

Permalink
Fix asan for jl_precompile_toplevel_module (JuliaLang#43885)
Browse files Browse the repository at this point in the history
PR JuliaLang#43793 passed the buildkite test but the logs for JuliaLang#43881 show an
address sanitzer failure. Removing jl_precompile_toplevel_module from
jl_exported_data.inc fixes the error. For good measure, set it to NULL
at the point of definition, even though it gets nulled during
initialization.
  • Loading branch information
timholy committed Jan 21, 2022
1 parent 5f79cb3 commit a327428
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/jl_exported_data.inc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
XX(jl_pinode_type) \
XX(jl_pointer_type) \
XX(jl_pointer_typename) \
XX(jl_precompile_toplevel_module) \
XX(jl_quotenode_type) \
XX(jl_readonlymemory_exception) \
XX(jl_ref_type) \
Expand Down
2 changes: 1 addition & 1 deletion src/toplevel.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ htable_t jl_current_modules;
jl_mutex_t jl_modules_mutex;

// During incremental compilation, the following gets set
JL_DLLEXPORT jl_module_t *jl_precompile_toplevel_module; // the toplevel module currently being defined
JL_DLLEXPORT jl_module_t *jl_precompile_toplevel_module = NULL; // the toplevel module currently being defined

JL_DLLEXPORT void jl_add_standard_imports(jl_module_t *m)
{
Expand Down

0 comments on commit a327428

Please sign in to comment.