Skip to content

Commit 5e5cce5

Browse files
committed
[NFC] [sanitizers] leave BufferedStackTrace uninit in tests
This is for consistency with the production code Pull Request: #102251
1 parent 930ca76 commit 5e5cce5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compiler-rt/lib/asan/tests/asan_noinst_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ TEST(AddressSanitizer, DISABLED_InternalPrintShadow) {
137137
}
138138

139139
TEST(AddressSanitizer, QuarantineTest) {
140-
BufferedStackTrace stack;
140+
UNINITIALIZED BufferedStackTrace stack;
141141
stack.trace_buffer[0] = 0x890;
142142
stack.size = 1;
143143

@@ -159,7 +159,7 @@ TEST(AddressSanitizer, QuarantineTest) {
159159
void *ThreadedQuarantineTestWorker(void *unused) {
160160
(void)unused;
161161
u32 seed = my_rand();
162-
BufferedStackTrace stack;
162+
UNINITIALIZED BufferedStackTrace stack;
163163
stack.trace_buffer[0] = 0x890;
164164
stack.size = 1;
165165

@@ -194,7 +194,7 @@ TEST(AddressSanitizer, ThreadedQuarantineTest) {
194194

195195
void *ThreadedOneSizeMallocStress(void *unused) {
196196
(void)unused;
197-
BufferedStackTrace stack;
197+
UNINITIALIZED BufferedStackTrace stack;
198198
stack.trace_buffer[0] = 0x890;
199199
stack.size = 1;
200200
const size_t kNumMallocs = 1000;
@@ -238,7 +238,7 @@ static void TestLoadStoreCallbacks(CB cb[2][5]) {
238238
uptr buggy_ptr;
239239

240240
__asan_test_only_reported_buggy_pointer = &buggy_ptr;
241-
BufferedStackTrace stack;
241+
UNINITIALIZED BufferedStackTrace stack;
242242
stack.trace_buffer[0] = 0x890;
243243
stack.size = 1;
244244

compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ TEST_F(StackPrintDeathTest, SKIP_ON_SPARC(RequiresNonNullBuffer)) {
259259
#endif // SANITIZER_CAN_FAST_UNWIND
260260

261261
TEST(SlowUnwindTest, ShortStackTrace) {
262-
BufferedStackTrace stack;
262+
UNINITIALIZED BufferedStackTrace stack;
263263
uptr pc = StackTrace::GetCurrentPc();
264264
uptr bp = GET_CURRENT_FRAME();
265265
stack.Unwind(pc, bp, nullptr, false, /*max_depth=*/0);

0 commit comments

Comments
 (0)