-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…28897) Previously the copy for the raw case converted the unsafe pointer to a concrete array of 2048 bytes due to an unnecessary pointer dereference. This invalidly spans beyond the end of the struct allocation. This is identified either with a build using the race detector or with -gcflags=all=-d=checkptr. Rather than using unsafe punning use the unsafe.Slice function. Also clean up some pointer arithmetic syntax. (cherry picked from commit 699fcdd) Co-authored-by: Dan Kortschak <[email protected]>
- Loading branch information
1 parent
432e793
commit a048c82
Showing
2 changed files
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters