MemorySanitizer Clang 22.0.0git Documentation
Albertina Call redigerade denna sida 6 dagar sedan


The MemorySanitizer run-time library ought to be linked to the final executable, so be certain to make use of clang (not ld) for the final link step. When linking shared libraries, the MemorySanitizer run-time just isn’t linked, so -Wl,-z,defs could cause link errors (don’t use it with MemorySanitizer). To get an inexpensive efficiency add -O1 or higher. To get meaningful stack traces in error messages add -fno-omit-frame-pointer. To get perfect stack traces you might must disable inlining (simply use -O1) and tail name elimination (-fno-optimize-sibling-calls). If a bug is detected, this system will print an error message to stderr and exit with a non-zero exit code. By default, MemorySanitizer exits on the first detected error. If you discover the error report arduous to understand, Memory Wave Protocol strive enabling origin monitoring. In some cases one may have to execute different code depending on whether or not MemorySanitizer is enabled. Some code shouldn’t be checked by MemorySanitizer. MemorySanitizer should still instrument such functions to keep away from false positives. Consequently, it could introduce false positives and subsequently ought to be used with care, and provided that absolutely required