[Xastir-dev] Raw Tiger code, --with-libgc = segfault
Curt, WE7U
archer at eskimo.com
Tue Nov 2 11:17:18 EST 2004
On Tue, 2 Nov 2004, Curt, WE7U wrote:
> I get a segfault if I run with libgc enabled (that's our memory leak
> detector), with raw tiger maps and "Filled" checked in the Map
> Chooser->Properties dialog for those maps.
>
> That "Filled" option triggers the polygon new reassembly code. I
> believe I've tracked it down to libgc deallocating some memory
> before we're done with it. A quick check of the README.QUICK from
> the libgc distribution yielded this:
>
>
> "Do not store the only pointer to an object in memory allocated
> with system malloc, since the collector usually does not scan
> memory allocated in this way."
How many times can I say "Duh"?
Of course the solution most probably is: The new hash*.h/hash*.c
doesn't have the "#ifdef USING_LIBGC" stuff in it which replace the
malloc calls with GC_MALLOC calls. I'm about 90% sure that's the
problem. Adding that bit of code to the new hash functions should
cause libgc to track the pointers.
--
Curt, WE7U http://www.eskimo.com/~archer
"Lotto: A tax on people who are bad at math." -- unknown
"Windows: Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me: I picked the coordinate system!"
More information about the Xastir-dev
mailing list