Skip to content

Commit

Permalink
Only apply no_sanitize attribute in Clang, not G++
Browse files Browse the repository at this point in the history
azonenberg committed Jul 21, 2017
1 parent 8eff19d commit fde41d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/xbpar/PAREngine.cpp
Original file line number Diff line number Diff line change
@@ -46,7 +46,9 @@ PAREngine::~PAREngine()
//This particular piece of code was stolen from the "simple C implementation."
//See http://www.pcg-random.org for more information
//Unsigned integer overflow here is intentional, so tell ubsan to ignore it
#ifdef __clang__
__attribute__((no_sanitize("integer")))
#endif
uint32_t PAREngine::RandomNumber()
{
uint64_t oldstate = m_randomState;

0 comments on commit fde41d2

Please sign in to comment.