[Gc] Using the GC w/ common x86 compilers.
davejf at frontiernet.net
Tue Jul 24 10:06:05 PDT 2007
Bruce Hoult wrote:
> On 7/24/07, Dave <davejf at frontiernet.net> wrote:
>> - Are there any known compiler optimization issues that break the GC
>> with any of the above?
>> - Do any of them (by default) align pointers and/or pack struct / class
>> pointer members such that it would break the GC?
> If they do, all you have to do is detect that compiler in
> include/private/gcconfig.h and #define ALIGNMENT 1 (or whatever it
> It will make scanning several times slower and increase the chance of
> false positives, but it will work.
Thank you. My understanding is that since alignment and packing have
both performance and ABI consequences, most all contemporary compilers
will "follow the leader" and fortunately MSVC and GCC seem to "do the
right thing" <g>
How about the compiler optimization issue (where the optimization
'hides' a pointer into the GC heap)? That actually worries me more
because bugs would be really tough to isolate and recreate. I've read
Dr. Boehm's papers on this, but IIUC the point is made that it's
generally not a concern for 'normal' code. Just wondering if anyone has
any experience or examples regarding this issue (especially but not
limited to x86 compilers)?
> Gc mailing list
> Gc at linux.hpl.hp.com
More information about the Gc