-
Notifications
You must be signed in to change notification settings - Fork 46
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
By pass address sanitizer for BadEuler1DSolver member function #261
Conversation
cpp/modmesh/modmesh.hpp
Outdated
#if defined(USE_SANITIZER) && (defined(__clang__) || defined(__GNUC__)) | ||
#define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) | ||
#else | ||
#define ATTRIBUTE_NO_SANITIZE_ADDRESS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can leave a TODO here for Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the advice!
I have left a TODO comment in 0132dce
I also noticed that there are tons of issues from asan... |
Agree. I'll help to organize these asan issues. If this PR is ready to merge, I think we can open an issue to track these asan issue, then this PR can be close. @tigercosmos, @yungyuc what do you think ? |
a9ab6f7
to
0132dce
Compare
thanks. LGTM |
cpp/modmesh/modmesh.hpp
Outdated
@@ -40,4 +40,11 @@ | |||
#include <modmesh/mesh/mesh.hpp> | |||
#include <modmesh/toggle/toggle.hpp> | |||
|
|||
// TODO Add MSVC case once sanitizer can be default turned on for CI testing | |||
#if defined(USE_SANITIZER) && (defined(__clang__) || defined(__GNUC__)) | |||
#define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about we name this kind of macros as ASAN_...
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the recommendations, I have changed the marco in 58ed2df
LGTM. Merging. |
@tigercosmos, we can continue the discussion of #257 here.
I have added
ElementBase::neg()
andElementBase::xpos()
to address sanitize whitelist.After bypass address sanity check, modmesh still got tons of memory detection.
Here is the final result snippet :
SUMMARY: AddressSanitizer: 166560 byte(s) leaked in 2070 allocation(s).
I also attached the sanitizer log : asan_log.txt
reference : Google sanitizer - How to turn off instrumentation