This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: initstate_r in /lib/libc.so.6 crashing
- From: Jonathan Nieder <jrnieder at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Sun, 26 Jun 2011 22:58:06 -0500
- Subject: Re: initstate_r in /lib/libc.so.6 crashing
- References: <BANLkTimcbi4MV182oU6umG8F01M0ynjxBA@mail.gmail.com><BANLkTimakzRLi+tN0aQ3UtBrSmaSpk5whw@mail.gmail.com>
Hi Zeno,
Zeno wrote:
> This code also crashes:
> #include <stdlib.h>
> #include <stdio.h>
> #include <string.h>
>
> typedef struct random_data random_data;
>
> int main() {
> Âchar statebuf[256];
> Ârandom_data randomData;
>
> Âmemset(&randomData, 0, sizeof(randomData));
>
> Âinitstate_r(0, statebuf, 256, &randomData);
> Âreturn 0;
> }
Works ok for me, when run directly or through valgrind.
$ /lib/x86_64-linux-gnu/libc.so.6 | head -1
GNU C Library (Debian EGLIBC 2.13-7) stable release version 2.13, by Roland McGrath et al.
Unfortunately "git log -p stdio/random.c" doesn't show any obviously
relevant recent changes. Maybe using a copy of libc with debugging
symbols and getting a backtrace would help.
Sorry I have no better news, and good luck.
Regards,
Jonathan