David Malcolm
56e0452513
jit: fix ICE with GCC_JIT_BOOL_OPTION_SELFCHECK_GC since r278084 (PR jit/92483)
Since r278084 (part of the params refactoring), most of libgccjit's test suite has been ICEing. The root cause is that jit-playback.c injects params to its fake_args here: /* Aggressively garbage-collect, to shake out bugs: */ if (get_bool_option (GCC_JIT_BOOL_OPTION_SELFCHECK_GC)) { ADD_ARG ("--param"); ADD_ARG ("ggc-min-expand=0"); ADD_ARG ("--param"); ADD_ARG ("ggc-min-heapsize=0"); } (building a vec of char * where the char * are allocated using xstrdup) and r278084 added this logic to decode_cmdline_options_to_array: 964 /* Interpret "--param" "key=name" as "--param=key=name". */ 965 const char *needle = "--param"; 966 if (i + 1 < argc && strcmp (opt, needle) == 0) 967 { 968 const char *replacement 969 = opts_concat (needle, "=", argv[i + 1], NULL); 970 argv[++i] = replacement; 971 } Note that at line 970 it manipulates the argv in-place, inserting a new option allocated with opts_concat, which uses opts_obstack (itself initialized from toplev::main). jit-playback.c cleans up its fake arguments using "free", at which point we have a free of the middle of an obstack and an ICE. This patch fixes the issue by using the new syntax for the params. Fixes all 60 FAILs in jit.sum, restoring the number of PASS results from 2033 to 10469. gcc/jit/ChangeLog: PR jit/92483 * jit-playback.c (gcc::jit::playback::context::make_fake_args): Update GCC_JIT_BOOL_OPTION_SELFCHECK_GC for new --param syntax. From-SVN: r278515
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C
48%
Ada
18.3%
C++
14.1%
Go
7%
GCC Machine Description
4.6%
Other
7.7%