diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-07-21 20:44:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-07-21 20:44:55 +0100 |
commit | aa870ba91722a8d38ba5103297a6aa4abb54e5bc (patch) | |
tree | f91c8d19a619a57e109d68ad33c2b791a35df473 /dev-util/valgrind/files/valgrind-3.13.0-malloc.patch | |
parent | 2480f36bfb3d39469cc44843d1fe664bd40443a3 (diff) |
gentoo auto-resync : 21:07:2022 - 20:44:55
Diffstat (limited to 'dev-util/valgrind/files/valgrind-3.13.0-malloc.patch')
-rw-r--r-- | dev-util/valgrind/files/valgrind-3.13.0-malloc.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/dev-util/valgrind/files/valgrind-3.13.0-malloc.patch b/dev-util/valgrind/files/valgrind-3.13.0-malloc.patch new file mode 100644 index 000000000000..ac6d90fef50f --- /dev/null +++ b/dev-util/valgrind/files/valgrind-3.13.0-malloc.patch @@ -0,0 +1,26 @@ +From: https://git.alpinelinux.org/aports/tree/main/valgrind/ + +--- valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c ++++ valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c +@@ -765,13 +765,15 @@ static void init(void); + DO_INIT; \ + MALLOC_TRACE("realloc(%p,%llu)", ptrV, (ULong)new_size ); \ + \ +- if (ptrV == NULL) \ +- /* We need to call a malloc-like function; so let's use \ +- one which we know exists. */ \ +- return VG_REPLACE_FUNCTION_EZU(10010,VG_Z_LIBC_SONAME,malloc) \ +- (new_size); \ ++ if (ptrV == NULL) { \ ++ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(new_size); \ ++ v = (void*)VALGRIND_NON_SIMD_CALL1( info.tl_malloc, new_size ); \ ++ MALLOC_TRACE(" = %p\n", v ); \ ++ return v; \ ++ } \ + if (new_size <= 0) { \ +- VG_REPLACE_FUNCTION_EZU(10050,VG_Z_LIBC_SONAME,free)(ptrV); \ ++ if (ptrV != NULL) \ ++ VALGRIND_NON_SIMD_CALL1( info.tl_free, ptrV ); \ + MALLOC_TRACE(" = 0\n"); \ + return NULL; \ + } \ |