This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC 5.1 and UndefinedBehaviorSanitizer gained a few new sanitization options


On 24 March 2016 at 03:53, Jeffrey Walton wrote:
> When using GCC 5.1 or above with -fsanitize=undefined, are these
> checks included? Or do they need to be enabled individually? The
> reason I ask is bounds checking, alignment checking and object type
> violations are clearly UB in C/C++, so I'm thinking they should be
> enabled for -fsanitize=undefined.

Yes, most of them are enabled by -fsanitize=undefined, except as noted
in the manual:

Unlike other similar options, -fsanitize=float-divide-by-zero is not
enabled by -fsanitize=undefined, [...]..
Unlike other similar options, -fsanitize=float-cast-overflow is not
enabled by -fsanitize=undefined.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]