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

--- Comment #5 from Peter Wu <peter at lekensteyn dot nl> ---
(In reply to Kostya Serebryany from comment #4)

> I think I know what your problem is. 
> In C, the globals by default have common linkage and asan does not
> instrument them at all and thus can not properly report them. 
> 
> Use -fno-common with C. 
> https://code.google.com/p/address-sanitizer/wiki/Flags

That seems to work, but if the flag is not set, can't something smarter be done
instead of crashing?

How does your GCC behave with the test case? The sanitizer code in GCC is
imported from Clang, I believe, so it probably does not crash either?

Reply via email to