"Stephen R. van den Berg" srb@cuci.nl wrote:
It just means that I need to compile from a different tree (which I wanted to avoid), since keeping the binaries, but not the accompanying sources tends to make gdb navigation unusable.
I usually don't bother - backtraces are still fairly sane, and you can still inspect data without problems. It's only line numbers and source listings that can be a little bit off.
Anyway, I've got good news. I've fixed the bug that GC_MARK_DEBUG caught, and I'm fairly certain that fixes the real issue too. Can you please check that by first updating gc.c only, so that you get the new assertions I've added there? If you get a fatal in the assertion at gc.c:3560 then you're hit by the bug I've found. Update gc.h and it should be gone.
The problem was that the gc_recurse callbacks used from Pike.count_memory didn't choose the correct code path in some cases, going into the gc mark code instead and thereby producing garbage in the gc mark queue. That garbage could then make the gc misbehave, but only in some rare circumstances to the extent that it crashes. In most cases I suspect the effect was that it just missed a little bit of garbage, nothing else.
So even though the error really was pretty big, it had very rarely any observable effect. Very insidious.
(Another effect of the bug was that Pike.count_memory missed some things and returned a little bit too low count.)