[pypy-dev] Weird C code in crashing code line

Alex Gaynor alex.gaynor at gmail.com
Thu Oct 11 11:53:57 CEST 2012


On Thu, Oct 11, 2012 at 12:25 AM, Armin Rigo <arigo at tunes.org> wrote:

> Hi Stefan,
>
> On Thu, Oct 11, 2012 at 7:41 AM, Stefan Behnel <stefan_ml at behnel.de>
> 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.
>
>
> A bientôt,
>
> Armin.
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> http://mail.python.org/mailman/listinfo/pypy-dev
>

It was copied from CPython many years ago though, perhaps they've fixed
bugs since then?

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20121011/ac8584d9/attachment.html>


More information about the pypy-dev mailing list