Boost logo

Boost-Build :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2006-11-05 11:06:55


David Abrahams wrote:
> David Abrahams <dave_at_[hidden]> writes:
>
>> Have you got a reproducible test case?

Well at the time the only reproduction was with one of my internal
projects. But now that I can run the BBv2 tests on Windows I have others:

        cd tools/jam/src
        build.bat --gc --debug
        cd ../../build/v2/test
        python unit_test.py
        python tag.py

Both of those (unit_test and tag) fail with strange, as in garbled,
output resulting from mangled strings. But they pass with the regular
bjam. You can also reproduce some problems with just the "build --debug"
bjam build, but it requires using a large project test case. This is
because the debug build disables the special newstr allocator which
seems to give bjam some fudge room when working with strings as it does
larger allocations. Hence why I suspect it's a buffer overrun.

> I think I may have mentioned this before, but your code to do GC
> doesn't look right to me.

I don't think you did. Perhaps you are thinking of Alex Besogonov's GC
patch?

> If you want the finalizer to run, you have
> to do something to ensure that the hashtable itself is not scanned, or
> those strings will always be considered referenced.

Yes, AFAIR I do.

> Also, if you're looking for a cause of the crash, I'd check your use
> of NO_INTERIOR_POINTERS.

I have no idea what NO_INTERIOR_POINTERS is :-) I just use
GC_malloc_atomic in certain places as needed. Note I didn't use Alex
patch I did changes to *all* of bjam to do the integration in such a way
that it allows the easy switching of the memory allocator. Hence why the
DUMA allocator is in there.

> Are you 100% sure that every allocated block
> of memory is referenced by a pointer to its start?

Well with bjam I can never be 100% sure as I just don't know all it does
with pointers. But I'd give a 90% confidence that the mem allocation and
refs are fine. I still suspect that it's a memory overrun.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk