Closed noahp closed 3 years ago
Thanks @noahp!
Do you know which particular sanitizer(s) were hanging for you? I've seen one of them fail completely (Address, I think) due to libc tests that check handling of NULL input cases, which are handled differently by the sanitizer library.
Thanks @noahp!
Do you know which particular sanitizer(s) were hanging for you? I've seen one of them fail completely (Address, I think) due to libc tests that check handling of NULL input cases, which are handled differently by the sanitizer library.
:'( actually I can't successfully run the test on the previous commit, using a ubuntu 20.04 host if that's important. Let me try in a ubuntu 18.04 dockerfile, just a second.
Hm, I'll look into that. I recently fixed a problem that occurred on Ubuntu, I'll make sure that actually landed :).
@noahp,
Can you see if changing the disable-builtins
to true
resolves the hang for you with Ubuntu? (Note that you'll need to reconfigure the project or use meson configure
for it to take effect)
option('disable-builtins', type: 'boolean', value: false,
description: 'Tell the compiler not to generate builtin functions.',
yield: true)
Yup, that worked! with builtins enabled, here's where it hangs:
> gdb buildresults/test/libc_test
...
>>> bt
#0 0x0000555555560dcb in calloc ()
#1 0x00007ffff7bd0231 in _cmocka_run_group_tests () at buildresults/test/../subprojects/cmocka-1.1.5/src/libcmocka_native.so.0
#2 0x00005555555569c2 in isalnum_tests ()
#3 0x0000555555556640 in ctype_tests ()
#4 0x0000555555556500 in main ()
Spins forever there.
Apologies, this patch has gotten a little stale! going to close and reopen once I get a chance to finish working through the sanitizer false positives.
Summary
Add a step to ci that runs AddressSanitize, UndefinedBehaviorSanitizer, and LeakSanitizer.
Tweak the make shim to forward any sanitizers specified into meson args.
Testing
At the moment unable to run the tests on my machine; they hang in the
libc_tests
stage with: