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

Fix valgrind allocator mismatch warnings #2766

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Apr 14, 2024

This PR fixes warnings flagged by valgrind when running HostTests.

Fix mismatched new/delete issues with SharedMemoryStream

Use correct templated allocation, also simplifies code.

Fix mismatched allocators with LimitedMemoryStream

Use malloc/freeinstead of new/delete, as for MemoryDataStream. Resolves issue with mismatch highlighted by valgrind usingmoveString`.
Also add null check in allocation.

Use malloc/free` instead of new/delete, as for MemoryDataStream.
Resolves issue with mismatch highlighted by valgrind using `moveString`.
Also add null check in allocation.
@mikee47 mikee47 force-pushed the fix/sharedmemorystream branch 2 times, most recently from 8961492 to 208752e Compare April 14, 2024 15:04
@mikee47 mikee47 force-pushed the fix/sharedmemorystream branch from 208752e to 8ed0253 Compare April 14, 2024 15:15
@mikee47 mikee47 changed the title Fix valgrind allocation warnings Fix valgrind allocator mismatch warnings Apr 14, 2024
@slaff slaff added this to the 5.2.0 milestone Apr 15, 2024
@slaff slaff merged commit 2c3ed1b into SmingHub:develop Apr 15, 2024
45 of 46 checks passed
@mikee47 mikee47 deleted the fix/sharedmemorystream branch April 15, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants