Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: overlapping edits #32271

Closed
aykevl opened this issue May 27, 2019 · 2 comments
Closed

panic: overlapping edits #32271

aykevl opened this issue May 27, 2019 · 2 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@aykevl
Copy link

aykevl commented May 27, 2019

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

$ go version
go version go1.12 linux/amd64

Does this issue reproduce with the latest release?

Yes, with Go compiled from 45d74aa.

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ayke/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ayke"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="/usr/bin/gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build818149774=/tmp/go-build -gno-record-gcc-switches"

Reproducing

I'm not exactly sure how to reproduce this yet, but this is the error I'm getting:

panic: overlapping edits: [52942,53034)->"func() { _cgo0 := /*line :1305:33*/b.C; _cgo1 := _Ctype_uint(line); _cgoCheckPointer(_cgo0); _cgoCheckPointer(_cgo1); _Cfunc_LLVMSetCurrentDebugLocation2(_cgo0, _cgo1); }()", [52996,53006)->" /*line :1305:56*/_Ctype_uint /*line :1305:66*/"

It is clearly related to CGo somehow and I think it may be caused by a signature mismatch. There are two symbols with the same name and a different signature. One lives in the Go package as a .cpp file, the other is declared in a header file (included by CGo) and lives in an archive file. My theory is that CGo picks the one at one time and a different one some other time which leads to a conflict.
That's a lot of guessing and little reproducing. But this is a large and complicated system and I'm not sure how to make it smaller, but perhaps you can see something that is wrong so I can look into it further?

Tested with two different system linkers: ld.bfd and ld.lld-8.

Sort-of related:
https://reviews.llvm.org/D60484
https://reviews.llvm.org/rL358086

Also: this is with Go modules disabled, if that is relevant.

@ianlancetaylor
Copy link
Contributor

Tell us exactly what you did and exactly what happened. Not just a single snippet from the output. Thanks.

Also, if you are using the original Go 1.12 release as suggested above, try the Go 1.12.5 release. There have been some bug fixes that may be relevant.

@julieqiu julieqiu added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label May 28, 2019
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Jun 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants