From: Florian Weimer <fweimer@redhat.com>
To: Marek Polacek via Gcc-patches <gcc-patches@gcc.gnu.org>
Cc: Marek Polacek <polacek@redhat.com>
Subject: Re: [PATCH] docs: Suggest options to improve ASAN stack traces
Date: Thu, 08 Dec 2022 08:25:26 +0100 [thread overview]
Message-ID: <87fsdqjr15.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20221207203409.104322-1-polacek@redhat.com> (Marek Polacek via Gcc-patches's message of "Wed, 7 Dec 2022 15:34:09 -0500")
* Marek Polacek via Gcc-patches:
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 726392409b6..2de14466dd3 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -16510,6 +16510,14 @@ The option cannot be combined with @option{-fsanitize=thread} or
> @option{-fsanitize=hwaddress}. Note that the only target
> @option{-fsanitize=hwaddress} is currently supported on is AArch64.
>
> +To get more accurate stack traces, it is possible to use options such as
> +@option{-O} (which, for instance, prevents most function inlining),
> +@option{-fno-optimize-sibling-calls} (which prevents optimizing sibling
> +and tail recursive calls), or @option{-fno-ipa-icf} (which disables Identical
> +Code Folding for functions and read-only variables). Since multiple runs
> +of the program may yield backtraces with different addresses due to ASLR,
> +it may be desirable to turn off ASLR: @samp{setarch `uname -m` -R ./prog}.
What about -fasynchronous-unwind-tables? It should help if ASAN ever
reports stray segmentation faults. Whether it also helps in general
depends on whether ASAN maintains ABI around its instrumentation.
Thanks,
Florian
next prev parent reply other threads:[~2022-12-08 7:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 20:34 Marek Polacek
2022-12-08 7:25 ` Florian Weimer [this message]
2022-12-08 14:11 ` Marek Polacek
2022-12-08 14:28 ` Jakub Jelinek
2022-12-08 14:34 ` [PATCH v2] " Marek Polacek
2022-12-08 15:00 ` Jakub Jelinek
2022-12-08 22:56 ` [PATCH v3] " Marek Polacek
2022-12-08 23:11 ` Jakub Jelinek
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=87fsdqjr15.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=polacek@redhat.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).