[Gc] Segfault 11
Boehm, Hans
hans.boehm at hp.com
Mon Sep 26 21:47:06 PDT 2011
I think it would be great to add the checking if assertions are enabled. Without assertions, I would add it only if you can keep the check off the fast path through GC_malloc. We've tried in the past to keep the allocation path as short as possible, and I think it's worth continuing to do that, probably even if the effect of adding it is not immediately measurable with a small test on today's machine.
Hans
> -----Original Message-----
> From: Ivan Maidanski [mailto:ivmai at mail.ru]
> Sent: Monday, September 26, 2011 12:47 AM
> To: gc at linux.hpl.hp.com
> Cc: Boehm, Hans; Andrew Pennebaker
> Subject: Re: [Gc] Segfault 11
>
> Hi,
>
> The idea looks good to me. Seems it wouldn't hurt backward
> compatibility.
>
> Could someone else express the opinion? Hans?
>
> PS. The message should look a bit different telling that portable
> clients should do it.
>
> Regards.
>
> 24 09 2011, 17:43 Andrew Pennebaker <andrew.pennebaker at gmail.com>:
> > I had a segfault deep in my code, and for the life of me I couldn't
> track
> > down the bug. It turned out I forgot to run GC_INIT() before calling
> > GC_MALLOC(). Please print a warning when this happens, for the
> benefit of
> > newbies like me. Something like:
> >
> > Error: Run GC_INIT() first.
> >
> > Cheers,
> >
> > Andrew Pennebaker
> > www.yellosoft.us
More information about the Gc
mailing list