--- abuse-0.7.1/src/stack.hpp.fix 2008-03-02 15:23:26.000000000 +0100
+++ abuse-0.7.1/src/stack.hpp 2008-03-03 22:24:25.000000000 +0100
@@ -25,7 +25,12 @@ template<class T> class grow_stack
long son;
long smax;
+ /* <sigh> the max_size parameter is the number of bytes of the pointerstack
+ instead of the number of entries which it ofcourse should have been.
+ This breaks on 64 bit since the caller assumes 4 bytes per pointer and
+ thus on 64 bit allocates not enough memory. Instead of fixing all callers
+ we work around this by multiplying maxsize by 2 on 64 bit. */
grow_stack(int max_size) {
- smax=max_size;
+ smax=max_size/sizeof(int32_t);
son=0;
sdata=(T **)jmalloc(sizeof(T *)*smax,"pointer stack");
}