[Bug other/88007] [9 Regression] ICE in gt_ggc_m_S, at ggc-page.c:1474
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Wed Nov 14 08:23:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88007
--- Comment #2 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 13 Nov 2018, jakub at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88007
>
> Jakub Jelinek <jakub at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |jakub at gcc dot gnu.org
>
> --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> This is because parse_optimize_options has:
> r = q = (char *) ggc_alloc_atomic (len2 + 3);
> and constructs in there the whole option, like "-falign-functions=16" , and
> then options processing comes and points arg into that string (so "16").
> As gcc_options is marked GTY, the const char * fields in there thus need to be
> either not GC memory at all, or they need to point at the start of a GC chunk,
> or into the middle of STRING_CST, everything else is disallowed.
>
> So, either we need to pass down to the option processing info that the options
> are GC allocated and if we'd have arg pointing into the middle of such a
> string, ggc_strdup it, or maybe c-common.c should use XOBNEWVEC (&opts_obstack,
> char, len2 + 3); instead of (char *) ggc_alloc_atomic (len2 + 3) ?
Using the opts_obstack sounds reasonable to me.
More information about the Gcc-bugs
mailing list