-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add support MemorySanitizer for casr-san
#249
base: master
Are you sure you want to change the base?
Conversation
@PavlNekrasov, |
The test is passing on my end. Could you please provide more details about what's failing? ![]() |
https://github.com/ispras/casr/actions/runs/13518558010/job/37773097005#step:5:1406 you may try adding debug printing and debug inside this pr |
btw, the test, also, fails on my personal machine with Ubuntu 22.04. You may try to reproduce it inside a clean docker with ubuntu 22.04 |
I run on ALT Linux, and the stacktrace is as follows:
In Ubuntu 22, it is:
I've corrected the tests to account for this |
@PavlNekrasov, thanks a lot! Please, give us some time to review the patch |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #249 +/- ##
==========================================
- Coverage 66.40% 66.37% -0.03%
==========================================
Files 34 34
Lines 8213 8245 +32
==========================================
+ Hits 5454 5473 +19
- Misses 2759 2772 +13 ☔ View full report in Codecov by Sentry. |
@PavlNekrasov, can you, also, please, update the README and add an example of collecting report for MemorySanitizer? |
report.execution_class = severity; | ||
} else { | ||
eprintln!("Couldn't estimate severity. {}", severity.err().unwrap()); | ||
} |
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.
I suppose we may move the duplicate code here inside a function
Update |
done |
@@ -74,6 +74,7 @@ crashes. | |||
It can analyze crashes from different sources: | |||
|
|||
* AddressSanitizer | |||
* MemorySanitizer |
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.
update also here https://github.com/ispras/casr/blob/master/libcasr/src/lib.rs#L8
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.
@PavlNekrasov, we also need to support correct work with casr-python
, when MemorySanitizer is triggered in C/C++ python extensions. It must be enough to modify this code.
@@ -145,6 +146,11 @@ Create report from AddressSanitizer output: | |||
$ clang++ -fsanitize=address -O0 -g casr/tests/casr_tests/test_asan_df.cpp -o test_asan_df | |||
$ casr-san -o asan.casrep -- ./test_asan_df | |||
|
|||
Create report from MemorySanitizer output: | |||
|
|||
$ clang++ -fsanitize=memory -O0 casr/tests/casr_tests/test_msan.cpp -o test_msan |
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.
Add -g
flag. Just for the sake of uniformity.
@@ -3080,6 +3080,68 @@ fn test_casr_san() { | |||
panic!("Couldn't parse json report file."); | |||
} | |||
|
|||
// Msan test |
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.
Imho, this needs to be taken out into a separate test.
Follow up to #248
Reporter: Pavel Nekrasov ([email protected])