[pypy-dev] Weird C code in crashing code line
Maciej Fijalkowski
fijall at gmail.com
Fri Oct 12 09:42:24 CEST 2012
On Thu, Oct 11, 2012 at 7:41 AM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Hi,
>
> I get a crash in lxml's test suite on 64bit Linux, right with the first
> test. I couldn't investigate it in depth so far, but at least I found that
> it crashes in line 606 of obmalloc.c, which reads as follows:
>
> 583 block *bp;
> [...]
> 604 bp = pool->freeblock;
> 605 assert(bp != NULL);
> 606 if ((pool->freeblock = *(block **)bp) != NULL) {
>
> The cast looks a bit smelly to me. Could someone who knows that code please
> take a look to see if it makes any sense? This kind of code tends to hint
> at potential aliasing problems to me etc. OTOH, "bp" holds the value 0xc
> here when it crashes, so there's clearly something going wrong.
That's very likely a refcounting problem (not that I can help much
more than that though :(
Cheers,
fijal
More information about the pypy-dev
mailing list