[bitc-dev] Compiling on FreeBSD 6.1
Christopher Nelson
paradox at BBHC.ORG
Fri May 19 15:43:49 EDT 2006
> On Fri, 2006-05-19 at 13:18 -0600, Christopher Nelson wrote:
> > The run hangs with the -h, and I haven't tried the -s yet.
> Seems to
> > be somewhere in the GC init, so I'm looking down that path. It
> > actually gets stuck in a routine called nanosleep... Which I'm
> > guessing is part of the FreeBSD environment, probably in libc?
> > Thanks, and I'll let you know what I find.
>
> Oh yes. I remember now.
>
> This error occurs when allocation is performed before the
> boehm-gc allocator has initialized. It is almost certainly
> the case that something is calling malloc() from within a
> constructor initialization, and the .init call that
> initializes the boehm-gc hasn't been called yet.
> If you dig in to the Boehm code, you will discover that this
> is a known issue, and that the semantics of dynamic library
> initialization doesn't really permit a solution. One thing
> that you might consider is to try linking it statically.
>
> It is fairly straightforward (though time consuming) from
> where we are to switch to Fergus's method and just adopt a
> precise GC system. We won't be doing this in the bootstrap
> compiler, but it should be possible to do it from the
> self-hosted compiler.
>
> You can check this by running under GDB. Put a breakpoint on
> main before saying "run". My bet is that you will find that
> you never actually make it to main.
In fact, I did a backtrace and I never saw main. So that makes perfect
sense. If I turn off the automatic malloc redirects for the GC system
it should also work fine. Since Swaroop mentioned that you only use
new, that shouldn't cause any issues for bitc, and I don't think it will
cause any issues for any other important packages on my system.
Thanks again!
-={C}=-
More information about the bitc-dev
mailing list