Skip to content

Commit ec96a15

Browse files
authored
Merge pull request #5934 from MicrosoftDocs/FromPublicMasterBranch
Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main)
2 parents 202b92b + 6999af4 commit ec96a15

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

docs/sanitizers/asan-known-issues.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "AddressSanitizer known issues and limitations"
33
description: "Technical description of the AddressSanitizer for Microsoft C/C++ known issues."
4-
ms.date: 5/14/2025
4+
ms.date: 5/21/2025
55
helpviewer_keywords: ["AddressSanitizer known issues"]
66
---
77

@@ -12,7 +12,7 @@ helpviewer_keywords: ["AddressSanitizer known issues"]
1212
1313
## <a name="incompatible-options"></a> Incompatible options and functionality
1414

15-
These options and functionality are incompatible with [`/fsanitize=address`](../build/reference/fsanitize.md) and should be disabled or avoided.
15+
The following options and functionality are incompatible with [`/fsanitize=address`](../build/reference/fsanitize.md) and should be disabled or avoided.
1616

1717
- The [`/RTC`](../build/reference/rtc-run-time-error-checks.md) options are incompatible with AddressSanitizer and should be disabled.
1818
- [Incremental linking](../build/reference/incremental-link-incrementally.md) is unsupported, and should be disabled.
@@ -26,9 +26,9 @@ These options and functionality are incompatible with [`/fsanitize=address`](../
2626

2727
## Standard library support
2828

29-
The MSVC standard library (STL) is partially enlightened to understand the AddressSanitizer and provide other checks. For more information, see [container-overflow error](./error-container-overflow.md).
29+
The MSVC standard library (STL) makes partial use of the AddressSanitizer and provides other code safety checks. For more information, see [container-overflow error](./error-container-overflow.md).
3030

31-
When annotations are disabled or in versions without support, AddressSanitizer exceptions raised in STL code do still identify true bugs. However, they aren't as precise as they could be.
31+
When annotations are disabled, or in versions of the Standard Library that don't support them, AddressSanitizer exceptions raised in STL code still identify real bugs. However, they are more precise if annotations are enabled and you use a version of the Standard Library that supports them.
3232

3333
This example demonstrates the lack of precision and the benefits of enabling annotations:
3434

@@ -60,9 +60,6 @@ AddressSanitizer (ASAN) uses a custom version of `operator new` and `operator de
6060

6161
[MFC](../mfc/mfc-concepts.md) includes custom overrides for `operator new` and `operator delete` and might miss errors like [`alloc_dealloc_mismatch`](error-alloc-dealloc-mismatch.md).
6262

63-
## Windows versions
64-
65-
Support is focused on Windows 10. MSVC AddressSanitizer was tested on 10.0.14393 (RS1), and 10.0.21323 (prerelease insider build). [Report a bug](https://aka.ms/feedback/report?space=62) if you run into issues.
6663

6764
## Memory usage
6865

@@ -82,12 +79,20 @@ As a workaround, create a *`Directory.Build.props`* file in the root of your pro
8279

8380
Thread local variables (global variables declared with `__declspec(thread)` or `thread_local`) aren't protected by AddressSanitizer. This limitation isn't specific to Windows or Microsoft Visual C++, but is a general limitation.
8481

82+
## Issues with partially sanitized executables
83+
84+
If all of the code in a process isn't compiled with `/fsanitize=address`, ASan may not be able to diagnose all memory safety errors. The most common example is when a DLL is compiled with ASan but is loaded into a process that contains code that wasn't compiled with ASan. In this case, ASan attempts to categorize allocations that took place prior to ASan initialization. Once those allocations are reallocated, ASan tries to own and monitor the lifetime of the memory.
85+
86+
If all of the DLLs that were compiled with ASan are unloaded from the process before the process ends, there may be crashes due to dangling references to intercepted functions such as `memcmp`, `memcpy`, `memmove`, and so on. For the best results, compile all modules under test with `/fsanitize=address`, or do not unload modules compiled with ASan after they enter the process.
87+
88+
Please report any bugs to our [Developer Community](https://aka.ms/feedback/report?space=62).
89+
8590
## See also
8691

87-
[AddressSanitizer overview](./asan.md)\
88-
[AddressSanitizer build and language reference](./asan-building.md)\
89-
[AddressSanitizer runtime reference](./asan-runtime.md)\
90-
[AddressSanitizer shadow bytes](./asan-shadow-bytes.md)\
91-
[AddressSanitizer cloud or distributed testing](./asan-offline-crash-dumps.md)\
92-
[AddressSanitizer debugger integration](./asan-debugger-integration.md)\
93-
[AddressSanitizer error examples](./asan-error-examples.md)
92+
[AddressSanitizer overview](asan.md)\
93+
[AddressSanitizer build and language reference](asan-building.md)\
94+
[AddressSanitizer runtime reference](asan-runtime.md)\
95+
[AddressSanitizer shadow bytes](asan-shadow-bytes.md)\
96+
[AddressSanitizer cloud or distributed testing](asan-offline-crash-dumps.md)\
97+
[AddressSanitizer debugger integration](asan-debugger-integration.md)\
98+
[AddressSanitizer error examples](asan-error-examples.md)

0 commit comments

Comments
 (0)