This is the mail archive of the 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]
Other format: [Raw text]

Re: [patch] diagnostics branch

Aldy Hernandez wrote:

> OK to merge into mainline?
> Below is the changelog, but the full patch (590k) is here:

The except.c (init_eh) changes in this patch causes the compiler to
crash on startup on SPU and presumably all other SJLJ-exception

Index: gcc/except.c
--- gcc/except.c	(revision 148136)
+++ gcc/except.c	(working copy)
@@ -221,11 +221,13 @@ init_eh (void)
       sjlj_fc_type_node = lang_hooks.types.make_type (RECORD_TYPE);
-      f_prev = build_decl (FIELD_DECL, get_identifier ("__prev"),
+      f_prev = build_decl (DECL_SOURCE_LOCATION (current_function_decl),
+			   FIELD_DECL, get_identifier ("__prev"),
 			   build_pointer_type (sjlj_fc_type_node));
       DECL_FIELD_CONTEXT (f_prev) = sjlj_fc_type_node;

Note that init_eh is called during early initialization, where
current_function_decl is not yet set up.  This causes a crash
due to NULL pointer access here ...


  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE

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