Document base:sanitizer
This commit is contained in:
1 parent
4f00224dd2
commit
4763da4b0d
2 files changed
+262
-6
No files matched your search
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
The `sanitizer` package implements various procedures for interacting with sanitizers
|
||||
from user code.
|
||||
|
||||
An odin project can be linked with various sanitizers to help identify various different
|
||||
bugs. These sanitizers are:
|
||||
|
||||
## Address
|
||||
|
||||
Enabled with `-sanitize:address` when building an odin project.
|
||||
|
||||
The address sanitizer (asan) is a runtime memory error detector used to help find common memory
|
||||
related bugs. Typically asan interacts with libc but Odin code can be marked up to interact
|
||||
with the asan runtime to extend the memory error detection outside of libc using this package.
|
||||
For more information about asan see: https://clang.llvm.org/docs/AddressSanitizer.html
|
||||
|
||||
## Memory
|
||||
|
||||
Enabled with `-sanitize:memory` when building an odin project.
|
||||
|
||||
The memory sanitizer is another runtime memory error detector with the sole purpose to catch the
|
||||
use of uninitialized memory. This is not a very common bug in Odin as be default everything is
|
||||
set to zero when initialised (ZII).
|
||||
For more information about the memory sanitizer see: https://clang.llvm.org/docs/MemorySanitizer.html
|
||||
|
||||
## Thread
|
||||
|
||||
Enabled with `-sanitize:thread` when building an odin project.
|
||||
|
||||
The thread sanitizer is a runtime data race detector. It can be used to detect if multiple threads
|
||||
are concurrently writing and accessing a memory location without proper syncronisation.
|
||||
For more information about the thread sanitizer see: https://clang.llvm.org/docs/ThreadSanitizer.html
|
||||
|
||||
*/
|
||||
package sanitizer
|
||||
|
||||
Reference in new issue
Block a user