Merge header codeblock from <sanitizer/asan_interface.h>

This commit is contained in:
doyle 2023-08-28 23:31:21 +10:00
parent 1aa3728a55
commit 4ffbaf815a

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"