tags 647627 patch thanks Hi,
It crashes because of the improper alignment of allocated memory, due to wrong setting of PREFIX size on sparc. Attached patch fixes it. I believe that you should be able to drop 'defined(__sun)' completely from this clause, as Solaris on x86 hardware probably does not have strict alignment requirements, but I don't have a way to test that. By the way, after applying the patch and building redis-server I tried running the test suite (invoked by 'make test') and it eventually dies after about 15-20 minutes of execution (after executing quite a few tests successfully). Does not look like it's related to this bug, but I thought you might want to investigate. Best regards, -- Jurij Smakov ju...@wooyd.org Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC
diff -aur a/src/zmalloc.c b/src/zmalloc.c --- a/src/zmalloc.c 2011-07-22 11:22:26.000000000 +0100 +++ b/src/zmalloc.c 2011-11-05 10:21:09.220008726 +0000 @@ -38,7 +38,7 @@ #ifdef HAVE_MALLOC_SIZE #define PREFIX_SIZE (0) #else -#if defined(__sun) +#if defined(__sun) || defined(__sparc) || defined(__sparc__) #define PREFIX_SIZE (sizeof(long long)) #else #define PREFIX_SIZE (sizeof(size_t))