Skip to content

Commit 4c112db

Browse files
authored
soften wording: make clear that /Oi is needed to _reliably_ detect errors, not to detect them entirely
1 parent 2de1428 commit 4c112db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/sanitizers/error-memcpy-param-overlap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ helpviewer_keywords: ["memcpy-param-overlap error", "AddressSanitizer error memc
1010
> Address Sanitizer Error: memcpy-param-overlap
1111
1212
> [!NOTE]
13-
> The `/Oi` flag is required to detect `memcpy-param-overlap` errors. This flag tells the compiler to treat `memcpy` and `memmove` as intrinsic functions, which is necessary because some versions of the standard library implement `memcpy` and `memmove` as such. Since ASAN is a dynamic analysis tool, it can only detect errors with an observable runtime effect. Please note that when`/O2` is also set, ASan may not be able to reliably detect `memcpy-param-overlap` errors because the intrinsic variant of these functions is not guaranteed to be used. See the [`/Oi` docs](../build/reference/oi-generate-intrinsic-functions.md) for more information.
13+
> The `/Oi` flag is required to reliably detect `memcpy-param-overlap` errors. This flag tells the compiler to treat `memcpy` and `memmove` as intrinsic functions, which is necessary because some versions of the standard library implement `memcpy` and `memmove` as such. Since ASAN is a dynamic analysis tool, it can only detect errors with an observable runtime effect. Please note that when`/O2` is also set, ASan may not be able to reliably detect `memcpy-param-overlap` errors because the intrinsic variant of these functions is not guaranteed to be used. See the [`/Oi` docs](../build/reference/oi-generate-intrinsic-functions.md) for more information.
1414
1515
The CRT function [`memcpy`](../c-runtime-library/reference/memcpy-wmemcpy.md) **doesn't support** overlapping memory. The CRT provides an alternative to `memcpy` that does support overlapping memory: [`memmove`](../c-runtime-library/reference/memmove-wmemmove.md).
1616

0 commit comments

Comments
 (0)