]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix signedness-of-char problem which caused this to segfault on ppc32-linux.
authorJulian Seward <jseward@acm.org>
Fri, 19 Aug 2005 09:07:34 +0000 (09:07 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 19 Aug 2005 09:07:34 +0000 (09:07 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4462

memcheck/tests/oset_test.c

index 7868f2c218a6a0f9b34cc6df195e90bfc3356cb4..1b9ff1fcedcd0ed1bf140bfc61a9eb32dff6bf8c 100644 (file)
 #include "pub_core_libcprint.h"
 
 // I need this to avoid some signedness warnings, not sure why
-#define Char char
+// #define Char char
+// jrs 19 Aug 2005: m_oset.c relies on Char being a signed char.
+// It appears that plain 'char' on ppc32 is unsigned and so the
+// above #define screws up the AVL tree balancing logic and
+// leads to segfaults.  Commenting it out and using the standard
+// definition of Char from pub_core_basics.h seems a good solution
+// as that has the same signedness on all platforms.
 
 // Crudely redirect various VG_(foo)() functions to their libc equivalents.
 #undef vg_assert