Skip to content

Commit a79338c

Browse files
committed
Add missing utils_annotate_memory_undefined()
Signed-off-by: Lukasz Dorau <[email protected]>
1 parent b02c3c5 commit a79338c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/base_alloc/base_alloc_global.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ void *umf_ba_global_aligned_alloc(size_t size, size_t alignment) {
191191
return NULL;
192192
}
193193
VALGRIND_DO_MALLOCLIKE_BLOCK(ptr, size, 0, 0);
194+
utils_annotate_memory_undefined(ptr, size);
194195
return add_metadata_and_align(ptr, size, alignment);
195196
}
196197

@@ -203,6 +204,7 @@ void *umf_ba_global_aligned_alloc(size_t size, size_t alignment) {
203204
return NULL;
204205
}
205206
VALGRIND_DO_MALLOCLIKE_BLOCK(ptr, size, 0, 0);
207+
utils_annotate_memory_undefined(ptr, size);
206208
return add_metadata_and_align(ptr, size, alignment);
207209
}
208210

src/base_alloc/base_alloc_linear.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ void *umf_ba_linear_alloc(umf_ba_linear_pool_t *pool, size_t size) {
186186
_DEBUG_EXECUTE(pool->metadata.global_n_allocs++);
187187
_DEBUG_EXECUTE(ba_debug_checks(pool));
188188
VALGRIND_DO_MALLOCLIKE_BLOCK(ptr, aligned_size, 0, 0);
189+
utils_annotate_memory_undefined(ptr, aligned_size);
189190
utils_mutex_unlock(&pool->metadata.lock);
190191

191192
return ptr;

0 commit comments

Comments
 (0)