Skip to content

Commit

Permalink
Clear specsigflags correctly for copied code instance (#50238)
Browse files Browse the repository at this point in the history
As provided by Jameson to fix an issue encountered in a downstream
project.

Co-authored-by: Jameson Nash <[email protected]>
  • Loading branch information
topolarity and vtjnash authored Jun 21, 2023
1 parent 94dd5cf commit 4f0216a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2392,7 +2392,8 @@ jl_code_instance_t *jl_compile_method_internal(jl_method_instance_t *mi, size_t
if (jl_atomic_cmpswap_acqrel(&codeinst->specptr.fptr, &prev_fptr, fptr)) {
jl_atomic_store_relaxed(&codeinst->specsigflags, specsigflags & 0b1);
jl_atomic_store_release(&codeinst->invoke, invoke);
jl_atomic_store_release(&codeinst->specsigflags, specsigflags);
// unspec is probably not specsig, but might be using specptr
jl_atomic_store_release(&codeinst->specsigflags, specsigflags & ~0b1); // clear specsig flag
} else {
// someone else already compiled it
while (!(jl_atomic_load_acquire(&codeinst->specsigflags) & 0b10)) {
Expand Down

2 comments on commit 4f0216a

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your package evaluation job has completed - possible new issues were detected.
A full report can be found here.

Please sign in to comment.