[Bug go/72814] reflect FAILs on 32-bit Solaris/SPARC: SIGILL

ian at airs dot com gcc-bugzilla@gcc.gnu.org
Mon Aug 8 17:41:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72814

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2016-08-08
     Ever confirmed|0                           |1

--- Comment #1 from Ian Lance Taylor <ian at airs dot com> ---
The failing test is a function that returns a zero-sized struct.  The libffi
library does not support a zero-sized struct, so libgo and libffi togther wind
up treating the return type as a struct whose size is 1 byte.  On 32-bit SPARC,
a call to a function that returns a struct whose size is larger than 0 is
followed by an unimp instruction.  The function is compiled to skip the unimp
instruction when it returns.  See the handling of %) in sparc_print_operand in
gcc/config/sparc/sparc.c.  So libffi, thinking that the function returns a
non-empty struct, provides an unimp instruction to be skipped.  But the actual
function returns an empty struct, and therefore does not expect the unimp
instruction, and therefore does not skip it.  The result is an attempt to
execute the instruction, causing the SIGILL.


More information about the Gcc-bugs mailing list