Hi Ethan,

On Fri, Feb 7, 2014 at 3:59 AM, Ethan Hamilton <[email protected]> wrote:

> Hi,
>
> My name is Ethan Hamilton, I am testing address sanitizer as a debugging
> tool for one of our C++/Linux products (unfortunately, I cannot say which
> one).
>
> I have compiled/linked it with Ubuntu 13.10 (gcc 4.8.1). The binary builds
> without a problem but unfortunately, the binary doesn't start. The binary
> throws an error of the following type during startup,
>
> ERROR: AddressSanitizer: global-buffer-overflow on address
>
> Now, while that might mean that we do have one such problem -I am tempted
> not to think that because this is a basic startup operation on a product
> that has been extensively tested and that is widely deployed-, there might
> be something else going on because our product combines different libraries
> from different sources within TIBCO, some of which are in C (our team does
> its development in C++ though).
>
> I have been trying to see if there is a way to disable that particular
> checker at either compile time or runtime and I don't see any way to
> accomplish that from reading the manual page,
>
> http://code.google.com/p/address-sanitizer/wiki/Flags
>
> I have tried -asan-globals combined with and without -mllvm without
> success. Keep in mind that I am using gcc 4.8.1 not clang. If possible I
> would like to do this by sticking to gcc .
>

-mllvm -asan-globals=0 is obviously an LLVM-specific flag.
GCC has recently implemented "--param asan-globals=0" for the same task,
but that's not in 4.8.1 yet (you may check out the fresh trunk).

You may also try a debugging flag: ASAN_OPTIONS=report_globals=[012]
  0 will disable poisoning for global redzones (redzones will still be
created)
  1 is the default
  2 will additionally print every global at startup -- this may provide you
some clue.

We have not seen false positives caused by asan's global instrumentation
for ages, so I encourage you to investigate the report more carefully.
Sometimes reports about "global-buffer-overflow" are caused by ODR
violations (two modules define different variables with the same names).
If you can provide more info, we may be able to provide more specific
guidance.
And I encourage you to try clang!

--kcc


>
> Thank you in advance,
>
> Ethan.
>
> --
> You received this message because you are subscribed to the Google Groups
> "address-sanitizer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to