This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch java]: Intialize va_list_type_node to avoid segfault for x86_64 targets in respect for alignment
- From: Andreas Schwab <schwab at redhat dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Andrew Haley <aph at redhat dot com>
- Date: Tue, 11 Jan 2011 15:56:54 +0100
- Subject: Re: [patch java]: Intialize va_list_type_node to avoid segfault for x86_64 targets in respect for alignment
- References: <AANLkTinooC-HUy6Fg9RMO=WoPwaaiHU=84GVDDnKS6+N@mail.gmail.com>
Kai Tietz <ktietz70@googlemail.com> writes:
> Index: gcc/gcc/java/decl.c
> ===================================================================
> --- gcc.orig/gcc/java/decl.c 2010-12-15 14:28:00.000000000 +0100
> +++ gcc/gcc/java/decl.c 2011-01-07 12:28:26.951395700 +0100
> @@ -1154,6 +1154,19 @@ java_init_decl_processing (void)
> = add_builtin_function ("_Jv_remJ", t,
> 0, NOT_BUILT_IN, NULL, NULL_TREE);
>
> + /* Initialize va_list_type_node. */
> + t = targetm.build_builtin_va_list ();
That doesn't work.
Program received signal SIGSEGV, Segmentation fault.
place_field (rli=0x10c8c590, field=0xf7eb15a0) at ../../gcc/stor-layout.c:1132
1132 else if (TREE_CODE (type) == ERROR_MARK)
(gdb) bt
#0 place_field (rli=0x10c8c590, field=0xf7eb15a0)
at ../../gcc/stor-layout.c:1132
#1 0x103e1398 in layout_type (type=0xf7eb1540) at ../../gcc/stor-layout.c:2095
#2 layout_type (type=0xf7eb1540) at ../../gcc/stor-layout.c:1849
#3 0x105ee484 in rs6000_build_builtin_va_list ()
at ../../gcc/config/rs6000/rs6000.c:9435
#4 rs6000_build_builtin_va_list () at ../../gcc/config/rs6000/rs6000.c:9390
#5 0x100a8668 in java_init_decl_processing () at ../../gcc/java/decl.c:1158
#6 0x100bea78 in java_init () at ../../gcc/java/lang.c:324
#7 0x103eb9c4 in lang_dependent_init (argc=1, argv=0xffffe204)
at ../../gcc/toplev.c:1738
#8 do_compile (argc=1, argv=0xffffe204) at ../../gcc/toplev.c:1873
#9 toplev_main (argc=1, argv=0xffffe204) at ../../gcc/toplev.c:1937
#10 0x1008d310 in main (argc=<value optimized out>, argv=<value optimized out>)
at ../../gcc/main.c:36
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."