-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
x-pack/auditbeat/tracing: fix invalid span in array punning #28580
Conversation
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
This pull request is now in conflicts. Could you fix it? 🙏
|
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
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.
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)
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)
@Mergifyio backport 8.0 |
✅ Backports have been created
|
…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]>
…28898) 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]>
What does this PR do?
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
.Why is it important?
This removes invalid unsafe behaviour.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
N/A
How to test this PR locally
Standard testing.
Related issues
Use cases
N/A
Screenshots
N/A
Logs
N/A