initstate_r in /lib/libc.so.6 crashing
Jonathan Nieder
jrnieder@gmail.com
Mon Jun 27 03:58:00 GMT 2011
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
More information about the Libc-help
mailing list