Merge header codeblock from <sanitizer/asan_interface.h>

This commit is contained in:
doyle 2023-08-28 23:41:57 +10:00
parent 8619b1a7e5
commit dd4de96742
2 changed files with 6 additions and 14 deletions

View File

@ -85,25 +85,21 @@ int main()
"\n"
"ASAN provides a way to manually markup ranges of bytes to\n"
"prohibit or permit reads to those addresses. In\n"
"`<sanitizer/asan_interface.h>` there's a brief mention for the poison\n"
"and unpoison API respectively:\n"
"`<sanitizer/asan_interface.h>` there's a vague brief mention to\n"
"alignment requirements for the poison API:\n"
"\n"
"```cpp\n"
"/// ... This function is not guaranteed to poison the entire region -\n"
"/// it could poison only a subregion of <c>[addr, addr+size)</c> due to ASan\n"
"/// alignment restrictions.\n"
"void __asan_poison_memory_region(void const volatile *addr, size_t size);\n"
"```\n"
"\n"
"and:\n"
"\n"
"```cpp\n"
"/// ... This function could unpoison a super-region of <c>[addr, addr+size)</c> due\n"
"/// to ASan alignment restrictions.\n"
"void __asan_unpoison_memory_region(void const volatile *addr, size_t size);\n"
"```\n"
"\n"
"There's another brief foot-note in Google's "
"There's another small foot-note in Google's "
"[AddressSanitizerManualPoisoning](https://github.com/google/"
"sanitizers/wiki/AddressSanitizerManualPoisoning)\n"
"documentation that states:\n"

View File

@ -26,25 +26,21 @@ marked-up memory that may lead to undetected read/writes.
ASAN provides a way to manually markup ranges of bytes to
prohibit or permit reads to those addresses. In
`<sanitizer/asan_interface.h>` there's a brief mention for the poison
and unpoison API respectively:
`<sanitizer/asan_interface.h>` there's a vague brief mention to
alignment requirements for the poison API:
```cpp
/// ... This function is not guaranteed to poison the entire region -
/// it could poison only a subregion of <c>[addr, addr+size)</c> due to ASan
/// alignment restrictions.
void __asan_poison_memory_region(void const volatile *addr, size_t size);
```
and:
```cpp
/// ... This function could unpoison a super-region of <c>[addr, addr+size)</c> due
/// to ASan alignment restrictions.
void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
```
There's another brief foot-note in Google's [AddressSanitizerManualPoisoning](https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning)
There's another small foot-note in Google's [AddressSanitizerManualPoisoning](https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning)
documentation that states:
```