-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/gc: go1.0.3 clean code crashes in scanblock() #5291
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
Labels
Milestone
Comments
I have been able to get a sample that generates the crash. Barring the fact that pointer to slice is used unnecessarily, I believe the code is legal. Attachments:
|
Crash still exists with latest tip > go version go version devel +be96dbedf109 Mon Apr 22 10:32:10 2013 -0700 linux/amd64 Sample code that reproduces the crash is attached. Barring the fact that pointer to slice is unnecessary i believe the code is legal. Tested on RHEL6.3 & Win7. RHEL6.3 has a crash while Win7 does not. Attachments:
|
I can reproduce. I've prepared this CL for others to clpatch in: https://golang.org/cl/8607045 Then: bradfitz@barbon:~/go/test$ go run run.go -- ./fixedbugs/issue5291.go rundir fixedbugs/issue5291.go: exit status 2 Iteration: 0 Iteration: 1 unexpected fault address 0xc1c46af640 fatal error: fault [signal 0xb code=0x1 addr=0xc1c46af640 pc=0x40aafa] goroutine 1 [running]: [fp=0xc20004ae08] runtime.throw(0x50a217) /home/bradfitz/go/src/pkg/runtime/panic.c:473 +0x67 [fp=0xc20004ae20] runtime.sigpanic() /home/bradfitz/go/src/pkg/runtime/os_linux.c:239 +0xe7 [fp=0xc20004b1c0] scanblock(0x7fc987093000, 0x7fc987093018, 0x0, 0xc20004b100) /home/bradfitz/go/src/pkg/runtime/mgc0.c:911 +0x5ca [fp=0xc20004b210] markroot(0xc20004e000, 0x1000000003) /home/bradfitz/go/src/pkg/runtime/mgc0.c:1269 +0xab [fp=0xc20004b288] runtime.parfordo(0xc20004e000) /home/bradfitz/go/src/pkg/runtime/parfor.c:105 +0x9b [fp=0xc20004b3b8] gc(0x7fc987194eac) /home/bradfitz/go/src/pkg/runtime/mgc0.c:2000 +0x29d ----- stack segment boundary ----- [fp=0x7fc987194ec0] runtime.gc(0x1) /home/bradfitz/go/src/pkg/runtime/mgc0.c:1927 +0x11b [fp=0x7fc987194ed0] runtime.GC() /home/bradfitz/go/src/pkg/runtime/zmalloc_linux_amd64.c:672 +0x24 [fp=0x7fc987194f78] pkg1.Crashcall(0x0, 0x0) /home/bradfitz/go/test/fixedbugs/issue5291.dir/pkg1.go:19 +0x100 [fp=0x7fc987194f90] main.main() /home/bradfitz/go/test/fixedbugs/issue5291.dir/prog.go:12 +0x1c [fp=0x7fc987194fb8] runtime.main() /home/bradfitz/go/src/pkg/runtime/proc.c:182 +0x92 [fp=0x7fc987194fc0] runtime.goexit() /home/bradfitz/go/src/pkg/runtime/proc.c:1223 goroutine 2 [runnable]: exit status 1 Status changed to Accepted. |
This is a compiler bug: the compiler is generating bad precise GC info. This CL keeps the compiler from generating the bad info, so you at least get a compile-time crash rather than a run-time crash: https://golang.org/cl/8929044 But we want to not get a crash at all. |
Please try this patch: https://golang.org/cl/8663052/ Status changed to WaitingForReply. |
Issue #5353 has been merged into this issue. |
Fixed in https://code.google.com/p/go/source/detail?r=1d079908dd84. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: