We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e66d25 commit 39879b7Copy full SHA for 39879b7
src/gc.c
@@ -813,6 +813,10 @@ FORCE_INLINE int gc_try_setmark_tag(jl_taggedvalue_t *o, uint8_t mark_mode) JL_N
813
tag = tag | mark_mode;
814
assert((tag & 0x3) == mark_mode);
815
}
816
+ // XXX: note that marking not only sets the GC bits but also updates the
817
+ // page metadata for pool allocated objects.
818
+ // The second step is **not** idempotent, so we need a compare exchange here
819
+ // (instead of a pair of load&store) to avoid marking an object twice
820
tag = jl_atomic_exchange_relaxed((_Atomic(uintptr_t)*)&o->header, tag);
821
verify_val(jl_valueof(o));
822
return !gc_marked(tag);
0 commit comments