Index: /branches/ia32/lisp-kernel/x86-exceptions.c
===================================================================
--- /branches/ia32/lisp-kernel/x86-exceptions.c	(revision 9398)
+++ /branches/ia32/lisp-kernel/x86-exceptions.c	(revision 9399)
@@ -367,6 +367,8 @@
 #ifdef X8632
   if (fulltag_of(tra) == fulltag_tra) {
-    if (*((unsigned char *)(tra)) == RECOVER_FN_OPCODE) {
-      tra_f = (LispObj)(*((natural *)(tra + 1)));
+    unsigned char *p = (unsigned char *)tra;
+
+    if (*p == RECOVER_FN_OPCODE) {
+      tra_f = (LispObj)(*((natural *)(p + 1)));
     }
     if (tra_f && header_subtag(header_of(tra_f)) != subtag_function) {
@@ -383,5 +385,6 @@
   if (fulltag_of(f) == fulltag_function) {
 #else
-  if (header_subtag(header_of(f)) == subtag_function) {
+  if (fulltag_of(f) == fulltag_misc &&
+      header_subtag(header_of(f)) == subtag_function) {
 #endif
     nominal_function = f;
@@ -2296,5 +2299,5 @@
   stackp = TRUNC_DOWN(stackp, C_REDZONE_LEN, C_STK_ALIGN);
 #else
-  stackp = (LispObj) ts->__esp;
+  stackp = (LispObj) find_foreign_rsp(ts->__esp, tcr->cs_area, tcr);
 #endif
   stackp = TRUNC_DOWN(stackp, sizeof(siginfo_t), C_STK_ALIGN);
