Skip to content

compiling with go1.17rc1 make a binary that fatal with SIGSEGV #47279

@urbanishimwe

Description

@urbanishimwe

What version of Go are you using (go version)?

$ go version
go version go1.17rc1 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/user/go-darwin-amd64-bootstrap"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOVCS=""
GOVERSION="go1.17rc1"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/7w/flrplbwd0jg9lfhwcwjxvc_80000gn/T/go-build3902858131=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version go1.17rc1 darwin/amd64
GOROOT/bin/go tool compile -V: compile version go1.17rc1
uname -v: Darwin Kernel Version 20.5.0: Sat May  8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64
ProductName:	macOS
ProductVersion:	11.4
BuildVersion:	20F71
lldb --version: lldb-1205.0.27.3
Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)

What did you do?

I compiled a Go source code with go1.17rc1!

What did you expect to see?

I expected the resulted binary to run successfully just like when compiled with go1.16.5

What did you see instead?

running the binary:

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff2057acbe]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff2057acbe
stack: frame={sp:0x7ffeefbff918, fp:0x7ffeefbff968} stack=[0x7ffeefb809b8,0x7ffeefbffa20)
0x00007ffeefbff818:  0x01007ffeefbff838  0x0000000000000004 
0x00007ffeefbff828:  0x000000000000001f  0x00007fff2057acbe 
0x00007ffeefbff838:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbff848:  0x0000000004039e11 <runtime.throw+0x0000000000000071>  0x00007ffeefbff8e8 
0x00007ffeefbff858:  0x0000000005232c17  0x00007ffeefbff8a0 
0x00007ffeefbff868:  0x000000000403a0c8 <runtime.fatalthrow.func1+0x0000000000000048>  0x00000000061d74a0 
0x00007ffeefbff878:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbff888:  0x00007ffeefbff8e8  0x0000000004039e11 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff898:  0x00000000061d74a0  0x00007ffeefbff8d8 
0x00007ffeefbff8a8:  0x000000000403a050 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff8b8 
0x00007ffeefbff8b8:  0x000000000403a080 <runtime.fatalthrow.func1+0x0000000000000000>  0x00000000061d74a0 
0x00007ffeefbff8c8:  0x0000000004039e11 <runtime.throw+0x0000000000000071>  0x00007ffeefbff8e8 
0x00007ffeefbff8d8:  0x00007ffeefbff908  0x0000000004039e11 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff8e8:  0x00007ffeefbff8f0  0x0000000004039e40 <runtime.throw.func1+0x0000000000000000> 
0x00007ffeefbff8f8:  0x0000000005244567  0x000000000000002a 
0x00007ffeefbff908:  0x00007ffeefbff958  0x0000000004050436 <runtime.sigpanic+0x0000000000000396> 
0x00007ffeefbff918: <0x0000000005244567  0x0000000004042cde <runtime.checkTimers+0x000000000000005e>
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions