mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-18 20:02:22 -07:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user