summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-client/firefox/files/1000_fix_alignment.patch')
-rw-r--r--www-client/firefox/files/1000_fix_alignment.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/www-client/firefox/files/1000_fix_alignment.patch b/www-client/firefox/files/1000_fix_alignment.patch
new file mode 100644
index 0000000..2ef47c3
--- /dev/null
+++ b/www-client/firefox/files/1000_fix_alignment.patch
@@ -0,0 +1,33 @@
+From: David Mandelin <dmandelin@mozilla.com>
+
+diff --git a/memory/jemalloc/jemalloc.c b/memory/jemalloc/jemalloc.c
+--- a/memory/jemalloc/jemalloc.c
++++ b/memory/jemalloc/jemalloc.c
+@@ -5792,24 +5792,24 @@ __attribute__((noinline))
+ #else
+ inline
+ #endif
+ void *
+ memalign(size_t alignment, size_t size)
+ {
+ void *ret;
+
+- assert(((alignment - 1) & alignment) == 0 && alignment >=
+- sizeof(void *));
++ assert(((alignment - 1) & alignment) == 0);
+
+ if (malloc_init()) {
+ ret = NULL;
+ goto RETURN;
+ }
+
++ alignment = alignment < sizeof(void*) ? sizeof(void*) : alignment;
+ ret = ipalloc(alignment, size);
+
+ RETURN:
+ #ifdef MALLOC_XMALLOC
+ if (opt_xmalloc && ret == NULL) {
+ _malloc_message(_getprogname(),
+ ": (malloc) Error in memalign(): out of memory\n", "", "");
+ abort();
+