public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "y.gribov at samsung dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/59063] [4.9 Regression] ASAN: segfault in __interceptor_clock_gettime
Date: Mon, 11 Nov 2013 05:38:00 -0000	[thread overview]
Message-ID: <bug-59063-4-pNLxh5nFkK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-59063-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59063

Yury Gribov <y.gribov at samsung dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |y.gribov at samsung dot com

--- Comment #1 from Yury Gribov <y.gribov at samsung dot com> ---
(In reply to Joost VandeVondele from comment #0)
> with -fsanitize=address the following code works on 4.8 branch bug segfaults
> with 4.9

I can confirm. Here is what's happening: clock_gettime is defined in librt.so
which is _not_ linked to the executable. On the other hand, libasan.so defines
this symbol in sanitizer_common_interceptors.inc. This interceptor will try to
call the original clock_gettime. The symbol will not be found which will result
in jump to NULL.

I'm not sure how to address this, perhaps we should link libasan against
librt.so on Linux?

I'd also suggest to make libasan issue warning in case "real" symbol obtained
in GetRealFunctionAddress is NULL. This would allow us to detect errors like
this faster.

-Y


  reply	other threads:[~2013-11-11  5:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-09 19:53 [Bug sanitizer/59063] New: " Joost.VandeVondele at mat dot ethz.ch
2013-11-11  5:38 ` y.gribov at samsung dot com [this message]
2013-11-11  6:16 ` [Bug sanitizer/59063] " eugeni.stepanov at gmail dot com
2013-11-11  6:32 ` pinskia at gcc dot gnu.org
2013-11-11  7:09 ` y.gribov at samsung dot com
2013-11-11  7:12 ` y.gribov at samsung dot com
2013-11-11  7:19 ` pinskia at gcc dot gnu.org
2013-11-11  7:27 ` y.gribov at samsung dot com
2013-11-11  7:33 ` jakub at gcc dot gnu.org
2013-11-11  7:42 ` y.gribov at samsung dot com
2013-11-11  7:44 ` jakub at gcc dot gnu.org
2013-11-11  7:47 ` eugeni.stepanov at gmail dot com
2013-11-11 10:17 ` y.gribov at samsung dot com
2013-11-11 10:18 ` y.gribov at samsung dot com
2013-11-11 10:22 ` y.gribov at samsung dot com
2013-11-11 11:05 ` eugeni.stepanov at gmail dot com
2013-11-11 15:45 ` rguenth at gcc dot gnu.org
2013-11-14 12:14 ` y.gribov at samsung dot com
2013-11-14 12:38 ` eugeni.stepanov at gmail dot com
2013-11-15  8:14 ` y.gribov at samsung dot com
2013-11-15 13:02 ` Joost.VandeVondele at mat dot ethz.ch
2013-11-21 14:37 ` rguenth at gcc dot gnu.org
2013-11-22 11:02 ` kcc at gcc dot gnu.org
2013-11-29 12:30 ` ygribov at gcc dot gnu.org
2013-11-29 12:32 ` y.gribov at samsung dot com
2013-11-29 12:43 ` Joost.VandeVondele at mat dot ethz.ch
2013-12-03 16:01 ` jakub at gcc dot gnu.org

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-59063-4-pNLxh5nFkK@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).