Skip to content

Commit abbfcf0

Browse files
committed
Fix asan for jl_precompile_toplevel_module
PR #43793 passed the buildkite test but the logs for #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.
1 parent 5f79cb3 commit abbfcf0

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/jl_exported_data.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
XX(jl_pinode_type) \
8686
XX(jl_pointer_type) \
8787
XX(jl_pointer_typename) \
88-
XX(jl_precompile_toplevel_module) \
8988
XX(jl_quotenode_type) \
9089
XX(jl_readonlymemory_exception) \
9190
XX(jl_ref_type) \

src/toplevel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ htable_t jl_current_modules;
3434
jl_mutex_t jl_modules_mutex;
3535

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

3939
JL_DLLEXPORT void jl_add_standard_imports(jl_module_t *m)
4040
{

0 commit comments

Comments
 (0)