From: Ian Lance Taylor <iant@golang.org>
To: Basile Starynkevitch <basile@starynkevitch.net>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: libbacktrace PATCH: improve comment for backtrace_create_state
Date: Tue, 04 Apr 2017 13:38:00 -0000 [thread overview]
Message-ID: <CAKOQZ8xxJaV_8Dutk4oY=WjubAvi8mF0-wajGY93FqXC4Fq71w@mail.gmail.com> (raw)
In-Reply-To: <3defaafeedc9fa6b42e61401d4c8c84e@starynkevitch.net>
On Tue, Apr 4, 2017 at 5:05 AM, <basile@starynkevitch.net> wrote:
>
> I just discovered that backtrace_create_state should be called once, that it
> is returning some heap-allocated data (which cannot be free-d, because there
> is no
> backtrace_destroy_state routine).
>
> I suggest the attached patch (against GCC trunk r246678) which just improves
> the comment describing that function.
You are adding that backtrace_create_state should be called "(probably
at startup, e.g. early in main)"? But that is not accurate. It's
perfectly reasonable to do what GCC itself does, which is call
backtrace_create_state only when it encounters an internal compiler
error (in diagnostic_action_after_output in gcc/diagnostic.c).
How about we just add backtrace_destroy_state?
Ian
next prev parent reply other threads:[~2017-04-04 13:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 12:05 basile
2017-04-04 13:38 ` Ian Lance Taylor [this message]
2017-04-04 13:51 ` basile
2017-04-04 14:05 ` Ian Lance Taylor
2017-04-04 14:14 ` basile
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='CAKOQZ8xxJaV_8Dutk4oY=WjubAvi8mF0-wajGY93FqXC4Fq71w@mail.gmail.com' \
--to=iant@golang.org \
--cc=basile@starynkevitch.net \
--cc=gcc-patches@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).