Skip to content

Commit

Permalink
Do not call disable / enable on null depot (llvm#82542)
Browse files Browse the repository at this point in the history
depot can be null if allocation_ring_buffer_size=0
  • Loading branch information
fmayer committed Feb 21, 2024
1 parent 9eff001 commit d17eade
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions compiler-rt/lib/scudo/standalone/combined.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d17eade

Please sign in to comment.