ATLAS Offline Software
Namespaces | Functions
ubsan_suppress.h File Reference

Helper for suppressing ubsan warnings. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 CxxUtils
 

Functions

void CxxUtils::ubsan_suppress (void(*func)())
 Helper for suppressing ubsan warnings. More...
 

Detailed Description

Helper for suppressing ubsan warnings.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Mar, 2017 With gcc6, not all ubsan warnings can be suppressed via the suppression file (for example, type mismatch errors where the object has an invalid vptr).

However, ubsan will report warnings only once for any given source location. So we can effectively suppress warnings by triggering the warning with stderr pointing to /dev/null. You can do that by calling the ubsan_suppress function, passing it a function to call with stderr redirected to /dev/null.

Definition in file ubsan_suppress.h.