Skip to content

Commit

Permalink
Rebased onto other patch renaming Check() to check()
Browse files Browse the repository at this point in the history
  • Loading branch information
hctim committed Jun 25, 2024
1 parent b52722e commit 2dfbf2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ void GuardedPoolAllocator::init(const options::Options &Opts) {
Opts.MaxSimultaneousAllocations == 0)
return;

Check(Opts.SampleRate >= 0, "GWP-ASan Error: SampleRate is < 0.");
Check(Opts.SampleRate < (1 << 30), "GWP-ASan Error: SampleRate is >= 2^30.");
Check(Opts.MaxSimultaneousAllocations >= 0,
check(Opts.SampleRate >= 0, "GWP-ASan Error: SampleRate is < 0.");
check(Opts.SampleRate < (1 << 30), "GWP-ASan Error: SampleRate is >= 2^30.");
check(Opts.MaxSimultaneousAllocations >= 0,
"GWP-ASan Error: MaxSimultaneousAllocations is < 0.");

Check(SingletonPtr == nullptr,
check(SingletonPtr == nullptr,
"There's already a live GuardedPoolAllocator!");
SingletonPtr = this;
Backtrace = Opts.Backtrace;
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/gwp_asan/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void die(const char *Message);
void dieWithErrorCode(const char *Message, int64_t ErrorCode);

// Checks that `Condition` is true, otherwise dies with `Message`.
GWP_ASAN_ALWAYS_INLINE void Check(bool Condition, const char *Message) {
GWP_ASAN_ALWAYS_INLINE void check(bool Condition, const char *Message) {
if (GWP_ASAN_LIKELY(Condition))
return;
die(Message);
Expand Down

0 comments on commit 2dfbf2d

Please sign in to comment.