-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
unique: Fatal errors (found bad pointer in Go heap, found pointer to free object) and memory corruption #69643
Comments
It looks like this issue might have been the same: #69210 That seems like maybe there will be a fix in |
@connorszczepaniak-wk you can apply the fix now and test it out yourself https://go-review.googlesource.com/c/go/+/610696 |
@connorszczepaniak-wk Yeah, that's almost certainly it. And indeed, it's fixed at tip and the fix is already on the Go 1.23 release branch. It will be in the next minor release. It may be worth giving the patch a try as @MikeMitchellWebDev suggests, to confirm it does resolve the issue for you. Leaving this issue open for that reason, for now. Apologies for the breakage. |
Thanks for the quick reply; I think this may be a bit tricky for us to test out ahead of it being included in a proper patch release (it's a bit unclear how I'd apply a patch to the stdlib that we use to build in a docker image without making some significant changes to our build process), but we could test it once |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Go version
go version go1.23.1 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
In our deployed application, we started using the
unique
package to intern some strings. It's hard to provide a complete example because of the size of our application and the potential usage graph of theunique.Handle
s would be difficult to compute. We also haven't been able to repro with a more trivial example yet. The gist of it it this:getIDA
andgetIDB
are getting called in many disparate places, and potentially across many goroutines if that's important.What did you see happen?
We had a few different fatal errors occur. We also saw memory corruption; getting the value from the handle seems to have returned a string from elsewhere in the program that could never have been an input when creating this particular type.
fatal error: found pointer to free object
Stack Trace
fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)
Stack Trace
What did you expect to see?
No fatal errors and no memory corruption.
The text was updated successfully, but these errors were encountered: