summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-03-13 15:07:21 +0000
committerNick Mathewson <nickm@torproject.org>2008-03-13 15:07:21 +0000
commitfc33b331dfd29488ad2c3f18692e4be8be81324b (patch)
tree957bf14a3261c564bf42c2c87369f9943d8d6630
parent9349137f6e957cfe866e7e6c65defe34c5eb2219 (diff)
downloadtor-fc33b331dfd29488ad2c3f18692e4be8be81324b.tar.gz
tor-fc33b331dfd29488ad2c3f18692e4be8be81324b.zip
r18785@catbus: nickm | 2008-03-13 11:07:18 -0400
Backport: Have OpenBSD_malloc_Linux.c use SIZE_T_MAX from torint.h, instead of checking cpu macros. There is always one more cpu you havent checked for. fixes bug 625. svn:r14002
-rw-r--r--ChangeLog2
-rw-r--r--src/common/OpenBSD_malloc_Linux.c14
2 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 9f912524c6..b5721e9688 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,8 @@ Changes in version 0.2.0.22-rc - 2008-03-??
(sometimes) to buffer data for the network. Looking at different BIOs
could result in write counts on the order of ULONG_MAX. Fix for bug
614. Bugfix on 0.1.2.x.
+ - Make --enable-openbsd-malloc work correctly on Linux with alpha CPUs.
+ Fixes bug 625. Bugfix on 0.2.0.x.
Changes in version 0.2.0.21-rc - 2008-03-02
diff --git a/src/common/OpenBSD_malloc_Linux.c b/src/common/OpenBSD_malloc_Linux.c
index b043231734..802517654a 100644
--- a/src/common/OpenBSD_malloc_Linux.c
+++ b/src/common/OpenBSD_malloc_Linux.c
@@ -54,6 +54,7 @@
#include <limits.h>
#include <errno.h>
#include <err.h>
+#include "torint.h"
//#include "thread_private.h"
@@ -1926,11 +1927,14 @@ realloc(void *ptr, size_t size)
return (r);
}
-#if defined(__i386__)||defined(__arm__)||defined(__powerpc__)
-#define SIZE_MAX 0xffffffff
-#endif
-#if defined(__x86_64__)
-#define SIZE_MAX 0xffffffffffffffff
+#ifndef SIZE_MAX
+//#if defined(__i386__)||defined(__arm__)||defined(__powerpc__)
+//#define SIZE_MAX 0xffffffff
+//#endif
+//#if defined(__x86_64__)
+//#define SIZE_MAX 0xffffffffffffffff
+//#endif
+#define SIZE_MAX SIZE_T_MAX
#endif
void *