I'm working on a problem report for a C++ library compiled with GCC 6. I'm reading through the GCC 6 Changes, New Features, and Fixes, and one of the notes is:
- UndefinedBehaviorSanitizer gained a new sanitization option, -fsanitize=bounds-strict, which enables strict checking of array bounds. In particular, it enables -fsanitize=bounds as well as instrumentation of flexible array member-like arrays.
Is strict bounds checking included in -fsanitize=undefined
? Or do we need both -fsanitize=undefined
and -fsanitize=bounds-strict
?