1.0.10.12: logged bug 417
[sbcl.git] / src / runtime / alloc.c
index e10634d..2e056b5 100644 (file)
@@ -32,7 +32,7 @@
 #define ALIGNED_SIZE(n) ((n) + LOWTAG_MASK) & ~LOWTAG_MASK
 
 #ifdef LISP_FEATURE_GENCGC
-extern lispobj *alloc(int bytes);
+extern lispobj *alloc(long bytes);
 #endif
 
 static lispobj *
@@ -58,16 +58,16 @@ pa_alloc(int bytes)
          * we push it onto the lisp control stack, and read it back
          * off after any potential GC has finished */
 #ifndef LISP_FEATURE_C_STACK_IS_CONTROL_STACK
-#ifdef LISP_FEATURE_STACK_GROWS_DOWNARD_NOT_UPWARD
+#ifdef LISP_FEATURE_STACK_GROWS_DOWNWARD_NOT_UPWARD
 #error "!C_STACK_IS_CONTROL_STACK and STACK_GROWS_DOWNWARD_NOT_UPWARD is not supported"
 #endif
+        *current_control_stack_pointer = (lispobj) result;
         current_control_stack_pointer += 1;
-        *current_control_stack_pointer = result;
 #endif
         do_pending_interrupt();
 #ifndef LISP_FEATURE_C_STACK_IS_CONTROL_STACK
-        result = *current_control_stack_pointer;
         current_control_stack_pointer -= 1;
+        result = (lispobj *) *current_control_stack_pointer;
 #endif
     }
 #else