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: initstate_r in /lib/libc.so.6 crashing


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


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