-
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
runtime/checkptr: fatal error: checkptr: pointer arithmetic result points to invalid allocation #68415
Comments
Change https://go.dev/cl/598295 mentions this issue: |
The problem is that internal/abi is a runtime package, so it cannot be built with -d=checkptr yet. The checkptr is always disabled for internal/abi (a runtime package) This causes incorrect inlining decision for abi.NoEscape function, since one marked with go:nocheckptr should not be inlined when checkptr enabled. |
Change https://go.dev/cl/599435 mentions this issue: |
Runtime functions, e.g. internal/abi.NoEscape, should not be instrumented with checkptr. But if they are inlined into a checkptr-enabled function, they will be instrumented, and may result in a check failure. Let the compiler not inline runtime functions into checkptr- enabled functions. Also undo the change in the strings package in CL 598295, as the compiler handles it now. Fixes #68511. Updates #68415. Change-Id: I78eb380855ac9dd53c1a1a628ec0da75c3e5a1a0 Reviewed-on: https://go-review.googlesource.com/c/go/+/599435 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Cuong Manh Le <[email protected]> Reviewed-by: Keith Randall <[email protected]>
Go version
go version go1.23rc1 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
Run the following program with
-gcflags=all=-d=checkptr
flag.What did you see happen?
What did you expect to see?
Normal exit like using go1.22.
The text was updated successfully, but these errors were encountered: