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/error-alloc-dealloc-mismatch.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ The `alloc`/`dealloc` mismatch functionality in AddressSanitizer is off by defau
19
19
## Example
20
20
21
21
```cpp
22
+
// example1.cpp
22
23
// Demonstrate alloc-dealloc-mismatch error
23
24
#include<stdio.h>
24
25
#include<stdlib.h>
@@ -43,7 +44,7 @@ int main(int argc, char* argv[])
43
44
}
44
45
```
45
46
46
-
Run the following commands in a Visual Studio 2019 version 16.9 or later [developer command prompt](../build/building-on-the-command-line.md#developer_command_prompt_shortcuts) to run the example:
47
+
In a Visual Studio 2019 version 16.9 or later [developer command prompt](../build/building-on-the-command-line.md#developer_command_prompt_shortcuts), run the following commands to see an exampe of `alloc_dealloc_mismatch`:
47
48
48
49
```cmd
49
50
cl example1.cpp /fsanitize=address /Zi
@@ -53,7 +54,7 @@ devenv /debugexe example1.exe 2
53
54
54
55
### Output
55
56
56
-
:::image type="content" source="media/alloc-dealloc-mismatch-example-1.png" alt-text="Screenshot of debugger displaying alloc-dealloc-mismatch error in example 1.":::
57
+
:::image type="content" source="media/alloc-dealloc-mismatch-example-1.png" alt-text="Screenshot of debugger displaying alloc-dealloc-mismatch error in example 1." lightbox="media/media/alloc-dealloc-mismatch-example-1.png":::
0 commit comments