From: Aurelien Jarno <aurelien@aurel32.net>
To: Florian Weimer <fweimer@redhat.com>
Cc: GNU C Library <libc-alpha@sourceware.org>,
"H.J. Lu" <hjl.tools@gmail.com>
Subject: Re: SIGBUS failure for misc/tst-bz21269 on i386
Date: Wed, 28 Mar 2018 17:37:00 -0000 [thread overview]
Message-ID: <20180328173657.GA3586@aurel32.net> (raw)
In-Reply-To: <23e0f059-1fd0-8b95-ce35-99eba8a96a30@redhat.com>
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=<optimized out>, 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 <ftx>
> > (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
next prev parent reply other threads:[~2018-03-28 17:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 13:35 Florian Weimer
2018-03-14 13:44 ` H.J. Lu
2018-03-14 16:47 ` Adhemerval Zanella
2018-03-27 21:47 ` Aurelien Jarno
2018-03-27 21:58 ` H.J. Lu
2018-03-28 6:47 ` Aurelien Jarno
2018-03-28 8:01 ` Florian Weimer
2018-03-28 17:37 ` Aurelien Jarno [this message]
2018-03-28 17:47 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180328173657.GA3586@aurel32.net \
--to=aurelien@aurel32.net \
--cc=fweimer@redhat.com \
--cc=hjl.tools@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).