Skip to content
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

[pkg/winperfcounters] Fix -race test failures due to checkptr violations #15276

Merged

Conversation

BinaryFissionGames
Copy link
Contributor

@BinaryFissionGames BinaryFissionGames commented Oct 18, 2022

Description:

  • Avoid using the custom UTF16ToStringArray function if syscall.UTF16ToString would work just fine.
  • Avoid casting pointers to large arrays in the winperfcounters package
    • The go race detector will error with checkptr: converted pointer straddles multiple allocations otherwise

Link to tracking Issue:

Testing:

  • Remove make options disabling -race flag
  • Unit tests for affected functions

@BinaryFissionGames BinaryFissionGames changed the title Winperfcounters convert utf16ptr [pkg/winperfcounters] Fix -race test failures due to checkptr violations Oct 18, 2022
@BinaryFissionGames BinaryFissionGames force-pushed the winperfcounters-convert-utf16ptr branch from d3c0db2 to cc70722 Compare October 18, 2022 22:24
@BinaryFissionGames BinaryFissionGames marked this pull request as ready for review October 19, 2022 00:00
@BinaryFissionGames BinaryFissionGames requested a review from a team October 19, 2022 00:00
@BinaryFissionGames
Copy link
Contributor Author

cc @dmitryax

Copy link
Member

@dmitryax dmitryax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BinaryFissionGames thanks for fixing this!

@dmitryax dmitryax merged commit e776714 into open-telemetry:main Oct 19, 2022
shalper2 pushed a commit to shalper2/opentelemetry-collector-contrib that referenced this pull request Dec 6, 2022
@plantfansam plantfansam mentioned this pull request Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants