-
Notifications
You must be signed in to change notification settings - Fork 196
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
rpmalloc and msvc asan #319
Comments
I have not tested it with asan - do you have any details you can share of what it's complaining about? Would be very interested in looking into this, both in the develop branch and also (if you have time) in the mjansson/rewrite branch |
I will collect some info, but I am on holiday now and may take a while.
Sent from Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Mattias Jansson ***@***.***>
Sent: Saturday, December 23, 2023 12:29:27 AM
To: mjansson/rpmalloc ***@***.***>
Cc: Pantelis Lekakis ***@***.***>; Author ***@***.***>
Subject: Re: [mjansson/rpmalloc] rpmalloc and msvc asan (Issue #319)
I have not tested it with asan - do you have any details you can share of what it's complaining about?
Would be very interested in looking into this, both in the develop branch and also (if you have time) in the mjansson/rewrite branch
—
Reply to this email directly, view it on GitHub<#319 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABL7J5PMPYUIZDMYDY3HW6DYKYCUPAVCNFSM6AAAAABAYVP2FKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGEYDONRYGI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Here is how rpmalloc can be used with ASAN under and MSVC. I did choose another way. I made wrapper function around the rpmalloc functions and control with a define if rpmalloc or if the default memory functions should be used. When ASAN is active then default CRT memory functions like malloc are used. This will catch if I did something stupid. The only downside is, it will not catch errors caused by rpmalloc. |
Ok started doing the same to be honest.
I use ASAN currently always in my debug builds and when that happens I revert back to the crt
Sent from Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Alex ***@***.***>
Sent: Friday, January 5, 2024 3:13:13 PM
To: mjansson/rpmalloc ***@***.***>
Cc: Pantelis Lekakis ***@***.***>; Author ***@***.***>
Subject: Re: [mjansson/rpmalloc] rpmalloc and msvc asan (Issue #319)
Here is how rpmalloc can be used with ASAN under and MSVC.
https://learn.microsoft.com/en-us/cpp/sanitizers/asan-runtime?view=msvc-170#custom-allocators-and-the-addresssanitizer-runtime
I did choose another way. I made wrapper function around the rpmalloc functions and control with a define if rpmalloc or if the default memory functions should be used. When ASAN is active then default CRT memory functions like malloc are used. This will catch if I did something stupid. The only downside is, it will not catch errors caused by rpmalloc.
—
Reply to this email directly, view it on GitHub<#319 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABL7J5N3VMAWCDLY3V6TLE3YM736TAVCNFSM6AAAAABAYVP2FKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZYGY2DCOBQGQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I am not currently sure if it's a false-positive or a valid issue, but MSVC 2022 address sanitizer complains when rpmalloc is used as the allocation method. I suspect it's a false positive as I have no runtime errors when allocating and freeing a lot of data over several frames (it's a game engine's stress test).
Is this worth investigating (and has rpmalloc been tested with asan)?
The text was updated successfully, but these errors were encountered: