Skip to content

[NFC] [sanitizers] leave BufferedStackTrace uninit in tests #102251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions compiler-rt/lib/asan/tests/asan_noinst_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ TEST(AddressSanitizer, DISABLED_InternalPrintShadow) {
}

TEST(AddressSanitizer, QuarantineTest) {
BufferedStackTrace stack;
UNINITIALIZED BufferedStackTrace stack;
stack.trace_buffer[0] = 0x890;
stack.size = 1;

Expand All @@ -159,7 +159,7 @@ TEST(AddressSanitizer, QuarantineTest) {
void *ThreadedQuarantineTestWorker(void *unused) {
(void)unused;
u32 seed = my_rand();
BufferedStackTrace stack;
UNINITIALIZED BufferedStackTrace stack;
stack.trace_buffer[0] = 0x890;
stack.size = 1;

Expand Down Expand Up @@ -194,7 +194,7 @@ TEST(AddressSanitizer, ThreadedQuarantineTest) {

void *ThreadedOneSizeMallocStress(void *unused) {
(void)unused;
BufferedStackTrace stack;
UNINITIALIZED BufferedStackTrace stack;
stack.trace_buffer[0] = 0x890;
stack.size = 1;
const size_t kNumMallocs = 1000;
Expand Down Expand Up @@ -238,7 +238,7 @@ static void TestLoadStoreCallbacks(CB cb[2][5]) {
uptr buggy_ptr;

__asan_test_only_reported_buggy_pointer = &buggy_ptr;
BufferedStackTrace stack;
UNINITIALIZED BufferedStackTrace stack;
stack.trace_buffer[0] = 0x890;
stack.size = 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ TEST_F(StackPrintDeathTest, SKIP_ON_SPARC(RequiresNonNullBuffer)) {
#endif // SANITIZER_CAN_FAST_UNWIND

TEST(SlowUnwindTest, ShortStackTrace) {
BufferedStackTrace stack;
UNINITIALIZED BufferedStackTrace stack;
uptr pc = StackTrace::GetCurrentPc();
uptr bp = GET_CURRENT_FRAME();
stack.Unwind(pc, bp, nullptr, false, /*max_depth=*/0);
Expand Down
Loading