This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

More info on exception bug


Hi,

It seems that expand_exception_blocks () in cp/except.c is kind of
screwed up. When entering expand_exception_blocks (),
pending_stack_adjust is 0. But in expand_leftover_cleanups (),
pending_stack_adjust is changed for the exception handler. As the
result, the stacks of the function and its exception handler are
all mixed up.

I am enclosing a kludge here. There must be a better fix than that.

Thanks.


-- 
H.J. Lu (hjl@gnu.ai.mit.edu)
---
Thu Oct  2 12:41:44 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* except.c (expand_exception_blocks): Inhibit deferred pop
	in the exception handler.

Index: cp/except.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/gcc/cp/except.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 except.c
--- except.c	1997/09/17 20:10:28	1.1.1.3
+++ except.c	1997/10/02 19:48:28
@@ -1000,6 +1000,9 @@
 void
 expand_exception_blocks ()
 {
+  /* No deferred pop in the exception handling. */
+  NO_DEFER_POP;
+
   push_to_sequence (catch_clauses);
   expand_leftover_cleanups ();
   catch_clauses = get_insns ();
@@ -1017,6 +1020,8 @@
      catch_clauses = get_insns ();
      end_sequence ();
     }
+
+  OK_DEFER_POP;
 
   if (catch_clauses)
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]