[compiler-rt] d17eade - Do not call disable / enable on null depot (#82542)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 21 14:28:39 PST 2024
Author: Florian Mayer
Date: 2024-02-21T14:28:34-08:00
New Revision: d17eade22ab9a65144a2bbd538f47924eed6b87d
URL: https://github.com/llvm/llvm-project/commit/d17eade22ab9a65144a2bbd538f47924eed6b87d
DIFF: https://github.com/llvm/llvm-project/commit/d17eade22ab9a65144a2bbd538f47924eed6b87d.diff
LOG: Do not call disable / enable on null depot (#82542)
depot can be null if allocation_ring_buffer_size=0
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 080ba42ad44497..f3c3d757c9f128 100644
--- a/compiler-rt/lib/scudo/standalone/combined.h
+++ b/compiler-rt/lib/scudo/standalone/combined.h
@@ -688,12 +688,14 @@ class Allocator {
Quarantine.disable();
Primary.disable();
Secondary.disable();
- Depot->disable();
+ if (Depot)
+ Depot->disable();
}
void enable() NO_THREAD_SAFETY_ANALYSIS {
initThreadMaybe();
- Depot->enable();
+ if (Depot)
+ Depot->enable();
Secondary.enable();
Primary.enable();
Quarantine.enable();
More information about the llvm-commits
mailing list