You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sanitizers/asan-known-issues.md
+19-14Lines changed: 19 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "AddressSanitizer known issues and limitations"
3
3
description: "Technical description of the AddressSanitizer for Microsoft C/C++ known issues."
4
-
ms.date: 5/14/2025
4
+
ms.date: 5/21/2025
5
5
helpviewer_keywords: ["AddressSanitizer known issues"]
6
6
---
7
7
@@ -12,7 +12,7 @@ helpviewer_keywords: ["AddressSanitizer known issues"]
12
12
13
13
## <aname="incompatible-options"></a> Incompatible options and functionality
14
14
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.
16
16
17
17
- The [`/RTC`](../build/reference/rtc-run-time-error-checks.md) options are incompatible with AddressSanitizer and should be disabled.
18
18
-[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`](../
26
26
27
27
## Standard library support
28
28
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).
30
30
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.
32
32
33
33
This example demonstrates the lack of precision and the benefits of enabling annotations:
34
34
@@ -60,9 +60,6 @@ AddressSanitizer (ASAN) uses a custom version of `operator new` and `operator de
60
60
61
61
[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).
62
62
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.
66
63
67
64
## Memory usage
68
65
@@ -82,12 +79,20 @@ As a workaround, create a *`Directory.Build.props`* file in the root of your pro
82
79
83
80
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.
84
81
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
+
85
90
## See also
86
91
87
-
[AddressSanitizer overview](./asan.md)\
88
-
[AddressSanitizer build and language reference](./asan-building.md)\
0 commit comments