From bf5b614b29a70fa7be41aceddff679ebf9678495 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 | 78 ++++++++-------------- srcpkgs/heaptrack/template | 7 +- 2 files changed, 33 insertions(+), 52 deletions(-) diff --git a/srcpkgs/heaptrack/patches/musl-fixes.patch b/srcpkgs/heaptrack/patches/musl-fixes.patch index 61e0d787c8f3..5ed862546682 100644 --- a/srcpkgs/heaptrack/patches/musl-fixes.patch +++ b/srcpkgs/heaptrack/patches/musl-fixes.patch @@ -1,68 +1,46 @@ -# reason: fix sources to work correctly with musl - +diff --git a/src/track/heaptrack_inject.cpp b/src/track/heaptrack_inject.cpp +index fe8d174..3acd7e4 100644 --- a/src/track/heaptrack_inject.cpp +++ b/src/track/heaptrack_inject.cpp -@@ -27,6 +27,7 @@ - #include - #include +@@ -17,6 +17,9 @@ #include -+#include #include ++#ifndef __GLIBC__ ++#include /* __WORDSIZE */ ++#endif + #include + +diff --git a/src/track/libheaptrack.cpp b/src/track/libheaptrack.cpp +index 70f74eb..51d64e4 100644 --- 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. - */ +diff --git a/tests/manual/dlopen.cpp b/tests/manual/dlopen.cpp +index bc1972d..5c3d1fc 100644 +--- a/tests/manual/dlopen.cpp ++++ b/tests/manual/dlopen.cpp +@@ -9,6 +9,7 @@ __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() + { ++#ifdef RTLD_DEEPBIND + 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 +@@ -28,5 +29,6 @@ int main() + fprintf(stderr, "malloc address: %p\n", dlsym(RTLD_NEXT, "malloc")); + fprintf(stderr, "free address: %p\n", dlsym(RTLD_NEXT, "free")); --#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 ++#endif + return 0; + } diff --git a/srcpkgs/heaptrack/template b/srcpkgs/heaptrack/template index f4f4c35044f7..8d8859611b4c 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"