[compiler-rt] f2819ee - scudo: Work around gcc 8 conversion warning.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 11:26:24 PDT 2021


Author: Peter Collingbourne
Date: 2021-04-23T11:26:12-07:00
New Revision: f2819ee6cc46c89d049e8dca205c269e7c40cdc2

URL: https://github.com/llvm/llvm-project/commit/f2819ee6cc46c89d049e8dca205c269e7c40cdc2
DIFF: https://github.com/llvm/llvm-project/commit/f2819ee6cc46c89d049e8dca205c269e7c40cdc2.diff

LOG: scudo: Work around gcc 8 conversion warning.

Should fix:
https://lab.llvm.org/buildbot#builders/99/builds/2953

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/combined.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/combined.h b/compiler-rt/lib/scudo/standalone/combined.h
index 7ae6086dd8f1..4c95b8764c3f 100644
--- a/compiler-rt/lib/scudo/standalone/combined.h
+++ b/compiler-rt/lib/scudo/standalone/combined.h
@@ -1049,8 +1049,10 @@ class Allocator {
     const bool BypassQuarantine = !Quarantine.getCacheSize() ||
                                   ((Size - 1) >= QuarantineMaxChunkSize) ||
                                   !NewHeader.ClassId;
-    NewHeader.State =
-        BypassQuarantine ? Chunk::State::Available : Chunk::State::Quarantined;
+    if (BypassQuarantine)
+      NewHeader.State = Chunk::State::Available;
+    else
+      NewHeader.State = Chunk::State::Quarantined;
     NewHeader.OriginOrWasZeroed = useMemoryTagging<Params>(Options) &&
                                   NewHeader.ClassId &&
                                   !TSDRegistry.getDisableMemInit();


        


More information about the llvm-commits mailing list