On Thu, Dec 17, 2020 at 8:31 AM Nikhil Benesch via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> On 12/17/20 7:28 AM, Rainer Orth wrote:
> > I first tried with the new version included, but that broke badly:
> >
> > cc1 -fpreprocessed sysinfo.i -quiet -O -std=gnu99 
> > -fdump-go-spec=tmp-gen-sysinfo.go -o sysinfo.s
> >
> > now SEGVs with either infinite or very deep recursion:
> >
> > Thread 2 received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread 1 (LWP 1)]
> > 0x08ea285e in go_format_type (container=container@entry=0xfeffd738, type=
> >      <record_type 0xfa50be40>, use_type_name=true, is_func_ok=true,
> >      p_art_i=0x0, is_anon_record_or_union=false)
> >      at /vol/gcc/src/hg/master/local/gcc/godump.c:688
> > 688   {
> > (gdb) where
> > #0  0x08ea285e in go_format_type (container=container@entry=0xfeffd738,
> >      type=<record_type 0xfa50be40>, use_type_name=true, is_func_ok=true,
> >      p_art_i=0x0, is_anon_record_or_union=false)
> >      at /vol/gcc/src/hg/master/local/gcc/godump.c:688
> > #1  0x08ea2cff in go_format_type (container=container@entry=0xfeffd738,
> >      type=type@entry=<pointer_type 0xfa50bea0>,
> >      use_type_name=use_type_name@entry=true, is_func_ok=false,
> >      p_art_i=0xfe6fe174, is_anon_record_or_union=false)
> >      at /vol/gcc/src/hg/master/local/gcc/tree.h:3453
> > #2  0x08ea3506 in go_format_type (container=container@entry=0xfeffd738,
> >      type=type@entry=<record_type 0xfa50be40>,
> >      use_type_name=use_type_name@entry=false, is_func_ok=false,
> >      p_art_i=0xfe6fe174, is_anon_record_or_union=false)
> >      at /vol/gcc/src/hg/master/local/gcc/godump.c:1002
> > #3  0x08ea3335 in go_format_type (container=container@entry=0xfeffd738,
> >      type=<record_type 0xfa50be40>, use_type_name=<optimized out>,
> >      is_func_ok=true, p_art_i=0xfe6fe234, is_anon_record_or_union=false)
> >      at /vol/gcc/src/hg/master/local/gcc/godump.c:741
> > #4  0x08ea2cff in go_format_type (container=container@entry=0xfeffd738,
> >      type=type@entry=<pointer_type 0xfa50bea0>,
> >      use_type_name=use_type_name@entry=true, is_func_ok=false,
> >      p_art_i=0xfe6fe3b4, is_anon_record_or_union=false)
> >      at /vol/gcc/src/hg/master/local/gcc/tree.h:3453
> >
> > I've now reverted that part and the build is into make check, as you
> > suspected.
>
> Whew, ok, great. Let's leave invalid-godump-2.patch as a curiosity for
> Ian, then. The current approach of outputting dummy types for every
> invalid type is unsatisfying, but in practice it seems to work alright.

Thanks for looking into this.  I've gotten confused now, though.
Which patch fixes the problem on Solaris?  Thanks.

Ian

Reply via email to