C++ sanitizers
A sanitizer instruments a native build to report memory errors, races or undefined behavior. It cannot be enabled in a prebuilt editor through a normal project
A sanitizer instruments a native build to report memory errors, races or undefined behavior. It cannot be enabled in a prebuilt editor through a normal project setting and does not replace C# debugging.
Selection
| Task | Build option | Limit |
|---|---|---|
| Out-of-bounds access, use-after-free | use_asan=yes | Changes memory use and timing |
| C++ undefined behavior | use_ubsan=yes | Requires toolchain support for the checks |
| Leaks | use_lsan=yes | Declared by Linux/BSD configuration; not a universal Windows option |
| Thread races | use_tsan=yes | Declared by Linux/BSD configuration; use a separate build |
Windows configuration declares ASAN and UBSAN, with compiler-dependent support. Do not combine every mode in one build: platform detect.py and the selected compiler toolchain determine compatibility.
Procedure
- Prepare a separate diagnostic build with symbols and the sanitizer needed. Keep the working installation intact.
- Run the minimal reproduction and retain the first complete report: violation type, address, access stack and allocation/free stacks where available.
- Fix the first violation; reports after memory corruption can be secondary symptoms.
- Repeat the same scenario after the fix and check a normal build separately.
No report means only that this instrumentation found no failure on the executed path. It does not prove the whole project free of races or leaks. Sanitized builds were not executed here.
Reckfell Engine documentationBack to top ↑