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
heschik opened this issue Feb 24, 2017 · 4 comments

Comments

Projects
None yet
5 participants
@heschik
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented Feb 24, 2017

Possibly related to #19275.

@heschik

This comment has been minimized.

Copy link
Contributor Author

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 label Feb 24, 2017

@dsnet dsnet added this to the Go1.9 milestone Feb 24, 2017

@dr2chase

This comment has been minimized.

Copy link
Contributor

commented Feb 25, 2017

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

@dr2chase dr2chase closed this Feb 25, 2017

@heschik

This comment has been minimized.

Copy link
Contributor Author

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.
You can’t perform that action at this time.