mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Patrick Oppenlander <patrick.oppenlander@gmail.com>
To: musl@lists.openwall.com
Subject: Re: [musl] armv7-m musl 1.2.0 toolchain crash
Date: Thu, 19 Mar 2020 09:43:51 +1100	[thread overview]
Message-ID: <CAEg67G=tnFsdTsrnE9oKJ-rXdnC5tWqvYMYnGr7g72Aukw36uw@mail.gmail.com> (raw)
In-Reply-To: <20200318191039.GQ14278@port70.net>

On Thu, Mar 19, 2020 at 6:10 AM Szabolcs Nagy <nsz@port70.net> wrote:
>
> * Patrick Oppenlander <patrick.oppenlander@gmail.com> [2020-03-16 16:41:17 +1100]:
> > After the update to musl 1.2.0 (1.1.24 was fine) ld crashes when
> > trying to link a C++ executable. C executables successfully link. The
> > toolchain was built as at commit
> > 5086175f29021e3bebb7d9f5d83c4a796d96ebbd of musl-cross-make with the
> > following configuration:
> >
> > TARGET = armv7m-linux-musleabihf
> > GCC_CONFIG += --with-cpu=cortex-m7  # easier than arch/fpu/tune
> > GCC_CONFIG += --enable-languages=c,c++
> > GCC_CONFIG += --disable-libquadmath --disable-decimal-float
> > GCC_CONFIG += --enable-default-pie
> > GCC_CONFIG += --enable-cxx-flags="-ffunction-sections"
> > MUSL_CONFIG += --enable-debug
> > COMMON_CONFIG += CFLAGS="-g0 -Os" CXXFLAGS="-g0 -Os"
> > COMMON_CONFIG += --disable-nls
> > COMMON_CONFIG += --with-debug-prefix-map=\$(CURDIR)=
> >
> > Host compiler is arch linux gcc 9.3.0-1.
> >
> > This results in a toolchain which does the following:
> > % cat test.c
> > int main() { return 0; }
> > % armv7m-linux-musleabi-gcc test.c
> > % armv7m-linux-musleabi-g++ test.c
> > collect2: fatal error: ld terminated with signal 11 [Segmentation
> > fault], core dumped
> > compilation terminated.
> >
> > The crash is a null pointer dereference in ld here (sym_hashes is 0):
> >
> > (gdb) bt
> > #0  cmse_scan (input_bfd=0x555555e3a110, htab=0x55555578a260,
> > out_attr=0x5555557885c0, sym_hashes=0x0,
> > cmse_stub_created=0x7fffffffd4c8)
> >     at ../../src_binutils/bfd/elf32-arm.c:6016
>
>
> this is likely fixed by this binutils commit:
>
> commit 73d5efd7e13ebd8fe87278224bc2ae777af3de52
> Author:     Alan Modra <amodra@gmail.com>
> AuthorDate: 2019-11-21 08:57:00 +1030
> Commit:     Alan Modra <amodra@gmail.com>
> CommitDate: 2019-11-21 21:08:30 +1030
>
>     ARM cmse_scan segfault
>

Thanks for looking into it.

Patrick

      reply	other threads:[~2020-03-18 22:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16  5:41 Patrick Oppenlander
2020-03-16 17:54 ` Rich Felker
2020-03-17  0:40   ` Patrick Oppenlander
2020-03-18 19:10 ` Szabolcs Nagy
2020-03-18 22:43   ` Patrick Oppenlander [this message]

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='CAEg67G=tnFsdTsrnE9oKJ-rXdnC5tWqvYMYnGr7g72Aukw36uw@mail.gmail.com' \
    --to=patrick.oppenlander@gmail.com \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).