This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

mbstowcs (pwcs=0x0, s=0x0, n=0) segfaults



Hi Uli,

playing around with the other tests I noticed that mbstowcs produces a
segmentation fault with all 0 arguments:

Program received signal SIGSEGV, Segmentation fault.
0x8054082 in __mbsrtowcs (dst=0x0, src=0xbffff658, len=0, ps=0xbffff644)
    at mbsrtowcs.c:70
70            const unsigned char *srcend = inbuf + strlen (inbuf) + 1;
(gdb) bt
#0  0x8054082 in __mbsrtowcs (dst=0x0, src=0xbffff658, len=0, ps=0xbffff644)
    at mbsrtowcs.c:70
#1  0x804be25 in mbstowcs (pwcs=0x0, s=0x0, n=0) at mbstowcs.c:39
#2  0x80483c4 in tst_mbstowcs (fp=0x80d61c0, debug_flg=0)
    at tests-mbwc/tst_mbstowcs.c:25
#3  0x80490b1 in main (argc=1, argv=0xbffff794) at tests-mbwc/tsp_common.c:33
#4  0x804916a in __libc_start_main (main=0x804905c <main>, argc=1, 
    ubp_av=0xbffff794, init=0x80480b4 <_init>, fini=0x8086f3c <_fini>, 
    rtld_fini=0, stack_end=0xbffff78c) at ../sysdeps/generic/libc-start.c:101

Is this a bug in glibc or the testsuite?

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de

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