public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ian at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/61895] libbacktrace crashes with bus error with empty file argv[0]
Date: Sat, 02 Aug 2014 00:54:00 -0000	[thread overview]
Message-ID: <bug-61895-4-veUGKBK5yb@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61895-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61895

--- Comment #3 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> ---
Author: ian
Date: Sat Aug  2 00:53:58 2014
New Revision: 213512

URL: https://gcc.gnu.org/viewcvs?rev=213512&root=gcc&view=rev
Log:
    PR other/61895

runtime: Ignore small argv[0] file for backtrace.

Reportedly in some cases Docker starts processes with argv[0]
pointing to an empty file.  That would cause libgo to pass
that empty file to libbacktrace, which would then fail to do
any backtraces.  Everything should work fine if libbacktrace
falls back to /proc/self/exe.

This patch to libgo works around the problem by ignoring
argv[0] if it is a small file, or if stat fails.  This is not
a perfect fix but it's an unusual problem.

Modified:
    branches/gcc-4_9-branch/libgo/runtime/go-caller.c


  parent reply	other threads:[~2014-08-02  0:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-24 10:50 [Bug other/61895] New: " vogt at linux dot vnet.ibm.com
2014-07-28  9:12 ` [Bug other/61895] " vogt at linux dot vnet.ibm.com
2014-08-02  0:33 ` ian at airs dot com
2014-08-02  0:54 ` ian at gcc dot gnu.org [this message]
2014-08-02  0:54 ` ian at gcc dot gnu.org
2014-08-02  0:59 ` ian at airs dot com

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=bug-61895-4-veUGKBK5yb@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).