[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bindings
Subject: Re: [Kde-bindings] glibc realloc error with
From: Ashley Winters <jahqueel () yahoo ! com>
Date: 2008-08-14 23:02:20
Message-ID: 453614.76264.qm () web50809 ! mail ! re2 ! yahoo ! com
[Download RAW message or body]
--- On Thu, 8/14/08, Chris Burel <chrisburel@gmail.com> wrote:
> But now try commenting out the last line of QtSimple.xs,
> that defines the
> custom setRootIndex xs function. On my machine here at
> home, which is 32
> bit running Fedora Core 5 with Qt-4.4.0, I get this when it
> tries to run
> line 19:
> $table1->setRootIndex( $modelIndex );
> *** glibc detected *** /usr/bin/perl: realloc(): invalid
> next size:
> 0x089143c0 ***
>
> I threw in some debugging fprintf's, and it gets past
> the XSRETURN(1) line.
> This is what really confuses me, that it's something
> happening after it
> leaves XS_AUTOLOAD.
That glibc error is cause by a double free(). Since it's handling a perl SV* at the time, \
that's a bit odd. If you recompile perl and let it use its own malloc() implementation, you \
might get slightly better debugging.
The stack trace is showing that sv_catpvn(sv, "string") had to grow the string buffer (hence it \
dropping into realloc()). Once realloc() copied to the new buffer, it decided to free() the \
original buffer, and then glibc noticed that its malloc datastructure was corrupt.
If I were to guess, I'd say the SvREFCNT is wrong (on the low side) on whatever variable(s) \
you're exchanging via autoload.
- Ashley Winters
_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic