-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Port LeakSanitizer to emscripten #8711
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
Conversation
99e81fe to
af770e1
Compare
8a396b5 to
280803d
Compare
tests/test_other.py
Outdated
| def do_smart_test(self, source, name='test.cpp', literals=[], regexes=[], | ||
| emcc_args=[], run_args=[], assert_returncode=0): | ||
| shutil.copyfile(source, name) | ||
| run_process([PYTHON, EMCC, name] + emcc_args) |
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.
self.get_emcc_args() is better I think
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 don't think anything in test_other.py uses self.emcc_args.
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 recall that @kripken wants no tests in test_other to use self.emcc_args and the mechanism behind that.
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 believe that is incorrect. For self.set_setting() and self.emcc_args shouldn't work for all test subclasses. Thats the point of the common code in runner.py. @kripken can you confirm?
The set_setting/get_setting/emcc_args/build stuff in RunnerCore is all generic right?
|
|
||
|
|
||
| class libubsan_rt_wasm(SanitizerLibrary): | ||
| name = 'libubsan_rt_wasm' |
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.
Do these libraries need to end in _wasm? I think think that was only need when we have certain parts a library that were wasm only. In these cases I don't think its needed.
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.
In this case, the entire library is wasm only. I think we can wait until we get rid of fastcomp to get rid of the _wasm suffix.
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.
Also note that this is already in the code. I don't think we should change the name of all sanitizer libraries in this change.
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.
OK, lets do that as a followup perhaps.
sbc100
left a comment
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.
Only had a quick glance, but seems reasonable. I'll defer to @tlively.
|
|
||
|
|
||
| class libubsan_rt_wasm(SanitizerLibrary): | ||
| name = 'libubsan_rt_wasm' |
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.
OK, lets do that as a followup perhaps.
| } | ||
|
|
||
| void DoStopTheWorld(StopTheWorldCallback callback, void *argument) { | ||
| StopTheWorld(callback, argument); |
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.
Comment that this is a nop please!
This seems sufficiently stable for an initial version.
The bullet, poppler, sqlite3 tests all run fine under LSan, without false positives. Leaks were introduced into sqlite3 and it was caught by LSan.
Limitations: