From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Szabolcs Nagy <szabolcs.nagy@arm.com>
Cc: Manuel Lauss <manuel.lauss@gmail.com>, libc-alpha@sourceware.org
Subject: Re: segfaults in _dl_fixup since 4af6982
Date: Wed, 13 Oct 2021 07:58:34 -0300 [thread overview]
Message-ID: <F61DF32C-DE90-46F5-9DEA-0CC0AD24BB18@linaro.org> (raw)
In-Reply-To: <20211013091845.GP2700@arm.com>
> On 13 Oct 2021, at 06:19, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
>
> The 10/13/2021 08:42, Manuel Lauss via Libc-alpha wrote:
>> [resend with libc-alpha]
>> Hi Adhemerval,
>>
>> Your recent commit 4af6982e4c9fc465ffb7a54b794aaaa134241f05 ("elf: Fix
>> elf_get_dynamic_info definition") causes a lot (but not all) of my
>> applications
>> to segfault:
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> _dl_fixup (l=<optimized out>, reloc_arg=<optimized out>) at dl-runtime.c:146
>> 146 return elf_machine_fixup_plt (l, result, refsym, sym, reloc,
>> rel_addr, value);
>> (gdb) bt
>> #0 _dl_fixup (l=<optimized out>, reloc_arg=<optimized out>) at dl-runtime.c:146
>> #1 0x00007ffff7fe251a in _dl_runtime_resolve_xsavec () at
>> ../sysdeps/x86_64/dl-trampoline.h:126
>> #2 0x000055555555634e in main (argc=1, argv=0x7fffffffd568) at
>> iconvconfig.c:288
>>
>> Reverting the commit fixes the problem. Gcc, python, etc seem to be
>> not affected, while for example iconvconfig and openssh are.
>
> on aarch64 buildbot i see
>
> FAIL: nptl/test-cond-printers
> FAIL: nptl/test-condattr-printers
> FAIL: nptl/test-mutex-printers
> FAIL: nptl/test-mutexattr-printers
> FAIL: nptl/test-rwlock-printers
> FAIL: nptl/test-rwlockattr-printers
>
> and
>
> $ cat nptl/test-cond-printers.out
> Error: Response does not match the expected pattern.
> Command: start
> Expected pattern: main
> Response: Temporary breakpoint 1 at 0xac4: file test-cond-printers.c, line 36.
> Starting program: /work/glibc-aarch64-linux/build/build/nptl/test-cond-printers
>
> Program received signal SIGSEGV, Segmentation fault.
> _dl_fixup (l=<optimized out>, reloc_arg=<optimized out>) at dl-runtime.c:146
> 146 return elf_machine_fixup_plt (l, result, refsym, sym, reloc, rel_addr, value);
> (gdb)
>
>
> it seems to be a bind-now pie where PLT relocs are not yet
> processed when __libc_start_main is called but PLTGOT is
> already marked readonly so _dl_fixup crashes.
I will check this out.
next prev parent reply other threads:[~2021-10-13 10:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAOLZvyH+V0TokSzHumaxJF9JA=Kxoxh2NVr+ZZbdBD5qZ-urZg@mail.gmail.com>
2021-10-13 6:42 ` Fwd: " Manuel Lauss
2021-10-13 9:18 ` Szabolcs Nagy
2021-10-13 10:58 ` Adhemerval Zanella [this message]
2021-10-13 11:44 ` Adhemerval Zanella
2021-10-13 11:56 ` Adhemerval Zanella
2021-10-13 13:46 ` Adhemerval Zanella
2021-10-13 13:55 ` Manuel Lauss
2021-10-13 14:41 ` Adhemerval Zanella
2021-10-13 14:51 ` Manuel Lauss
2021-10-13 15:12 ` Adhemerval Zanella
2021-10-13 17:28 ` Szabolcs Nagy
2021-10-13 18:15 ` Adhemerval Zanella
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=F61DF32C-DE90-46F5-9DEA-0CC0AD24BB18@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
--cc=manuel.lauss@gmail.com \
--cc=szabolcs.nagy@arm.com \
/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).