Skip to content

Commit

Permalink
[PR] vitalybuka - revert 'HasSuppressions' function
Browse files Browse the repository at this point in the history
  • Loading branch information
cjappl committed Oct 12, 2024
1 parent 888b53d commit 87b29f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion compiler-rt/lib/rtsan/rtsan_assertions.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void ExpectNotRealtime(Context &context, const DiagnosticsInfo &info,
stack.Unwind(info.pc, info.bp, nullptr,
__sanitizer::common_flags()->fast_unwind_on_fatal);

if (HasSuppressions() && IsStackTraceSuppressed(stack))
if (IsStackTraceSuppressed(stack))
return;

OnViolation(stack, info);
Expand Down
5 changes: 2 additions & 3 deletions compiler-rt/lib/rtsan/rtsan_suppressions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ static const char *ConvertTypeToFlagName(ErrorType Type) {
UNREACHABLE("unknown ErrorType!");
}

bool __rtsan::HasSuppressions() { return suppression_ctx != nullptr; }

void __rtsan::InitializeSuppressions() {
CHECK_EQ(nullptr, suppression_ctx);

Expand All @@ -67,7 +65,8 @@ void __rtsan::InitializeSuppressions() {
}

bool __rtsan::IsStackTraceSuppressed(const StackTrace &stack) {
CHECK(HasSuppressions());
if (suppression_ctx == nullptr)
return false;

const char *call_stack_flag =
ConvertTypeToFlagName(ErrorType::CallStackContains);
Expand Down
1 change: 0 additions & 1 deletion compiler-rt/lib/rtsan/rtsan_suppressions.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
namespace __rtsan {

void InitializeSuppressions();
bool HasSuppressions();
bool IsStackTraceSuppressed(const __sanitizer::StackTrace &stack);

} // namespace __rtsan

0 comments on commit 87b29f0

Please sign in to comment.