-
Notifications
You must be signed in to change notification settings - Fork 18k
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
cmd/compile: seg fault with -ssa=1 #16727
Comments
I think this is a bug in your code. The old legacy backend and the SSA backend differ in how they respond to this bad code. |
Understood about the pointer pointing to nowhere. But I never actually dereference the pointer only Do I need to find another way to make Offset() work? |
The semantics of unsafe are intentionally left vague. Hence the name. That gives us wiggle room to modify how things work under the covers, but it means you can get bitten by assumptions that don't hold from release to release. Sorry about that. Can you use
|
No worries re: unsafe. Just coded up mmap based solution. Works like a charm with ssa. unsafe.Offsets(r.bars[0][0][0]) is invalid syntax. Bummer. I did try that. Only works for struct.field I'm cool with the mmap since /dev/zero mapped memory is copy on write via the linux kernel & we never write. so, mmap'ing e.g. 2^N bytes N = #address bits is no problem. Do, let me know if you can think of a better solution. Hey, and thanks for all the great compiler work... been following along for a while on dev.ssa |
Please answer these questions before submitting your issue. Thanks!
go version
)?go version go1.7 linux/amd64
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/eliot/gopath"
GORACE=""
GOROOT="/home/eliot/go"
GOTOOLDIR="/home/eliot/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build796172607=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
https://play.golang.org/p/OVfeAp_FIG
segfaults with -ssa=1; works with -ssa=0
both crash0() and crash1() cause segfaults
The text was updated successfully, but these errors were encountered: