Skip to content

misc/cgo/testsanitizers: Segmentation fault using GCC 6.1.1 (and Clang 3.8.1) #16636

@mewmew

Description

@mewmew
  1. What version of Go are you using (go version)?
go version devel +219ca60 Sat Aug 6 19:30:57 2016 +0000 linux/amd64

Clang and GCC versions:

u@x1 ~/g/src> clang --version
clang version 3.8.1 (tags/RELEASE_381/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
u@x1 ~/g/src> gcc --version
gcc (GCC) 6.1.1 20160802
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1. What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/u/goget:/home/u/Desktop/go"
GORACE=""
GOROOT="/home/u/go"
GOTOOLDIR="/home/u/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build846316599=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
  1. What did you do?

Execute ./all.bash.

  1. What did you expect to see?

All tests passed.

  1. What did you see instead?

Segmentation faults were reported from the memory sanitizer test cases.

##### ../misc/cgo/testsanitizers
signal: segmentation fault (core dumped)
FAIL: msan
signal: segmentation fault (core dumped)
FAIL: msan2 with -fsanitize=memory
signal: segmentation fault (core dumped)
FAIL: msan2
signal: segmentation fault (core dumped)
FAIL: msan3
signal: segmentation fault (core dumped)
FAIL: msan4
2016/08/08 14:48:46 Failed: exit status 1

The core dumps don't seem to be revealing too much.

u@x1 ~/g/src> coredumpctl gdb 30958
           PID: 30958 (msan_fail)
           UID: 1000 (u)
           GID: 100 (users)
        Signal: 11 (SEGV)
     Timestamp: Mon 2016-08-08 14:37:38 CEST (14min ago)
  Command Line: /tmp/go-build818063084/command-line-arguments/_obj/exe/msan_fail
    Executable: /tmp/go-build818063084/command-line-arguments/_obj/exe/msan_fail
 Control Group: /user.slice/user-1000.slice/session-c1.scope
          Unit: session-c1.scope
         Slice: user-1000.slice
       Session: c1
     Owner UID: 1000 (u)
       Boot ID: 457313786431498991c0d5c32a000f52
    Machine ID: 8be6e9b1337f4bf3864e9184c2ef52c8
      Hostname: x1
      Coredump: /var/lib/systemd/coredump/core.msan_fail.1000.457313786431498991c0d5c32a000f52.30958.1470659858000000000000.lz4
       Message: Process 30958 (msan_fail) of user 1000 dumped core.

                Stack trace of thread 30958:
                #0  0x000000000041ee95 n/a (/tmp/go-build818063084/command-line-arguments/_obj/exe/msan_fail)

GNU gdb (GDB) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
/tmp/go-build818063084/command-line-arguments/_obj/exe/msan_fail: No such file or directory.
[New LWP 30958]
Core was generated by `/tmp/go-build818063084/command-line-arguments/_obj/exe/msan_fail'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000041ee95 in ?? ()
(gdb) bt
#0  0x000000000041ee95 in ?? ()
#1  0x0000000000000000 in ?? ()
(gdb) q

Any idea on how to investigate this further?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions