diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2014-07-07 03:46:31 +0800 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2014-07-07 03:46:31 +0800 |
commit | d190fa6790bb6758159137c695e7a2399c1cff85 (patch) | |
tree | 00d3578b2f5b487d4225025d12ec65a9eecfb378 | |
parent | b05e15413446c9ad1d4a016c23890975a35c5591 (diff) | |
download | freebsd-ports-gnome-d190fa6790bb6758159137c695e7a2399c1cff85.tar.gz freebsd-ports-gnome-d190fa6790bb6758159137c695e7a2399c1cff85.tar.zst freebsd-ports-gnome-d190fa6790bb6758159137c695e7a2399c1cff85.zip |
umem: fix the insta-crash of libumem
On amd64, libumem simply crashes because the size of the the cpu cache
structure is not a power of two. We need to pad it on LP64 architectures as
well.
Reviewed by: bapt
Approved by: bapt
-rw-r--r-- | devel/umem/Makefile | 5 | ||||
-rw-r--r-- | devel/umem/files/patch-umem_impl.h | 15 |
2 files changed, 17 insertions, 3 deletions
diff --git a/devel/umem/Makefile b/devel/umem/Makefile index 0f1eafc919d4..17f65be31455 100644 --- a/devel/umem/Makefile +++ b/devel/umem/Makefile @@ -3,15 +3,14 @@ PORTNAME= umem PORTVERSION= 1.0.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MASTER_SITES= https://labs.omniti.com/portableumem/releases/${PORTVERSION:R}/ MAINTAINER= ports@FreeBSD.org COMMENT= Port of the Solaris memory allocator -USES= libtool:keepla -USE_BZIP2= yes +USES= libtool:keepla tar:bzip2 USE_LDCONFIG= yes GNU_CONFIGURE= yes ONLY_FOR_ARCHS= i386 amd64 diff --git a/devel/umem/files/patch-umem_impl.h b/devel/umem/files/patch-umem_impl.h new file mode 100644 index 000000000000..fcc1169b7915 --- /dev/null +++ b/devel/umem/files/patch-umem_impl.h @@ -0,0 +1,15 @@ +--- umem_impl.h.orig 2014-07-04 11:29:34.393156748 -0700 ++++ umem_impl.h 2014-07-04 11:29:54.599155604 -0700 +@@ -255,12 +255,7 @@ + int cc_prounds; /* number of objects in previous mag */ + int cc_magsize; /* number of rounds in a full mag */ + int cc_flags; /* CPU-local copy of cache_flags */ +-#if (!defined(_LP64) || defined(UMEM_PTHREAD_MUTEX_TOO_BIG)) && !defined(_WIN32) +- /* on win32, UMEM_CPU_PAD evaluates to zero, and the MS compiler +- * won't allow static initialization of arrays containing structures +- * that contain zero size arrays */ + char cc_pad[UMEM_CPU_PAD]; /* for nice alignment (32-bit) */ +-#endif + } umem_cpu_cache_t; + + /* |