summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/valgrind/APKBUILD14
-rw-r--r--user/valgrind/realloc.patch24
2 files changed, 32 insertions, 6 deletions
diff --git a/user/valgrind/APKBUILD b/user/valgrind/APKBUILD
index d79ba75c4..fc710b4b2 100644
--- a/user/valgrind/APKBUILD
+++ b/user/valgrind/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=valgrind
pkgver=3.13.0
-pkgrel=4
+pkgrel=5
pkgdesc="A tool to help find memory-management problems in programs"
url="http://valgrind.org/"
arch="all"
@@ -15,10 +15,11 @@ makedepends="autoconf automake libtool bash perl cmd:which"
options="!strip !check"
subpackages="$pkgname-dev $pkgname-doc"
source="ftp://sourceware.org/pub/$pkgname/$pkgname-$pkgver.tar.bz2
- uclibc.patch
- arm.patch
0001-Ensure-ELFv2-is-supported-on-PPC64.patch
+ arm.patch
+ realloc.patch
suppressions.patch
+ uclibc.patch
"
prepare() {
@@ -65,7 +66,8 @@ package() {
}
sha512sums="34e1013cd3815d30a459b86220e871bb0a6209cc9e87af968f347083693779f022e986f211bdf1a5184ad7370cde12ff2cfca8099967ff94732970bd04a97009 valgrind-3.13.0.tar.bz2
-d59a10db9037e120df2ee94a103402ca95a79abee9d8be63e4e1bca29c82dca775cc402a79b854ec11a2160a4d2da202c237369418e221d1925267ea2613fd5d uclibc.patch
-9ee297d1b2b86891584443ad0caadc4977e1447979611ccf1cc55dbee61911b0b063bc4ad936d86c451cedae410cb3219b5a088b2ad0aa17df182d564fe36cfe arm.patch
71afb12748f69f0976a299c65572818b70cbce5d04f230a49a50f114351d8083c59a9e197cefbcb9145806797ff4d1d54488f50342b680c9a2b76e4a7f7cf305 0001-Ensure-ELFv2-is-supported-on-PPC64.patch
-d011b2769d35ca3206967e6dac9f3fb24a6496e5bbfdc73342382245c89375b09d6948b10ba3cf8aa0050c79c0dd13b75764aec0ec5c6ac479fa930941067747 suppressions.patch"
+9ee297d1b2b86891584443ad0caadc4977e1447979611ccf1cc55dbee61911b0b063bc4ad936d86c451cedae410cb3219b5a088b2ad0aa17df182d564fe36cfe arm.patch
+57086a768f3876b26b0e507bc159a73f0955f03d5af8cc30e21103e348ca67f2e58b5555a5a97f299751c6602692ad43d8346bb68a80917d740fb4d65bba9665 realloc.patch
+d011b2769d35ca3206967e6dac9f3fb24a6496e5bbfdc73342382245c89375b09d6948b10ba3cf8aa0050c79c0dd13b75764aec0ec5c6ac479fa930941067747 suppressions.patch
+d59a10db9037e120df2ee94a103402ca95a79abee9d8be63e4e1bca29c82dca775cc402a79b854ec11a2160a4d2da202c237369418e221d1925267ea2613fd5d uclibc.patch"
diff --git a/user/valgrind/realloc.patch b/user/valgrind/realloc.patch
new file mode 100644
index 000000000..d0eb795b8
--- /dev/null
+++ b/user/valgrind/realloc.patch
@@ -0,0 +1,24 @@
+--- 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; \
+ } \