Disable integer sanitization in gcIfManyNewRefs.

Prevent gcIfManyNewRefs from emitting runtime errors on
integer sanitized builds by disabling unsigned integer overflow
sanitization.

Test: Compiles, device boots.
Bug: 30969751
Change-Id: I90bbf831d03a60b40e047327d633102444058f69
This commit is contained in:
Ivan Lozano
2017-11-02 14:10:57 -07:00
parent 945b1dc43e
commit 2ea713530f

View File

@@ -162,6 +162,7 @@ static std::atomic<uint32_t> gCollectedAtRefs(0);
// Garbage collect if we've allocated at least GC_INTERVAL refs since the last time.
// TODO: Consider removing this completely. We should no longer be generating GlobalRefs
// that are reclaimed as a result of GC action.
__attribute__((no_sanitize("unsigned-integer-overflow")))
static void gcIfManyNewRefs(JNIEnv* env)
{
uint32_t totalRefs = gNumLocalRefsCreated.load(std::memory_order_relaxed)