[pypy-dev] Weird C code in crashing code line
Stefan Behnel
stefan_ml at behnel.de
Thu Oct 11 12:01:38 CEST 2012
Alex Gaynor, 11.10.2012 11:53:
> On Thu, Oct 11, 2012 at 12:25 AM, Armin Rigo wrote:
>> On Thu, Oct 11, 2012 at 7:41 AM, Stefan Behnel wrote:
>>> 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 obmalloc.c is straight from CPython. It's very unlikely at this
>> point to contain problems.
>
> It was copied from CPython many years ago though, perhaps they've fixed
> bugs since then?
No, I just checked - the same code is in latest CPython hg.
Thanks for the hints.
Stefan
More information about the pypy-dev
mailing list