From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73221 invoked by alias); 28 Mar 2018 17:37:02 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 72307 invoked by uid 89); 28 Mar 2018 17:37:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*r:120 X-HELO: hall.aurel32.net Date: Wed, 28 Mar 2018 17:37:00 -0000 From: Aurelien Jarno To: Florian Weimer Cc: GNU C Library , "H.J. Lu" Subject: Re: SIGBUS failure for misc/tst-bz21269 on i386 Message-ID: <20180328173657.GA3586@aurel32.net> Mail-Followup-To: Florian Weimer , GNU C Library , "H.J. Lu" References: <20180327214707.GA4207@aurel32.net> <23e0f059-1fd0-8b95-ce35-99eba8a96a30@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23e0f059-1fd0-8b95-ce35-99eba8a96a30@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-SW-Source: 2018-03/txt/msg00591.txt.bz2 On 2018-03-28 10:01, Florian Weimer wrote: > On 03/27/2018 11:47 PM, Aurelien Jarno wrote: > > Here is the coredump that I can get: > > > > Thread 1 "tst-bz21269" received signal SIGBUS, Bus error. > > 0x565564a0 in do_test () at ../sysdeps/unix/sysv/linux/i386/tst-bz21269.c:217 > > 217 while (atomic_load (&ftx) != 0) > > (gdb) bt > > #0 0x565564a0 in do_test () at ../sysdeps/unix/sysv/linux/i386/tst-bz21269.c:217 > > #1 0x56556bc2 in support_test_main (argc=, argv=0xffffd518, config=0xffffd424) at support_test_main.c:321 > > #2 0x56556061 in main (argc=2, argv=0xffffd514) at ../support/test-driver.c:164 > > (gdb) print &ftx > > $1 = (atomic_uint *) 0x5655a0e0 > > (gdb) print ftx > > $2 = 0 > > Ahh. I see. > > /* Fire up thread modify_ldt call. */ > atomic_store (&ftx, 2); > > while (atomic_load (&ftx) != 0) > ; > > /* On success, modify_ldt will segfault us synchronously and we will > escape via siglongjmp. */ > support_record_failure (); > > But: > > xsethandler (SIGSEGV, sigsegv_handler, 0); > /* 32-bit kernels send SIGILL instead of SIGSEGV on IRET faults. */ > xsethandler (SIGILL, sigsegv_handler, 0); > > So some kernels apparently use SIGBUS instead, and the crash actually shows > the test succeeded. > > Would you please try the attached patch? I confirm that this patch works. It returns no error with the fixed libc, and a segmentation one with the previous one without the bz21269 fix. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net