[all-commits] [llvm/llvm-project] c47ec9: [MemorySanitizer] Support memcpy.inline and memset...
Marco Elver via All-commits
all-commits at lists.llvm.org
Thu Aug 11 01:45:29 PDT 2022
Author: Marco Elver <elver at google.com>
Date: 2022-08-11 (Thu, 11 Aug 2022)
[MemorySanitizer] Support memcpy.inline and memset.inline
Other sanitizers (ASan, TSan, see added tests) already handle
memcpy.inline and memset.inline by not relying on InstVisitor to turn
the intrinsics into calls. Only MSan instrumentation currently does not
support them due to missing InstVisitor callbacks.
Fix it by actually making InstVisitor handle Mem*InlineInst.
While the mem*.inline intrinsics promise no calls to external functions
as an optimization, for the sanitizers we need to break this guarantee
since access into the runtime is required either way, and performance
can no longer be guaranteed. All other cases, where generating a call is
incorrect, should instead use no_sanitize.
Reviewed By: vitalybuka, dvyukov
Differential Revision: https://reviews.llvm.org/D131577
More information about the All-commits