@@ -95,13 +95,13 @@ static void *DFsanAllocate(uptr size, uptr alignment, bool zeroise) {
95
95
size);
96
96
return nullptr ;
97
97
}
98
- BufferedStackTrace stack;
98
+ UNINITIALIZED BufferedStackTrace stack;
99
99
ReportAllocationSizeTooBig (size, max_malloc_size, &stack);
100
100
}
101
101
if (UNLIKELY (IsRssLimitExceeded ())) {
102
102
if (AllocatorMayReturnNull ())
103
103
return nullptr ;
104
- BufferedStackTrace stack;
104
+ UNINITIALIZED BufferedStackTrace stack;
105
105
ReportRssLimitExceeded (&stack);
106
106
}
107
107
DFsanThread *t = GetCurrentThread ();
@@ -118,7 +118,7 @@ static void *DFsanAllocate(uptr size, uptr alignment, bool zeroise) {
118
118
SetAllocatorOutOfMemory ();
119
119
if (AllocatorMayReturnNull ())
120
120
return nullptr ;
121
- BufferedStackTrace stack;
121
+ UNINITIALIZED BufferedStackTrace stack;
122
122
ReportOutOfMemory (size, &stack);
123
123
}
124
124
Metadata *meta =
@@ -175,7 +175,7 @@ void *DFsanCalloc(uptr nmemb, uptr size) {
175
175
if (UNLIKELY (CheckForCallocOverflow (size, nmemb))) {
176
176
if (AllocatorMayReturnNull ())
177
177
return nullptr ;
178
- BufferedStackTrace stack;
178
+ UNINITIALIZED BufferedStackTrace stack;
179
179
ReportCallocOverflow (nmemb, size, &stack);
180
180
}
181
181
return DFsanAllocate (nmemb * size, sizeof (u64 ), true /* zeroise*/ );
@@ -232,7 +232,7 @@ void *dfsan_reallocarray(void *ptr, uptr nmemb, uptr size) {
232
232
errno = errno_ENOMEM;
233
233
if (AllocatorMayReturnNull ())
234
234
return nullptr ;
235
- BufferedStackTrace stack;
235
+ UNINITIALIZED BufferedStackTrace stack;
236
236
ReportReallocArrayOverflow (nmemb, size, &stack);
237
237
}
238
238
return dfsan_realloc (ptr, nmemb * size);
@@ -249,7 +249,7 @@ void *dfsan_pvalloc(uptr size) {
249
249
errno = errno_ENOMEM;
250
250
if (AllocatorMayReturnNull ())
251
251
return nullptr ;
252
- BufferedStackTrace stack;
252
+ UNINITIALIZED BufferedStackTrace stack;
253
253
ReportPvallocOverflow (size, &stack);
254
254
}
255
255
// pvalloc(0) should allocate one page.
@@ -262,7 +262,7 @@ void *dfsan_aligned_alloc(uptr alignment, uptr size) {
262
262
errno = errno_EINVAL;
263
263
if (AllocatorMayReturnNull ())
264
264
return nullptr ;
265
- BufferedStackTrace stack;
265
+ UNINITIALIZED BufferedStackTrace stack;
266
266
ReportInvalidAlignedAllocAlignment (size, alignment, &stack);
267
267
}
268
268
return SetErrnoOnNull (DFsanAllocate (size, alignment, false /* zeroise*/ ));
@@ -273,7 +273,7 @@ void *dfsan_memalign(uptr alignment, uptr size) {
273
273
errno = errno_EINVAL;
274
274
if (AllocatorMayReturnNull ())
275
275
return nullptr ;
276
- BufferedStackTrace stack;
276
+ UNINITIALIZED BufferedStackTrace stack;
277
277
ReportInvalidAllocationAlignment (alignment, &stack);
278
278
}
279
279
return SetErrnoOnNull (DFsanAllocate (size, alignment, false /* zeroise*/ ));
@@ -283,7 +283,7 @@ int dfsan_posix_memalign(void **memptr, uptr alignment, uptr size) {
283
283
if (UNLIKELY (!CheckPosixMemalignAlignment (alignment))) {
284
284
if (AllocatorMayReturnNull ())
285
285
return errno_EINVAL;
286
- BufferedStackTrace stack;
286
+ UNINITIALIZED BufferedStackTrace stack;
287
287
ReportInvalidPosixMemalignAlignment (alignment, &stack);
288
288
}
289
289
void *ptr = DFsanAllocate (size, alignment, false /* zeroise*/ );
0 commit comments