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
log: GC crash using logger in 1.4 #9425
Comments
Here's a smaller reproduction:
cc @randall77 |
This feels similar to #9179 |
The bug is in malloc and/or funcLayout. Malloc assumes 8-byte objects (which is what the argument frame is) either have to be marked as flagNoScan or contain a pointer:
but reflect doesn't set flagNoScan, even though the GC program it generates is correct. I'll fix it. |
This is awesome, thank you for the super fast response and catching the bug! |
Test more stuff: 1) flagNoPointers, an incorrect value was the cause of #9425 2) Total function layout size 3) gc program Change-Id: I73f65fe740215938fa930d2f096febd9db0a0021 Reviewed-on: https://go-review.googlesource.com/2090 Reviewed-by: Ian Lance Taylor <iant@golang.org>
…ut has no pointers. malloc checks kindNoPointers and if it is not set and the object is one pointer in size, it assumes it contains a pointer. So we must set kindNoPointers correctly; it isn't just a hint. Fixes #9425 Change-Id: Ia43da23cc3298d6e3d6dbdf66d32e9678f0aedcf Reviewed-on: https://go-review.googlesource.com/2055 Reviewed-by: Russ Cox <rsc@golang.org> (cherry picked from commit d11f411) Reviewed-on: https://go-review.googlesource.com/2800 Reviewed-by: Andrew Gerrand <adg@golang.org>
…ut has no pointers. malloc checks kindNoPointers and if it is not set and the object is one pointer in size, it assumes it contains a pointer. So we must set kindNoPointers correctly; it isn't just a hint. Fixes golang#9425 Change-Id: Ia43da23cc3298d6e3d6dbdf66d32e9678f0aedcf Reviewed-on: https://go-review.googlesource.com/2055 Reviewed-by: Russ Cox <rsc@golang.org> (cherry picked from commit d11f411) Reviewed-on: https://go-review.googlesource.com/2800 Reviewed-by: Andrew Gerrand <adg@golang.org>
…ut has no pointers. malloc checks kindNoPointers and if it is not set and the object is one pointer in size, it assumes it contains a pointer. So we must set kindNoPointers correctly; it isn't just a hint. Fixes golang#9425 Change-Id: Ia43da23cc3298d6e3d6dbdf66d32e9678f0aedcf Reviewed-on: https://go-review.googlesource.com/2055 Reviewed-by: Russ Cox <rsc@golang.org> (cherry picked from commit d11f411) Reviewed-on: https://go-review.googlesource.com/2800 Reviewed-by: Andrew Gerrand <adg@golang.org>
…ut has no pointers. malloc checks kindNoPointers and if it is not set and the object is one pointer in size, it assumes it contains a pointer. So we must set kindNoPointers correctly; it isn't just a hint. Fixes golang#9425 Change-Id: Ia43da23cc3298d6e3d6dbdf66d32e9678f0aedcf Reviewed-on: https://go-review.googlesource.com/2055 Reviewed-by: Russ Cox <rsc@golang.org> (cherry picked from commit d11f411) Reviewed-on: https://go-review.googlesource.com/2800 Reviewed-by: Andrew Gerrand <adg@golang.org>
…ut has no pointers. malloc checks kindNoPointers and if it is not set and the object is one pointer in size, it assumes it contains a pointer. So we must set kindNoPointers correctly; it isn't just a hint. Fixes golang#9425 Change-Id: Ia43da23cc3298d6e3d6dbdf66d32e9678f0aedcf Reviewed-on: https://go-review.googlesource.com/2055 Reviewed-by: Russ Cox <rsc@golang.org> (cherry picked from commit d11f411) Reviewed-on: https://go-review.googlesource.com/2800 Reviewed-by: Andrew Gerrand <adg@golang.org>
…ut has no pointers. malloc checks kindNoPointers and if it is not set and the object is one pointer in size, it assumes it contains a pointer. So we must set kindNoPointers correctly; it isn't just a hint. Fixes golang#9425 Change-Id: Ia43da23cc3298d6e3d6dbdf66d32e9678f0aedcf Reviewed-on: https://go-review.googlesource.com/2055 Reviewed-by: Russ Cox <rsc@golang.org> (cherry picked from commit d11f411) Reviewed-on: https://go-review.googlesource.com/2800 Reviewed-by: Andrew Gerrand <adg@golang.org>
I am having a garbage collection crash (dump) in 1.4 in the code snipped below.
In 1.3.3, the same program prints "Hello" and successfully exits:
My go version is 1.4 in OSX, using Homebrew package management:
For reference: golang-nuts thread on the issue
The text was updated successfully, but these errors were encountered: