| 1 | //===-- copyprof_interceptors_memintrinsics.cpp --------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | /// |
| 9 | /// This file implements interceptors for memory intrinsic functions (memcpy, |
| 10 | /// memmove, memset) to correctly maintain shadow memory status. |
| 11 | /// |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #define SANITIZER_COMMON_NO_REDEFINE_BUILTINS |
| 15 | |
| 16 | #include "copyprof_interceptors.h" |
| 17 | #include "sanitizer_common/sanitizer_flags.h" |
| 18 | #include "sanitizer_common/sanitizer_libc.h" |
| 19 | |
| 20 | using namespace __copyprof; |
| 21 | using namespace __sanitizer; |
| 22 | |
| 23 | // The default implementations fall back to the internal intrinsics until |
| 24 | // CopyProf is initialized (they may be called during `__copyprof_init_once`, |
| 25 | // e.g. from the internals of `Printf`), and only update shadow memory if |
| 26 | // `intercept_intrin` is set. |
| 27 | #include "sanitizer_common/sanitizer_common_interceptors_memintrinsics.inc" |
| 28 | |