[Gc] Internal GC variable used as root

Stefan Ring stefanrin at gmail.com
Sun Aug 25 06:11:34 PDT 2013

Originally reported here: https://github.com/ivmai/bdwgc/issues/21

I'll try to summarize. I have a test program [1] that creates "an
embarrassing failure scenario", as described in [2]. While I am aware
that this is a recipe for desaster, it is surprising to see
GC_mark_stack_limit used as a GC root (see my most recent comment
there [3]). The probability that one of the GC's own variables will
point somewhere inside the heap is expected to be rather large, so
this is clearly sub-optimal. Interestingly, this peculiar behavior is
not reproducible with the (very old) gc 6.8.

[1] https://github.com/Ringdingcoder/dumpingground/blob/master/gc-chain.c
[2] https://www.hpl.hp.com/personal/Hans_Boehm/gc/bounds.html
[3] https://github.com/ivmai/bdwgc/issues/21#issuecomment-23226717

More information about the Gc mailing list