From 8f25949f8544d59417d1324a34291bb18d034c5c Mon Sep 17 00:00:00 2001 From: Piraty Date: Thu, 6 Jan 2022 00:16:19 +0100 Subject: [PATCH] heaptrack: update to 1.3.0. --- srcpkgs/heaptrack/patches/musl-fixes.patch | 87 +++++++++------------- srcpkgs/heaptrack/template | 7 +- 2 files changed, 40 insertions(+), 54 deletions(-) diff --git a/srcpkgs/heaptrack/patches/musl-fixes.patch b/srcpkgs/heaptrack/patches/musl-fixes.patch index 61e0d787c8f354..2cfb9a13db0298 100644 --- a/srcpkgs/heaptrack/patches/musl-fixes.patch +++ b/srcpkgs/heaptrack/patches/musl-fixes.patch @@ -1,68 +1,51 @@ -# reason: fix sources to work correctly with musl - --- a/src/track/heaptrack_inject.cpp +++ b/src/track/heaptrack_inject.cpp -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - - #include +@@ -26,6 +26,15 @@ + * @brief Experimental support for symbol overloading after runtime injection. + */ ++#ifndef __WORDSIZE ++#include ++#if ULONG_MAX == 0xffffffffffffffff ++#define __WORDSIZE 64 ++#elif ULONG_MAX == 0xffffffff ++#define __WORDSIZE 32 ++#endif ++#endif ++ + #ifndef ELF_R_SYM + #if __WORDSIZE == 64 + #define ELF_R_SYM(i) ELF64_R_SYM(i) + --- a/src/track/libheaptrack.cpp +++ b/src/track/libheaptrack.cpp -@@ -72,7 +72,7 @@ +@@ -80,7 +80,7 @@ chrono::milliseconds elapsedTime() return chrono::duration_cast(clock::now() - startTime()); } -__pid_t gettid() +pid_t gettid() { + #ifdef __linux__ return syscall(SYS_gettid); - } ---- a/src/track/heaptrack_inject.cpp -+++ b/src/track/heaptrack_inject.cpp -@@ -38,9 +38,10 @@ - * @brief Experimental support for symbol overloading after runtime injection. - */ +--- a/tests/manual/dlopen.cpp ++++ b/tests/manual/dlopen.cpp +@@ -9,6 +9,9 @@ __attribute__((weak)) extern void allocFromLib(bool leak); --#if __WORDSIZE == 64 -+#include -+#if ULONG_MAX == 0xffffffffffffffff - #define ELF_R_SYM(i) ELF64_R_SYM(i) --#elif __WORDSIZE == 32 -+#elif ULONG_MAX == 0xffffffff - #define ELF_R_SYM(i) ELF32_R_SYM(i) - #else - #error unsupported word size - -# simplify stdint.h include which failed on musl due to obscure assumptions ---- a/3rdparty/libbacktrace/backtrace.h -+++ b/3rdparty/libbacktrace/backtrace.h -@@ -36,24 +36,8 @@ - #include - #include + int main() + { ++#ifndef RTLD_DEEPBIND ++ printf("SKIP (RTLD_DEEPBIND undefined)\n"); ++#else + fprintf(stderr, "malloc address: %p\n", dlsym(RTLD_NEXT, "malloc")); + fprintf(stderr, "free address: %p\n", dlsym(RTLD_NEXT, "free")); --/* We want to get a definition for uintptr_t, but we still care about -- systems that don't have . */ --#if defined(__GLIBC__) && __GLIBC__ >= 2 -- --#include -- --#elif defined(HAVE_STDINT_H) -- - #include +@@ -27,6 +30,7 @@ int main() --#else -- --/* Systems that don't have must provide gstdint.h, e.g., -- from GCC_HEADER_STDINT in configure.ac. */ --#include "gstdint.h" -- --#endif -- - #ifdef __cplusplus - extern "C" { - #endif + fprintf(stderr, "malloc address: %p\n", dlsym(RTLD_NEXT, "malloc")); + fprintf(stderr, "free address: %p\n", dlsym(RTLD_NEXT, "free")); ++#endif + + return 0; + } diff --git a/srcpkgs/heaptrack/template b/srcpkgs/heaptrack/template index f4f4c35044f770..8d8859611b4c25 100644 --- a/srcpkgs/heaptrack/template +++ b/srcpkgs/heaptrack/template @@ -1,6 +1,6 @@ # Template file for 'heaptrack' pkgname=heaptrack -version=1.2.0 +version=1.3.0 revision=1 build_style=cmake configure_args="-DHEAPTRACK_BUILD_GUI=ON" @@ -15,7 +15,10 @@ maintainer="Piraty " license="LGPL-2.1-or-later" homepage="https://github.com/KDE/heaptrack" distfiles="https://github.com/KDE/heaptrack/archive/v${version}.tar.gz" -checksum=f299a4846b80e607a412f439e17cddae13f0529701ffdb05eaa7ba878865717e +checksum=794b067772f4e4219bb7b6ff1bc1b2134b1b242e748a2cc5c47626040c631956 + +#../tests/auto/tst_inject.cpp:78: SIGSEGV +make_check=no heaptrack-gui_package() { short_desc+=" - GUI"