unique: Fatal errors (found bad pointer in Go heap, found pointer to free object) and memory corruption #69643
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
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: