Guide agents through choosing, enabling, and interpreting compiler runtime sanitizers for finding memory errors, undefined behaviour, data races, and memory leaks.
| detectleaks=0/1 | Enable LeakSanitizer (default 1 on Linux) | | abortonerror=1 | Call abort() instead of exit() (for core dumps) | | logpath=path | Write report to file | | symbolize=1 | Symbolize addresses (needs llvm-symbolizer in PATH) | | fastunwindonmalloc=0 | More accurate stacks (slower) | | quarantinesizemb=256 | Delay reuse of freed memory |
Reading: the top frame in WRITE/READ is the access site; the allocated at stack shows the allocation. The region is 40 bytes at [start, end) and the access is at end = one byte past the end (classic off-by-one).
C/C++의 런타임 버그 감지를 위한 컴파일러 새니타이저 기술입니다. GCC 또는 Clang을 사용하여 AddressSanitizer(ASan), UndefineBehaviorSanitizer(UBSan), ThreadSanitizer(TSan), MemorySanitizer(MSan) 또는 LeakSanitizer(LSan)를 활성화하고 해석할 때 사용합니다. 새니타이저 플래그, 새니타이저 보고서, ASAN_OPTIONS, 메모리 오류, 데이터 경합, 정의되지 않은 동작, 초기화되지 않은 읽기 또는 특정 버그 클래스에 사용할 새니타이저 선택에 대한 쿼리에 대해 활성화됩니다. 출처: mohitmishra786/low-level-dev-skills.