public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Tiberiu Chibici <chibicitiberiu@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: Chew segmentation fault while building on Ubuntu/Debian
Date: Fri, 7 Jan 2022 21:57:28 -0500	[thread overview]
Message-ID: <Ydj9mPKthy2SyPAV@vapier> (raw)
In-Reply-To: <CADEn14Nww34Md+dWdRXG2aeY1a=PxMFJsC7--uHvN5qdN18Y3Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

On 08 Jan 2022 04:38, Tiberiu Chibici via Binutils wrote:
> I have some more information about this issue, another person running
> Ubuntu 20.04.3 LTS was able to reproduce the same issue (using WSL). Also,
> I tried to debug the issue in GDB, and this seems to be the origin of the
> segmentation fault. Is there anything else I can help with to get closer to
> the source of the problem?
> 
> (gdb) run -f ../../../binutils-2.37/bfd/doc/doc.str <
> ../../../binutils-2.37/bfd/doc/../archures.c

the chew program is extremely simple.  you can enable more debugging info:
$ cd bfd/doc
$ make clean
$ make CC_FOR_BUILD='gcc -O0 -ggdb3 -fsanitize=address'
$ ./chew -f ../../../binutils-2.37/bfd/doc/doc.str < ../../../binutils-2.37/bfd/doc/../archures.c

see if that triggers a failure with more logging.

> Starting program:
> /home/tibi/Nanobyte/nanobyte_os_with_interrupts/toolchain/binutils-build-2.37/bfd/doc/chew
> -f ../../../binutils-2.37/bfd/doc/doc.str <
> ../../../binutils-2.37/bfd/doc/../archures.c
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> 
> Program received signal SIGSEGV, Segmentation fault.
> __strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:105
> 105     ../sysdeps/x86_64/multiarch/strcmp-avx2.S: No such file or
> directory.
> (gdb) bt
> #0  __strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:105
> #1  0x00005555555575a1 in lookup_word (word=0x55555555f890
> "skip_past_newline") at ../../../binutils-2.37/bfd/doc/chew.c:1242

you can set a break on lookup_word and see what the *root tree looks like.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-01-08  2:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-27 12:30 Tiberiu Chibici
2021-12-29  7:50 ` Alan Modra
2021-12-29 11:07   ` Tiberiu Chibici
2022-01-08  2:38 ` Tiberiu Chibici
2022-01-08  2:57   ` Mike Frysinger [this message]
2022-01-08 13:18     ` Tiberiu Chibici

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=Ydj9mPKthy2SyPAV@vapier \
    --to=vapier@gentoo.org \
    --cc=binutils@sourceware.org \
    --cc=chibicitiberiu@gmail.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).