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 via email to