GCC 5.1 and UndefinedBehaviorSanitizer gained a few new sanitization options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Everyone,

According to https://gcc.gnu.org/gcc-5/changes.html:


<SNIP>
UndefinedBehaviorSanitizer gained a few new sanitization options:

 * -fsanitize=float-divide-by-zero: detect floating-point division by zero;
 * -fsanitize=float-cast-overflow: check that the result of
floating-point type to integer conversions do not overflow;
 * -fsanitize=bounds: enable instrumentation of array bounds and
detect out-of-bounds accesses;
 * -fsanitize=alignment: enable alignment checking, detect various
misaligned objects;
 * -fsanitize=object-size: enable object size checking, detect various
out-of-bounds accesses.
 * -fsanitize=vptr: enable checking of C++ member function calls,
member accesses and some conversions between pointers to base and
derived classes, detect if the referenced object does not have the
correct dynamic type.
</SNIP>

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.

Thanks in advance.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux