--- wikisrc/users/kamil/sanitizers.mdwn 2018/08/11 12:14:52 1.1 +++ wikisrc/users/kamil/sanitizers.mdwn 2018/08/11 12:33:22 1.6 @@ -43,6 +43,17 @@ The compiler-rt package ships with libBl As a NetBSD specific extension, there is a micro-UBSan runtime developed and maintained in the NetBSD source code. It is designed to function inside libc (uUBSan - usermode-UBSan) and inside the kernel (kUBSan - kernel-UBSan). +# Types of runtimes + +There are two types of sanitizer runtimes: + + * dynamically linked ones (default in GCC) + * statically linked ones (default in Clang) + +Base GCC/NetBSD works with the former, upstream HEAD version of LLVM/NetBSD works with the latter. + +Both compilers should support both of them, but the other options (GCC/NetBSD & static runtime, LLVM/NetBSD & dynamic runtime) are to be done. + # Sanitizers in NetBSD Sanitizers in NetBSD are shipped with the following options: @@ -54,11 +65,11 @@ Sanitizers in NetBSD are shipped with th MKSANITIZER blog entry: -http://blog.netbsd.org/tnf/entry/mksanitizer_bug_detector_software_integration +[http://blog.netbsd.org/tnf/entry/mksanitizer_bug_detector_software_integration](http://blog.netbsd.org/tnf/entry/mksanitizer_bug_detector_software_integration) MKLIBCSANITIZER and kernel sanitizer blog entry: -http://blog.netbsd.org/tnf/entry/introduction_to_%C2%B5ubsan_a_clean +[http://blog.netbsd.org/tnf/entry/introduction_to_%C2%B5ubsan_a_clean](http://blog.netbsd.org/tnf/entry/introduction_to_%C2%B5ubsan_a_clean) # Support in NetBSD @@ -86,7 +97,7 @@ The GCC compiler assumed the version in ### GCC with the default runtime Name | NetBSD status -----------+--------------------------------- +----------|--------------------------------- UBSan | mostly works with all ports ASan | mostly works with amd64 and i386 LSan | might work with amd64 and i386 @@ -98,13 +109,13 @@ Untested. ### GCC with MKLIBCSANITIZER Name | NetBSD status -----------+--------------------------------- +----------|--------------------------------- UBSan | works with micro-UBSan ### GCC with kernel sanitizers Name | NetBSD status -----------+--------------------------------- +----------|--------------------------------- UBSan | works with micro-UBSan ## LLVM @@ -114,24 +125,27 @@ The LLVM support is available only with ### LLVM with the default runtime Name | NetBSD status -----------+--------------------------------- -UBSan | works with all ports -ASan | works with amd64 and i386 -MSan | works with amd64 -TSan | works with amd64 +----------|--------------------------------- +UBSan | mostly works with all LLVM ports +ASan | mostly works with amd64 and i386 +MSan | mostly works with amd64 +TSan | mostly works with amd64 ### LLVM with MKSANITIZER -Untested. +Name | NetBSD status +----------|--------------------------------- +UBSan | mostly works with all LLVM ports +ASan | mostly works with amd64 and i386 ### LLVM with MKLIBCSANITIZER Name | NetBSD status -----------+--------------------------------- +----------|--------------------------------- UBSan | works with micro-UBSan ### LLVM with kernel sanitizers Name | NetBSD status -----------+--------------------------------- +----------|--------------------------------- UBSan | works with micro-UBSan