public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@golang.org>
To: Tom de Vries <tdevries@suse.de>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [libbacktrace] Fix and simplify xcoff_%.c pattern rule
Date: Mon, 28 Jan 2019 18:43:00 -0000	[thread overview]
Message-ID: <CAKOQZ8zmM9QOPe5KmJywYYc9k15n3C=yuS17KqGpFQRQmGG+DA@mail.gmail.com> (raw)
In-Reply-To: <8e0a3f07-3326-b4f8-f1e4-64ac1f5c7aed@suse.de>

On Mon, Jan 28, 2019 at 1:25 AM Tom de Vries <tdevries@suse.de> wrote:
>
> [ was: Re: [backtrace] Avoid segfault  ]
> On 27-01-19 22:53, Ian Lance Taylor wrote:
> > On Sun, Jan 27, 2019 at 1:16 PM Tom de Vries <tdevries@suse.de> wrote:
> >>
> >> On 25-01-19 18:15, Nathan Sidwell wrote:
> >>> On 1/25/19 5:28 AM, Tom de Vries wrote:
> >>>>
> >>>> This patch fixes it by passing "" instead of NULL, in the call to
> >>>> elf_add at line 3083 (for .gnu_debugaltlink), not the call to elf_add at
> >>>> line 3044 (for .gnu_debuglink) mentioned above.
> >>>>
> >>>> Nathan, does this fix the problem for you? If not, can you provide a
> >>>> reproducer, or give a hint on how one could be constructed?
> >>>
> >>> I still hit the problem, and am installing this as sufficiently obvious.
> >>>  I'm on a fedora system debugging pr88995.  The debuglink_name is
> >>> "../../.dwz/isl-0.16.1-7.fc29.x86_64"
> >>>
> >>
> >> I've managed to reproduce this segfault instance by adding a test-case
> >> that uses both build-id and dwz.
> >>
> >> OK for trunk?
> >
> >> +elf_for_test.c: elf.c
> >> + PWD=$$(pwd -P); \
> >> + BUILD_ID_DIR="usr/lib/debug/.build-id/"; \
> >> + SEARCH='#define SYSTEM_BUILD_ID_DIR'; \
> >> + REPLACE="#define SYSTEM_BUILD_ID_DIR \"$$PWD/$$BUILD_ID_DIR\""; \
> >> + $(SED) "s%^$$SEARCH.*\$$%$$REPLACE%" \
> >> + $< \
> >> + > $@
> >
> > You need to use a temporary file, such as $@.tmp, for the final sed
> > command, followed by a mv to $@.  Otherwise a failure in the sed will
> > leave what appears to be an up to date file.
>
> I noticed the same problem in the xcoff_%.c pattern rule.
>
> OK for trunk?

This is OK.

Thanks.

Ian

  parent reply	other threads:[~2019-01-28 18:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25  0:15 [backtrace] Avoid segfault Nathan Sidwell
2019-01-25  1:49 ` Ian Lance Taylor
2019-01-25 13:23   ` Tom de Vries
2019-01-25 14:10     ` Tom de Vries
2019-01-25 14:31       ` Ian Lance Taylor
2019-01-25 17:20       ` Nathan Sidwell
2019-01-25 17:31         ` Marek Polacek
2019-01-27 21:53         ` Tom de Vries
2019-01-28  1:39           ` Ian Lance Taylor
2019-01-28  9:35             ` [libbacktrace] Fix and simplify xcoff_%.c pattern rule Tom de Vries
2019-01-28 11:31               ` [libbacktrace] Add gen-xcoff-n.sh Tom de Vries
2019-01-28 22:29                 ` Ian Lance Taylor
2019-01-28 18:43               ` Ian Lance Taylor [this message]
2019-01-29  8:52             ` [backtrace] Avoid segfault Tom de Vries
2019-01-29 15:29               ` Ian Lance Taylor
2019-01-29 23:53             ` Segher Boessenkool
2019-01-30  2:21               ` Ian Lance Taylor
2019-01-28 23:19           ` [libbacktrace] Don't assign check_PROGRAMS to TESTS Tom de Vries
2019-01-29  1:08             ` Ian Lance Taylor
2019-01-25 14:23     ` [backtrace] Avoid segfault Ian Lance Taylor

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='CAKOQZ8zmM9QOPe5KmJywYYc9k15n3C=yuS17KqGpFQRQmGG+DA@mail.gmail.com' \
    --to=iant@golang.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tdevries@suse.de \
    /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).