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

cmd/compile: stack corruption in github.com/go-openapi/swag tests #19278

Closed
heschi opened this issue Feb 24, 2017 · 4 comments
Closed

cmd/compile: stack corruption in github.com/go-openapi/swag tests #19278

heschi opened this issue Feb 24, 2017 · 4 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@heschi
Copy link
Contributor

heschi commented Feb 24, 2017

Starting at commit 0358367, the runtime crashes inside of reflect.DeepEqual while running github.com/go-openapi/swag.TestBoolMap:

runtime: bad pointer in frame reflect.DeepEqual at 0xc42005bb98: 0x1
fatal error: invalid pointer found on stack

Full crash attached. The crash changes at later revisions of the runtime, but I expect that it's a new symptom of the same underlying cause rather than a new problem.

For posterity, I checked out the code under test at the following revisions:
github.com/go-openapi/swag d5f8ebc3b1c55a4cf6489eeae7354f338cfe299e
github.com/stretchr/testify 4d4bfba8f1d1027c4fdbe371823030df51419987

@josharian

@josharian
Copy link
Contributor

Possibly related to #19275.

@heschi
Copy link
Contributor Author

heschi commented Feb 24, 2017

Maybe, but I don't think so given that the breaking commit is different. Without having fully read the code of 0358367, I would guess that the stack map says that there should be a pointer to a heap-allocated interface in the stack slot, and instead we've allocated it directly on the stack? (That 0x1 is pretty suspicious.)

@dsnet dsnet added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 24, 2017
@dsnet dsnet added this to the Go1.9 milestone Feb 24, 2017
@dr2chase
Copy link
Contributor

This appears to be closed by https://go-review.googlesource.com/c/37470/ .

@heschi
Copy link
Contributor Author

heschi commented Feb 27, 2017

Indeed. Guess I should have listened to the expert. Thanks!

@golang golang locked and limited conversation to collaborators Feb 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants