Skip to content

Commit 1cd5a21

Browse files
author
Colin Robertson
committed
Update screenshot borders
1 parent 13e0b05 commit 1cd5a21

20 files changed

+49
-49
lines changed

docs/sanitizers/asan-offline-crash-dumps.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@ The following steps are for local or distributed scenarios that lead to creation
5252

5353
1. Open Visual Studio and select **Continue without code**. Then select **File** > **Open** > **File** to open the File Open dialog. Make sure the file name suffix is **.dmp**.
5454

55-
![Screenshot of the File Open File menu in Visual Studio](./media/asan-open-crash-dump-file.png)
55+
:::image type="content" source="./media/asan-open-crash-dump-file.png" alt-text="Screenshot of the File Open File menu in Visual Studio.":::
5656

5757
The screen shown here needs one more step to enable the IDE access to symbols and source.
5858

5959
1. Set the symbol paths, and then choose **Debug with Native Only**.
6060

61-
![Screenshot of the Minidump Summary display in Visual Studio](./media/asan-dump-file-open.png)
61+
:::image type="content" source="./media/asan-dump-file-open.png" alt-text="Screenshot of the Minidump Summary display in Visual Studio.":::
6262

6363
This screenshot shows the final loaded dump file, with sources and AddressSanitizer metadata loaded.
6464

65-
![Screenshot of the debugger showing source files and AddressSanitizer metadata](./media/asan-view-crash-metadata.png)
65+
:::image type="content" source="./media/asan-view-crash-metadata.png" alt-text="Screenshot of the debugger showing source files and AddressSanitizer metadata.":::
6666

6767
## <a name="source"></a> Source and symbols
6868

docs/sanitizers/asan-shadowbytes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ One shadow byte describes how many bytes are currently accessible as follows:
2323

2424
Consider this shadow byte legend where all negative numbers are defined:
2525

26-
![Screenshot of the AddressSanitizer shadow-byte legend](./media/asan-shadow-byte-legend.png)
26+
:::image type="content" source="./media/asan-shadow-byte-legend.png" alt-text="Screenshot of the AddressSanitizer shadow-byte legend.":::
2727

2828
## Mapping - describing your address space
2929

docs/sanitizers/asan.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Microsoft's AddressSanitizer technology enables integration with the Visual Stud
3636

3737
The AddressSanitizer is installed by default with C++ workloads in the Visual Studio Installer. However, if you're upgrading from an older version of Visual Studio 2019, you'll need to use the Installer to enable ASan support after the upgrade:
3838

39-
![Visual Studio Installer screenshot highlighting the C++ AddressSanitizer component](media/asan-installer-option.png)
39+
:::image type="content" source="media/asan-installer-option.png" alt-text="Visual Studio Installer screenshot highlighting the C++ AddressSanitizer component":::
4040

4141
You can choose **Modify** on your existing Visual Studio installation from the Visual Studio Installer to get to the screen above.
4242

@@ -95,13 +95,13 @@ int main() {
9595

9696
Using a developer command prompt for Visual Studio 2019, compile *`main.cpp`* using `/fsanitize=address /Zi`
9797

98-
![Screenshot of a command prompt showing the command to compile with AddressSanitizer options](media/asan-command-basic-global-overflow.png)
98+
:::image type="content" source="media/asan-command-basic-global-overflow.png" alt-text="Screenshot of a command prompt showing the command to compile with AddressSanitizer options.":::
9999

100100
When you run the resulting *`main.exe`* at the command line, it creates the formatted error report seen below.
101101

102102
Consider the overlaid, red boxes that highlight seven key pieces of information:
103103

104-
![Screenshot of the debugger showing a basic global overflow error](media/asan-basic-global-overflow.png)
104+
:::image type="content" source="media/asan-basic-global-overflow.png" alt-text="Screenshot of the debugger showing a basic global overflow error.":::
105105

106106
### Red highlights, from top to bottom
107107

@@ -120,7 +120,7 @@ Consider the overlaid, red boxes that highlight seven key pieces of information:
120120

121121
AddressSanitizer is integrated with the Visual Studio IDE. To turn on the AddressSanitizer for an MSBuild project, right-click on the project in Solution Explorer and choose Properties. In the Property Pages dialog, select **Configuration Properties** > **C/C++** > **General**, then modify the **Enable AddressSanitizer** property. Choose **OK** to save your changes.
122122

123-
![Screenshot of the Property Pages dialog showing the Enable AddressSanitizer property](media/asan-project-system-dialog.png)
123+
:::image type="content" source="media/asan-project-system-dialog.png" alt-text="Screenshot of the Property Pages dialog showing the Enable AddressSanitizer property.":::
124124

125125
To build from the IDE, opt out of [these incompatible options](./asan-known-issues.md#incompatible-options). For an existing project compiled by using **`/Od`** (or Debug mode), you may need to turn off these options:
126126

@@ -130,15 +130,15 @@ To build from the IDE, opt out of [these incompatible options](./asan-known-issu
130130

131131
To build and run the debugger, enter **F5**. You'll see this window in Visual Studio:
132132

133-
![Screenshot of the debugger showing a global buffer overflow error](media/asan-global-buffer-overflow-F5.png)
133+
:::image type="content" source="media/asan-global-buffer-overflow-F5.png" alt-text="Screenshot of the debugger showing a global buffer overflow error.":::
134134

135135
## <a name="ide-cmake"></a> Using the AddressSanitizer from Visual Studio: CMake
136136

137137
To enable the AddressSanitizer for [a CMake project created to target Windows](../build/cmake-projects-in-visual-studio.md), take these steps:
138138

139139
1. Open the **Configurations** dropdown in the toolbar at the top of the IDE and select **Manage Configurations**.
140140

141-
![Screenshot of the CMake configuration dropdown](media/asan-cmake-configuration-dropdown.png)
141+
:::image type="content" source="media/asan-cmake-configuration-dropdown.png" alt-text="Screenshot of the CMake configuration dropdown.":::
142142

143143
That selection opens the CMake Project Settings UI, which is saved in a CMakeSettings.json file.
144144

@@ -148,13 +148,13 @@ To enable the AddressSanitizer for [a CMake project created to target Windows](.
148148

149149
This image is of CMakeSettings.json after that change:
150150

151-
![Screenshot of the text editor view of CMakeSettings.json](media/asan-cmake-json.png)
151+
:::image type="content" source="media/asan-cmake-json.png" alt-text="Screenshot of the text editor view of CMakeSettings.json.":::
152152

153153
1. Enter **Ctrl+S** to save this JSON file, then enter **F5** to recompile and run under the debugger.
154154

155155
This screenshot captures the error from the CMake build.
156156

157-
![Screenshot of the CMake build error message](media/asan-cmake-error-f5.png)
157+
:::image type="content" source="media/asan-cmake-error-f5.png" alt-text="Screenshot of the CMake build error message.":::
158158

159159
## <a name="crash-dumps"></a> AddressSanitizer crash dumps
160160

@@ -164,11 +164,11 @@ These new dump files can lead to efficiencies when analyzing a bug. You don't ne
164164

165165
To produce a new type of dump file that can be viewed in Visual Studio on another machine at a later date:
166166

167-
```makefile
167+
```cmd
168168
set ASAN_SAVE_DUMPS=MyFileName.dmp
169169
```
170170

171-
Starting with Visual Studio 16.9 you can display **a precisely diagnosed error**, stored in MyFileName.dmp, on top of your source code.
171+
Starting with Visual Studio 16.9 you can display **a precisely diagnosed error**, stored in your *`*.dmp`* file, on top of your source code.
172172

173173
[This new crash dump functionality](./asan-offline-crash-dumps.md) enables cloud-based workflows, or distributed testing. It can also be used to file a detailed, actionable bug in any scenario.
174174

docs/sanitizers/error-alloc-dealloc-mismatch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ devenv /debugexe example1.exe 2
5050

5151
### Resulting error
5252

53-
![Screenshot of debugger displaying alloc-dealloc-mismatch error in example 1.](media/alloc-dealloc-mismatch-example-1.png)
53+
:::image type="content" source="media/alloc-dealloc-mismatch-example-1.png" alt-text="Screenshot of debugger displaying alloc-dealloc-mismatch error in example 1.":::
5454

5555
## See also
5656

docs/sanitizers/error-allocation-size-too-big.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ devenv /debugexe example1.exe
4646

4747
### Resulting error
4848

49-
![Screenshot of debugger displaying allocation-size-too-big error in example 1.](media/allocation-size-too-big-example-1.png)
49+
:::image type="content" source="media/allocation-size-too-big-example-1.png" alt-text="Screenshot of debugger displaying allocation-size-too-big error in example 1.":::
5050

5151
## See also
5252

docs/sanitizers/error-calloc-overflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ devenv /debugexe example1.exe
4141

4242
### Resulting error
4343

44-
![Screenshot of debugger displaying calloc-overflow error in example 1.](media/calloc-overflow-example-1.png)
44+
:::image type="content" source="media/calloc-overflow-example-1.png" alt-text="Screenshot of debugger displaying calloc-overflow error in example 1.":::
4545

4646
## See also
4747

docs/sanitizers/error-double-free.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ devenv /debugexe example1.exe
3838

3939
### Resulting error - double `operator delete`
4040

41-
![Screenshot of debugger displaying double-free error in example 1.](media/double-free-example-1.png)
41+
:::image type="content" source="media/double-free-example-1.png" alt-text="Screenshot of debugger displaying double-free error in example 1.":::
4242

4343
## Example 'C' - double `free`
4444

@@ -71,7 +71,7 @@ devenv /debugexe example2.exe
7171

7272
### Resulting error - double `free`
7373

74-
![Screenshot of debugger displaying double-free error in example 2.](media/double-free-example-2.png)
74+
:::image type="content" source="media/double-free-example-2.png" alt-text="Screenshot of debugger displaying double-free error in example 2.":::
7575

7676
## Example - Windows `HeapCreate` double `HeapFree`
7777

@@ -101,7 +101,7 @@ devenv /debugexe example3.exe
101101

102102
### Resulting error - Windows `HeapCreate` double `HeapFree`
103103

104-
![Screenshot of debugger displaying double-free error in example 3.](media/double-free-example-3.png)
104+
:::image type="content" source="media/double-free-example-3.png" alt-text="Screenshot of debugger displaying double-free error in example 3.":::
105105

106106
## See also
107107

docs/sanitizers/error-dynamic-stack-buffer-overflow.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ devenv /debugexe example1.exe
4444

4545
### Resulting error
4646

47-
![Screenshot of debugger displaying dynamic-stack-buffer-overflow error in example 1.](media/dynamic-stack-buffer-overflow-example-1.png)
47+
:::image type="content" source="media/dynamic-stack-buffer-overflow-example-1.png" alt-text="Screenshot of debugger displaying dynamic-stack-buffer-overflow error in example 1.":::
4848

4949
## Example - `alloca` overflow (left)
5050

@@ -76,7 +76,7 @@ devenv /debugexe example2.exe
7676

7777
### Resulting error - `alloca` overflow (left)
7878

79-
![Screenshot of debugger displaying dynamic-stack-buffer-overflow error in example 2.](media/dynamic-stack-buffer-overflow-example-2.png)
79+
:::image type="content" source="media/dynamic-stack-buffer-overflow-example-2.png" alt-text="Screenshot of debugger displaying dynamic-stack-buffer-overflow error in example 2.":::
8080

8181
## Example - several calls to `alloca`
8282

@@ -166,7 +166,7 @@ devenv /debugexe example3.exe
166166

167167
### Resulting error - several calls to alloca
168168

169-
![Screenshot of debugger displaying dynamic-stack-buffer-overflow error in example 3.](media/dynamic-stack-buffer-overflow-example-3.png)
169+
:::image type="content" source="media/dynamic-stack-buffer-overflow-example-3.png" alt-text="Screenshot of debugger displaying dynamic-stack-buffer-overflow error in example 3.":::
170170

171171
## See also
172172

docs/sanitizers/error-global-buffer-overflow.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ devenv /debugexe example1-main.exe
5959

6060
### Resulting error
6161

62-
![Screenshot of debugger displaying global-buffer-overflow error in example 1.](media/global-overflow-example-1.png)
62+
:::image type="content" source="media/global-overflow-example-1.png" alt-text="Screenshot of debugger displaying global-buffer-overflow error in example 1.":::
6363

6464
## Example - simple function level static
6565

@@ -93,7 +93,7 @@ devenv /debugexe example2.exe
9393

9494
### Resulting error - simple function level static
9595

96-
![Screenshot of debugger displaying global-buffer-overflow error in example 2.](media/global-overflow-example-2.png)
96+
:::image type="content" source="media/global-overflow-example-2.png" alt-text="Screenshot of debugger displaying global-buffer-overflow error in example 2.":::
9797

9898
## Example - all global scopes in C++
9999

@@ -149,7 +149,7 @@ devenv /debugexe example3.exe -l
149149

150150
### Resulting error - all global scopes in C++
151151

152-
![Screenshot of debugger displaying global-buffer-overflow error in example 3.](media/global-overflow-example-3.png)
152+
:::image type="content" source="media/global-overflow-example-3.png" alt-text="Screenshot of debugger displaying global-buffer-overflow error in example 3.":::
153153

154154
## See also
155155

docs/sanitizers/error-heap-buffer-overflow.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ devenv /debugexe example1.exe
3939

4040
### Resulting error
4141

42-
![Screenshot of debugger displaying heap-buffer-overflow error in example 1.](media/heap-buffer-overflow-example-1.png)
42+
:::image type="content" source="media/heap-buffer-overflow-example-1.png" alt-text="Screenshot of debugger displaying heap-buffer-overflow error in example 1.":::
4343

4444
## Example - improper down cast
4545

@@ -74,7 +74,7 @@ devenv /debugexe example2.exe
7474

7575
### Resulting error - improper down cast
7676

77-
![Screenshot of debugger displaying heap-buffer-overflow error in example 2.](media/heap-buffer-overflow-example-2.png)
77+
:::image type="content" source="media/heap-buffer-overflow-example-2.png" alt-text="Screenshot of debugger displaying heap-buffer-overflow error in example 2.":::
7878

7979
## Example - strncpy into heap
8080

@@ -105,7 +105,7 @@ devenv /debugexe example3.exe
105105

106106
### Resulting error - strncpy into heap
107107

108-
![Screenshot of debugger displaying heap-buffer-overflow error in example 3.](media/heap-buffer-overflow-example-3.png)
108+
:::image type="content" source="media/heap-buffer-overflow-example-3.png" alt-text="Screenshot of debugger displaying heap-buffer-overflow error in example 3.":::
109109

110110
## See also
111111

docs/sanitizers/error-heap-use-after-free.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ devenv /debugexe example1.exe
3737

3838
### Resulting error
3939

40-
![Screenshot of debugger displaying heap-use-after-free error in example 1.](media/heap-use-after-free-example-1.png)
40+
:::image type="content" source="media/heap-use-after-free-example-1.png" alt-text="Screenshot of debugger displaying heap-use-after-free error in example 1.":::
4141

4242
## Example - `operator new`
4343

@@ -66,7 +66,7 @@ devenv /debugexe example2.exe
6666

6767
### Resulting error - operator new
6868

69-
![Screenshot of debugger displaying heap-use-after-free error in example 2.](media/heap-use-after-free-example-2.png)
69+
:::image type="content" source="media/heap-use-after-free-example-2.png" alt-text="Screenshot of debugger displaying heap-use-after-free error in example 2.":::
7070

7171
## Example - `realloc`
7272

@@ -95,7 +95,7 @@ devenv /debugexe example3.exe
9595

9696
### Resulting error - realloc
9797

98-
![Screenshot of debugger displaying heap-use-after-free error in example 3.](media/heap-use-after-free-example-3.png)
98+
:::image type="content" source="media/heap-use-after-free-example-3.png" alt-text="Screenshot of debugger displaying heap-use-after-free error in example 3.":::
9999

100100
## Example - volatile
101101

@@ -124,7 +124,7 @@ devenv /debugexe example4.exe
124124

125125
### Resulting error - volatile
126126

127-
![Screenshot of debugger displaying error in example 4.](media/heap-use-after-free-example-4.png)
127+
:::image type="content" source="media/heap-use-after-free-example-4.png" alt-text="Screenshot of debugger displaying error in example 4.":::
128128

129129
## See also
130130

docs/sanitizers/error-invalid-allocation-alignment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ devenv /debugexe example1.exe
3838

3939
### Resulting error
4040

41-
![Screenshot of debugger displaying invalid-allocation-alignment error in example 1.](media/invalid-allocation-alignment-example-1.png)
41+
:::image type="content" source="media/invalid-allocation-alignment-example-1.png" alt-text="Screenshot of debugger displaying invalid-allocation-alignment error in example 1.":::
4242

4343
## See also
4444

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ devenv /debugexe example1.exe
4343

4444
### Resulting error
4545

46-
![Screenshot of debugger displaying memcpy-param-overlap error in example 1.](media/memcpy-param-overlap-example-1.png)
46+
:::image type="content" source="media/memcpy-param-overlap-example-1.png" alt-text="Screenshot of debugger displaying memcpy-param-overlap error in example 1.":::
4747

4848
## See also
4949

docs/sanitizers/error-new-delete-type-mismatch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ devenv /debugexe example1.exe
6060

6161
### Resulting error
6262

63-
![Screenshot of debugger displaying new-delete-type-mismatch error in example 1.](media/new-delete-type-mismatch-example-1.png)
63+
:::image type="content" source="media/new-delete-type-mismatch-example-1.png" alt-text="Screenshot of debugger displaying new-delete-type-mismatch error in example 1.":::
6464

6565
## See also
6666

docs/sanitizers/error-stack-buffer-overflow.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ devenv /debugexe example1.exe
3636

3737
### Resulting error
3838

39-
![Screenshot of debugger displaying stack-buffer-overflow error in example 1.](media/stack-buffer-overflow-example-1.png)
39+
:::image type="content" source="media/stack-buffer-overflow-example-1.png" alt-text="Screenshot of debugger displaying stack-buffer-overflow error in example 1.":::
4040

4141
## Example - Stack buffer math
4242

@@ -72,7 +72,7 @@ devenv /debugexe example2.exe 9
7272

7373
### Resulting error - Stack buffer math
7474

75-
![Screenshot of debugger displaying stack-buffer-overflow error in example 2.](media/stack-buffer-overflow-example-2.png)
75+
:::image type="content" source="media/stack-buffer-overflow-example-2.png" alt-text="Screenshot of debugger displaying stack-buffer-overflow error in example 2.":::
7676

7777
## Example - improper down cast on stack
7878

@@ -108,7 +108,7 @@ devenv /debugexe example3.exe
108108

109109
### Resulting error - improper down cast on stack
110110

111-
![Screenshot of debugger displaying stack-buffer-overflow error in example 3.](media/stack-buffer-overflow-example-3.png)
111+
:::image type="content" source="media/stack-buffer-overflow-example-3.png" alt-text="Screenshot of debugger displaying stack-buffer-overflow error in example 3.":::
112112

113113
## See also
114114

docs/sanitizers/error-stack-buffer-underflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ devenv /debugexe example1.exe
3737

3838
### Resulting error
3939

40-
![Screenshot of debugger displaying stack-buffer-underflow error in example 1.](media/stack-buffer-underflow-example-1.png)
40+
:::image type="content" source="media/stack-buffer-underflow-example-1.png" alt-text="Screenshot of debugger displaying stack-buffer-underflow error in example 1.":::
4141

4242
## Example - stack underflow on thread
4343

@@ -74,7 +74,7 @@ devenv /debugexe example2.exe
7474

7575
### Resulting error - stack underflow on thread
7676

77-
![Screenshot of debugger displaying stack-buffer-underflow error in example 2.](media/stack-buffer-underflow-example-2.png)
77+
:::image type="content" source="media/stack-buffer-underflow-example-2.png" alt-text="Screenshot of debugger displaying stack-buffer-underflow error in example 2.":::
7878

7979
## See also
8080

docs/sanitizers/error-stack-use-after-return.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ devenv /debugexe example1.exe
4949

5050
### Resulting error - Simple C
5151

52-
![Screenshot of debugger displaying stack-use-after-return error in example 1.](media/stack-use-after-return-example-1.png)
52+
:::image type="content" source="media/stack-use-after-return-example-1.png" alt-text="Screenshot of debugger displaying stack-use-after-return error in example 1.":::
5353

5454
## Example - C++ and templates
5555

@@ -105,7 +105,7 @@ devenv /debugexe example2.exe 1
105105

106106
### Resulting error - C++ and templates
107107

108-
![Screenshot of debugger displaying stack-use-after-return error in example 2.](media/stack-use-after-return-example-2.png)
108+
:::image type="content" source="media/stack-use-after-return-example-2.png" alt-text="Screenshot of debugger displaying stack-use-after-return error in example 2.":::
109109

110110
## See also
111111

0 commit comments

Comments
 (0)