Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 22 Apr 2013 10:24:38 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Failing setjmp of libc-testsuite

On Mon, Apr 22, 2013 at 04:01:34PM +0300, Timerlan Moldobaev wrote:
> Hi ,
> 
> I am running libc-testsuite  linking it statically with musl libraries
> 
> Here is my gcc  version:
> 
> gcc -v
> Using built-in specs.
> Target: x86_64-redhat-linux
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info --enable-shared --enable-threads=posix
> --enable-checking=release --with-system-zlib --enable-__cxa_atexit
> --disable-libunwind-exceptions --enable-libgcj-multifile
> --enable-languages=c,c++,objc,obj-c++,java,fortran,ada
> --enable-java-awt=gtk --disable-dssi --enable-plugin
> --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic
> --host=x86_64-redhat-linux
> Thread model: posix
> gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)
> 
> I noticed that setjmp test constantly fails for me with the following error
> message:
> 
> setjmp.c:51: sigismember(&set, 10)==0 failed: siglongjmp failed to restore
> mask
> setjmp test failed, 1 error(s)
> 
> However if I comment out all the rest functions calls from testsuite.c file
> , setjmp alone surprisingly passes as if its failure is somehow connected
> to other tests. Specifically memstream is the one that affects
> success/failure of setjmp.
> 
> Please see attached output of strace -v -s 512 -F -f -o out_fail.txt
> ../testsuite ( a failing case when only  memstream and setjmp  are present
> in testsuite.c file ) and strace -v -s 512 -F -f -o out.txt ./testsuite ( a
> success case when only setjmp  is present in  testsuite.c file).
> 
> Any ideas why the failure happens ?
> 
> Thanks,
> Tim.

> 26978 rt_sigprocmask(SIG_UNBLOCK, [USR1], [], 8) = 0
> 26978 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> 26978 rt_sigprocmask(SIG_BLOCK, [USR1], NULL, 8) = 0
> 26978 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> 26978 rt_sigprocmask(SIG_SETMASK, [], [], 8) = 0
> 26978 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x100, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x803b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
> 26978 writev(1, [{"setjmp", 6}, {" test passed\n", 13}], 2) = 19
> 26978 writev(1, [{"", 0}, {"\n", 1}], 2) = 1
> 26978 writev(1, [{"total errors: 0", 15}, {"\n", 1}], 2) = 16
> 26978 exit_group(0)                     = ?

> 5433  brk(0)                            = 0xb371000
> 5433  brk(0xb372000)                    = 0xb372000
> 5433  ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x100, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x803b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
> 5433  writev(1, [{"memstream", 9}, {" test passed\n", 13}], 2) = 22
> 5433  rt_sigprocmask(SIG_UNBLOCK, [USR1], [], 8) = 0
> 5433  rt_sigprocmask(SIG_SETMASK, [QUIT ILL ABRT BUS USR1 SEGV ALRM STKFLT URG], NULL, 8) = 0
> 5433  rt_sigprocmask(SIG_BLOCK, [USR1], NULL, 8) = 0
> 5433  rt_sigprocmask(SIG_SETMASK, [QUIT ILL ABRT BUS USR1 SEGV ALRM STKFLT URG], NULL, 8) = 0
> 5433  rt_sigprocmask(SIG_SETMASK, [], [QUIT ILL ABRT BUS USR1 SEGV ALRM STKFLT URG], 8) = 0
> 5433  writev(1, [{"setjmp.c:51: sigismember(&set, 10)==0 failed: siglongjmp failed to restore mask", 79}, {"\n", 1}], 2) = 80
> 5433  writev(1, [{"setjmp test failed, 1", 21}, {" error(s)\n", 10}], 2) = 31
> 5433  writev(1, [{"", 0}, {"\n", 1}], 2) = 1
> 5433  writev(1, [{"total errors: 1", 15}, {"\n", 1}], 2) = 16
> 5433  exit_group(1)                     = ?

I just committed a fix; let me know if your problem persists. I also
committed an improvement to the testsuite, which you might want to try
first, which should reliably detect the error you found in musl.

Thanks!

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.