[Bug go/78700] New: gccgo testcases stack.go, recover.go, crypto/tls start failing with r241222

boger at us dot ibm.com gcc-bugzilla@gcc.gnu.org
Tue Dec 6 17:24:00 GMT 2016


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

            Bug ID: 78700
           Summary: gccgo testcases stack.go, recover.go, crypto/tls start
                    failing with r241222
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: boger at us dot ibm.com
                CC: cmang at google dot com
  Target Milestone: ---

There are 3 failures in the gccgo testcases starting with commit 241222.  I
built with 241215 and none of these tests failed there, and the two between are
simple and relate to fortran and sparc.

In the go tests for gcc, stack.go failure looks like this:

bad func 21 at level 8000
panic: fail

goroutine 16 []:
__go_panic
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/runtime/go-panic.c:110main.recur
       
/home/boger/gccgo.work/trunk/src/gcc/testsuite/go.test/test/stack.go:87main.main
       
/home/boger/gccgo.work/trunk/src/gcc/testsuite/go.test/test/stack.go:99FAIL:
go.test/test/stack.go execution,  -O2 -g
testcase /home/boger/gccgo.work/trunk/src/gcc/testsuite/go.test/go-test.exp
completed in 1 seconds

recover.go:

panic: 13
        panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0xa]

goroutine 16 [running]:
__go_panic
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/runtime/go-panic.c:110__go_panic
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/runtime/go-panic.c:66main.test13reflect2
       
/home/boger/gccgo.work/trunk/src/gcc/testsuite/go.test/test/recover.go:456main.main
       
/home/boger/gccgo.work/trunk/src/gcc/testsuite/go.test/test/recover.go:58
goroutine 18 [finalizer wait]:

Also, libgo testcase crypto/tls starts failing with this commit as well:
unexpected fault address 0xc02f00010313
fatal error: fault
[signal 0xb code=0x1 addr=0xc02f00010313]

goroutine 77 [running]:
runtime_dopanic
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/runtime/panic.c:133runtime_throw
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/runtime/panic.c:195sig_panic_info_handler
        /home/boger/gccgo.work/trunk/bld/../src/libgo/runtime/go-signal.c:296
        :0tls.$nested12
       
/home/boger/gccgo.work/trunk/bld/powerpc64le-linux/libgo/gotest16088/test/handshake_client_test.go:755tls.$nested3
       
/home/boger/gccgo.work/trunk/bld/powerpc64le-linux/libgo/gotest16088/test/handshake_client_test.go:370
       
/home/boger/gccgo.work/trunk/bld/powerpc64le-linux/libgo/gotest16088/test/handshake_client_test.go:273kickoff
        /home/boger/gccgo.work/trunk/bld/../src/libgo/runtime/proc.c:257created
by crypto_tls.run.pN21_crypto_tls.clientTest
       
/home/boger/gccgo.work/trunk/bld/powerpc64le-linux/libgo/gotest16088/test/handshake_client_test.go:302
+828

goroutine 16 [chan receive]:
testing.Run.pN9_testing.T
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/go/testing/testing.go:646testing.$nested9
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/go/testing/testing.go:792testing.tRunner
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/go/testing/testing.go:609testing.RunTests
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/go/testing/testing.go:790testing.Run.pN9_testing.M
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/go/testing/testing.go:742main.main
       
/home/boger/gccgo.work/trunk/bld/powerpc64le-linux/libgo/gotest16088/test/_testmain.go:109
goroutine 18 [finalizer wait]:

goroutine 20 [syscall]:
        goroutine in C code; stack unavailable

goroutine 76 [semacquire]:
sync.runtime_notifyListWait
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/go/runtime/sema.go:271sync.Wait.pN9_sync.Cond
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/go/sync/cond.go:57io.read.pN7_io.pipe
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/go/io/pipe.go:47io.Read.pN13_io.PipeReader
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/go/io/pipe.go:129io.ReadAtLeast
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/go/io/io.go:307io.ReadFull
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/go/io/io.go:325crypto_tls.run.pN21_crypto_tls.clientTest
       
/home/boger/gccgo.work/trunk/bld/powerpc64le-linux/libgo/gotest16088/test/handshake_client_test.go:387tls.runClientTestForVersion
       
/home/boger/gccgo.work/trunk/bld/powerpc64le-linux/libgo/gotest16088/test/handshake_client_test.go:428tls.runClientTestTLS12
       
/home/boger/gccgo.work/trunk/bld/powerpc64le-linux/libgo/gotest16088/test/handshake_client_test.go:440crypto_tls.TestHandshakClientSCTs
       
/home/boger/gccgo.work/trunk/bld/powerpc64le-linux/libgo/gotest16088/test/handshake_client_test.go:770testing.tRunner
       
/home/boger/gccgo.work/trunk/bld/../src/libgo/go/testing/testing.go:609created
by testing.Run.pN9_testing.T
        /home/boger/gccgo.work/trunk/bld/../src/libgo/go/testing/testing.go:645
+660
/home/boger/gccgo.work/trunk/bld/../src/libgo/testsuite/gotest: line 638: 16768
Aborted                 ./a.out -test.short -test.timeout=${timeo


I configure gccgo this way:

../src/configure --target=powerpc64le-linux --host=powerpc64le-linux
--build=powerpc64le-linux --enable-threads=posix --enable-shared
--enable-__cxa_atexit --enable-secureplt --enable-checking=yes
--with-long-double-128 --enable-decimal-float --disable-alsa --disable-multilib
--disable-bootstrap --prefix=/usr/local/gccgo.trunk241222
--enable-languages=c,c++,go

The failing gccgo shows this:
./gccgo -v
Using built-in specs.
COLLECT_GCC=./gccgo
Target: powerpc64le-linux
Configured with: /home/boger/gccgo.work/trunk/bld/../src/configure
--target=powerpc64le-linux --host=powerpc64le-linux --build=powerpc64le-linux
--enable-threads=posix --enable-shared --enable-__cxa_atexit --enable-secureplt
--enable-checking=yes --with-long-double-128 --enable-decimal-float
--disable-alsa --disable-multilib --disable-bootstrap
--prefix=/usr/local/gccgo.trunk241222 --enable-languages=c,c++,go
Thread model: posix
gcc version 7.0.0 20161016 (experimental) (GCC) 

The posted gcc-testresults for powerpc64le-unknown-linux-gnu show the same
results.

I don't recall the details of how closures work in gccgo but in one of my gdb
debugging sessions the value in r11 looked suspicious.  I think there were some
assumptions about r11.


More information about the Gcc-bugs mailing list