This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Segfaults and double free errors using getaddrinfo_a


On Wed, Jul 11, 2012 at 3:25 AM, Daurnimator <quae@daurnimator.com> wrote:
> While using getaddrinfo_a through the luajit ffi
> (http://luajit.org/ext_ffi.html) I keep getting segfaults or double
> free errors.
> The errors seems to disappear if I use LD_PRELOAD=/lib/libpthread.so
> I've been unable to reduce the code down to a C test case, so all I
> can show is some luajit code: http://codepad.org/lyLVwfAd
>
> Example backtrace:
>
> *** glibc detected *** luajit: double free or corruption (out):
> 0x00007fc000000940 ***
> ======= Backtrace: =========
> /lib/libc.so.6(+0x784a6)[0x7fc00e62a4a6]
> /lib/libc.so.6(fclose+0x14d)[0x7fc00e61adcd]
> /lib/libnss_files.so.2(+0x3a25)[0x7fc00df88a25]
> /lib/libnss_files.so.2(_nss_files_gethostbyname4_r+0x2e9)[0x7fc00df89e69]
> /lib/libc.so.6(+0xce95a)[0x7fc00e68095a]
> /lib/libc.so.6(getaddrinfo+0xf4)[0x7fc00e683d34]
> /usr/lib/libanl.so(+0x1029)[0x7fc00e3af029]
> /lib/libpthread.so.0(+0x7e0f)[0x7fc00e199e0f]
> /lib/libc.so.6(clone+0x6d)[0x7fc00e69604d]

I was able to reproduce this on PPC64.  I'll take a look and see if I
can unravel what's going on.

Ryan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]