This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [objc][cft] exception handling rewrite
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: pinskia at physics dot uc dot edu (Andrew Pinski)
- Cc: rth at redhat dot com (Richard Henderson), gcc-patches at gcc dot gnu dot org
- Date: Thu, 17 Jun 2004 17:50:34 -0400 (EDT)
- Subject: Re: [objc][cft] exception handling rewrite
>
> >
> > The following is a total rewrite of the ObjC exception handling
> > code generation. It *should* result in exactly the same code
> > for -fnext-runtime. Only not crash after my recent c front-end
> > conversion to statement lists.
> >
> > In addition, it should be the bulk of the work toward making
> > things work for -fgnu-runtime as well. In this mode, we'd be
> > using gcc's native exception handling constructs, so there'd
> > be decent interation with EH from other languages.
> >
> > Only compile-time -fgnu-runtime tests will work for now, since
> > I've done no work on the library. We probably need to discuss
> > the actual ABI we want to export.
> >
> > Anyway, would someone please test this on Darwin and see if
> > the relevant tests pass again?
>
> They still fail but with a different ICE:
> dg/try-catch-2.m -fobjc-exceptions -lobjc -lobjc -lm -o ./try-catch-2.exe (timeout = 300)
> /Users/apinski/src/general_cleanup/gcc/gcc/testsuite/objc.dg/try-catch-2.m: In function `test':^M
> /Users/apinski/src/general_cleanup/gcc/gcc/testsuite/objc.dg/try-catch-2.m:75: warning: exception of type '({anonymous})' will be caught^M
> /Users/apinski/src/general_cleanup/gcc/gcc/testsuite/objc.dg/try-catch-2.m:65: warning: by earlier handler for '({anonymous})'^M
> /Users/apinski/src/general_cleanup/gcc/gcc/testsuite/objc.dg/try-catch-2.m:79: internal compiler error: Bus error^M
> Please submit a full bug report,^M
> with preprocessed source if appropriate.^M
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.^M
Here is the back-trace for the seg fault:
#0 0x90000d58 in strcmp ()
#1 0x0008bfb4 in annotate_with_file_line (node=0x645f28, file=0x0, line=0) at /Users/apinski/src/general_cleanup/gcc/gcc/tree.c:2729
#2 0x0000dee0 in objc_finish_try_stmt () at /Users/apinski/src/general_cleanup/gcc/gcc/objc/objc-act.c:3014
#3 0x00005c78 in yyparse () at objc/objc-parse.y:2277
#4 0x0000969c in c_parse_file () at objc/objc-parse.y:3618
#5 0x00069270 in c_common_parse_file (set_yydebug=-1073742366) at /Users/apinski/src/general_cleanup/gcc/gcc/c-opts.c:1250
#6 0x000af32c in toplev_main (argc=5761748, argv=0x57ead4) at /Users/apinski/src/general_cleanup/gcc/gcc/toplev.c:960
#7 0x00001ca4 in _start (argc=5, argv=0xbffffd00, envp=0xbffffd18) at /SourceCache/Csu/Csu-46/crt.c:267
#8 0x00001b18 in start ()
Thanks,
Andrew Pinski