diff options
| author | Lucas Perlind <perlindluca@gmail.com> | 2025-05-01 20:42:21 +1000 |
|---|---|---|
| committer | Lucas Perlind <perlindluca@gmail.com> | 2025-05-01 20:42:21 +1000 |
| commit | 5c73b4ef5829f0d722fdbb8ba8d84709563505a0 (patch) | |
| tree | de05451132196b8adb43d44a57414f9e8ffa267d /src/checker.cpp | |
| parent | b04a83ce9fa0a3ed36ce5c774280e47f28246e0a (diff) | |
Add attribute @(no_sanitize_address)
The purposes of this attribute is to let procedures opt-out of being
instrumented with asan. Typically an allocator that includes 'in-band'
meta-data will be accessing poisoned values (such as tlsf).
Making asan work with these allocators becomes very challenging so
just being to ignore asan within specific allocator procedures
makes it easier to reason and removes the need to temporarily
poison and unpoison allocator data.
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index 038c5aa1a..5e1517875 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -3711,6 +3711,12 @@ gb_internal DECL_ATTRIBUTE_PROC(proc_decl_attribute) { } ac->instrumentation_exit = true; return true; + } else if (name == "no_sanitize_address") { + if (value != nullptr) { + error(value, "'%.*s' expects no parameter", LIT(name)); + } + ac->no_sanitize_address = true; + return true; } return false; } |