summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibSanitizer
AgeCommit message (Collapse)Author
2021-08-08LibSanitizer+AK: Add float cast overflow handlerDaniel Bertalan
This is not enabled by default in GCC, but is in Clang.
2021-06-29LibSantizer: Read $UBSAN_OPTIONS to set deadliness on first printAndrew Kaster
The first time we want to print a UBSAN violation, the UBSAN runtime in userspace will get the UBSAN_OPTIONS environment variable to check if it contains the string "halt_on_error=1". This is clearly not robust to invalid options or adding more options, but it gets the job done at the moment. :^)
2021-05-27Userland: Port UBSAN implementation to userspaceAndrew Kaster
Take Kernel/UBSanitizer.cpp and make a copy in LibSanitizer. We can use LibSanitizer to hold other sanitizers as people implement them :^). To enable UBSAN for LibC, DynamicLoader, and other low level system libraries, LibUBSanitizer is built as a serenity_libc, and has a static version for LibCStatic to use. The approach is the same as that taken in Note that this means now UBSAN is enabled for code generators, Lagom, Kernel, and Userspace with -DENABLE_UNDEFINED_SANTIZER=ON. In userspace however, UBSAN is not deadly (yet). Co-authored-by: ForLoveOfCats <ForLoveOfCats@vivaldi.net>