On Tue, 23 Feb 2021 17:21:46 +0100, Theo Buehler <[email protected]> wrote:
> So danj conned me into looking at Redis again... Thank you so much! > I replaced some lua related patches with sed + CFLAGS and dropped two > hunks in our diff to deps/Makefile which tended to produce conflicts. Awesome! > I also decided to move the server and the sentinel from sbin to bin to > avoid some Makefile patching that conflicted more than once (the new > symlinks would have added complexity to that hunk). Yeah f those patches. I spent too much time on this conflicts. Index: patches/patch-src_zmalloc_c > =================================================================== > RCS file: patches/patch-src_zmalloc_c > diff -N patches/patch-src_zmalloc_c Can we go instead with upstream diff (since we're going to run it sooner or later)? $OpenBSD$ Backport from upstream: https://github.com/redis/redis/pull/8533/commits/cdfa9601d7b374b3ef6859a4c093046ad331f903 Index: src/zmalloc.c --- src/zmalloc.c.orig +++ src/zmalloc.c @@ -32,6 +32,7 @@ #include <stdlib.h> #include <stdint.h> #include <unistd.h> +#include <assert.h> /* This function provide us access to the original libc free(). This is useful * for instance to free results obtained by backtrace_symbols(). We need @@ -49,18 +50,14 @@ void zlibc_free(void *ptr) { #ifdef HAVE_MALLOC_SIZE #define PREFIX_SIZE (0) +#define ASSERT_NO_SIZE_OVERFLOW(sz) #else #if defined(__sun) || defined(__sparc) || defined(__sparc__) #define PREFIX_SIZE (sizeof(long long)) #else #define PREFIX_SIZE (sizeof(size_t)) #endif -#endif - -#if PREFIX_SIZE > 0 #define ASSERT_NO_SIZE_OVERFLOW(sz) assert((sz) + PREFIX_SIZE > (sz)) -#else -#define ASSERT_NO_SIZE_OVERFLOW(sz) #endif /* Explicitly override malloc/free etc when using tcmalloc. */ (ftp -o /usr/ports/databases/redis/patches/patch-src_zmalloc_c https://static.chown.me/private/paste/e89b08cfaa638fd0c8a424a382ecd6cd9a60639473053314ca65553ee3eb4072 if it helps) ok danj@ either way Cheers, Daniel
