This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
Re: GCC build failed for native with your patch on 2003-04-11T21:30:01Z.
- From: Geoff Keating <geoffk at geoffk dot org>
- To: gcc-regression at gcc dot gnu dot org
- Cc: rth at redhat dot com
- Date: 11 Apr 2003 15:25:58 -0700
- Subject: Re: GCC build failed for native with your patch on 2003-04-11T21:30:01Z.
- References: <200304112145.h3BLjH37022509@gcc-regress.apple.com>
"GCC regression checker" <geoffk at apple dot com> writes:
> /Users/regress/tbox/native/build/gcc/xgcc -B/Users/regress/tbox/native/build/gcc/ -B/Users/regress/tbox/objs/powerpc-apple-darwin6.3/bin/ -B/Users/regress/tbox/objs/powerpc-apple-darwin6.3/lib/ -isystem /Users/regress/tbox/objs/powerpc-apple-darwin6.3/include -isystem /Users/regress/tbox/objs/powerpc-apple-darwin6.3/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I/Users/regress/tbox/cvs-gcc/gcc/gcc -I/Users/regress/tbox/cvs-gcc/gcc/gcc/. -I/Users/regress/tbox/cvs-gcc/gcc/gcc/config -I/Users/regress/tbox/cvs-gcc/gcc/gcc/../include -fexceptions -c /Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
> /Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2.c: In function `_Unwind_GetCFA':
> /Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2.c:181: warning: return makes integer from pointer without a cast
> [address=54001042 pc=00189cdc]
> In file included from /Users/regress/tbox/cvs-gcc/gcc/gcc/unwind-dw2.c:1265:
> /Users/regress/tbox/cvs-gcc/gcc/gcc/unwind.inc: In function `_Unwind_ForcedUnwind':
> /Users/regress/tbox/cvs-gcc/gcc/gcc/unwind.inc:207: internal compiler error: Segmentation Fault
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> make[3]: *** [libgcc/./unwind-dw2.o] Error 1
> make[2]: *** [stmp-multilib] Error 2
> make[1]: *** [stage1_build] Error 2
> make: *** [bootstrap] Error 2
> + '[' -s gcc/.bad_compare ']'
> + exit 1
This is Richard's patch:
+2003-04-11 Richard Henderson <rth at redhat dot com>
+
+ * rtl.def (SYMBOL_REF): Add two 0 fields.
+ * gengtype.c (adjust_field_rtx_def): Handle them.
+ * print-rtl.c (print_rtx): Print them.
+ * rtl.h (SYMBOL_REF_DECL, SYMBOL_REF_FLAGS): New.
+ (SYMBOL_FLAG_FUNCTION, SYMBOL_REF_FUNCTION_P): New.
+ (SYMBOL_FLAG_LOCAL, SYMBOL_REF_LOCAL_P): New.
+ (SYMBOL_FLAG_SMALL, SYMBOL_REF_SMALL_P): New.
+ (SYMBOL_FLAG_TLS_SHIFT, SYMBOL_REF_TLS_MODEL): New.
+ (SYMBOL_FLAG_EXTERNAL, SYMBOL_REF_EXTERNAL_P): New.
+ (SYMBOL_FLAG_MACH_DEP): New.
+ * optabs.c (init_one_libfunc): Zap fake SYMBOL_REF_DECL.
+ * varasm.c (make_decl_rtl): Set SYMBOL_REF_DECL.
+ (assemble_static_space): Set SYMBOL_REF_FLAGS.
+ (assemble_trampoline_template): Likewise.
+ (output_constant_def, force_const_mem): Likewise.
+ (default_encode_section_info): New.
+ * output.h: Declare it.
+ * target-def.h (TARGET_ENCODE_SECTION_INFO): Use it.
+
The crash happens during a GC run. In this SYMBOL_REF,
$1 = {
code = SYMBOL_REF,
mode = SImode,
jump = 0,
call = 0,
unchanging = 0,
volatil = 0,
in_struct = 0,
used = 0,
integrated = 0,
frame_related = 0,
fld = {{
rtwint = 19177330,
rtint = 19177330,
rtuint = 19177330,
rtstr = 0x1249f72 "&L_memcpy$stub",
rtx = 0x1249f72,
rtvec = 0x1249f72,
rttype = 19177330,
rt_addr_diff_vec_flags = {
min_align = 1,
base_after_vec = 0,
min_after_vec = 0,
max_after_vec = 1,
min_after_base = 0,
max_after_base = 0,
offset_unsigned = 1,
0,
scale = 159
},
rt_cselib = 0x1249f72,
rtbit = 0x1249f72,
rttree = 0x1249f72,
bb = 0x1249f72,
rtmem = 0x1249f72,
rtreg = 0x1249f72
}}
}
the third element, which you can't see in this dump, is a pointer
to uninitialised GCed memory.
It looks like one of the places that SYMBOL_REFs are created, perhaps
in the Darwin backend, doesn't properly initialise this new field.
--
- Geoffrey Keating <geoffk at geoffk dot org>