Hi Nikhil, >> I suspect what is happening here is that godump sees "typedef ucontext_t >> struct >> ucontext" and outputs the typedef immediately. Only later does it observe >> that >> "struct ucontext" is invalid. At that point it is too late to comment out the >> typedef for _ucontext_t. > > Oh, wait, Rainer, did you apply *both* solaris-godump.patch and > invalid-dummy.patch? I think if you apply only the former (i.e., only
I did indeed. TBH I sort of lost track which patches were and weren't required to get this fixed ;-) > solaris-godump.patch), which is the only bit I've submitted upstream, > all will be well. > > For good measure, I've also fixed the issue in invalid-dummy.patch > and attached a new version. But I'm still not sure whether it is a > worthwhile change, and it's something we can discuss separately from > solaris-godump.patch. 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. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University