Skip to content

Commit aeb65ce

Browse files
author
Colin Robertson
committed
Link to new media file names
1 parent 0630c67 commit aeb65ce

File tree

72 files changed

+82
-82
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+82
-82
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-
![asan-open-crash-dump](./MEDIA/asan-open-crash-dump.PNG)
55+
![Screenshot of the File Open File menu in Visual Studio](./media/asan-open-crash-dump-file.png)
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-
![open snapshot](./MEDIA/asan-DMP-file-open.PNG)
61+
![Screenshot of the Minidump Summary display in Visual Studio](./media/asan-dump-file-open.png)
6262

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

65-
![symbolized snapshot](./MEDIA/asan-view-crash-meta-data.PNG)
65+
![Screenshot of the debugger showing source files and AddressSanitizer metadata](./media/asan-view-crash-metadata.png)
6666

6767
## Source and symbols
6868

docs/sanitizers/asan-shadowbytes.md

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

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

27-
![shadow-legend](./MEDIA/ASan-ShadowByte-Legend.PNG)
27+
![Screenshot of the AddressSanitizer shadow-byte legend](./media/asan-shadow-byte-legend.png)
2828

2929
## Mapping - describing your address space
3030

docs/sanitizers/asan.md

Lines changed: 8 additions & 8 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-
![asan-project-system](MEDIA/asan-installer.PNG)
39+
![Visual Studio Installer screenshot highlighting the C++ AddressSanitizer component](media/asan-installer-option.png)
4040

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

@@ -94,13 +94,13 @@ int main() {
9494

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

97-
![basic-global-overflow](SRC_CODE/asan-top-level/command-basic-global-overflow.PNG)
97+
![Screenshot of a command prompt showing the command to compile with AddressSanitizer options](media/asan-command-basic-global-overflow.png)
9898

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

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

103-
![basic-global-overflow](SRC_CODE/asan-top-level/basic-global-overflow.PNG)
103+
![Screenshot of the debugger showing a basic global overflow error](media/asan-basic-global-overflow.png)
104104

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

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

120120
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.
121121

122-
![asan-project-system](MEDIA/asan-project-system.PNG)
122+
![Screenshot of the Property Pages dialog showing the Enable AddressSanitizer property](media/asan-project-system-dialog.png)
123123

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

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

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

132-
![global-overflow-IDE](MEDIA/asan-F5-global-buffer-overflow.PNG)
132+
![Screenshot of the debugger showing a global buffer overflow error](media/asan-global-buffer-overflow-F5.png)
133133

134134
## Using the AddressSanitizer from Visual Studio: CMake
135135

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

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

140-
![configurations](MEDIA/asan-cmake-configuration.PNG)
140+
![Screenshot of the CMake configuration dropdown](media/asan-cmake-configuration-dropdown.png)
141141

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

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

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

150-
![cmake-jason](MEDIA/asan-cmake-jason.PNG)
150+
![Screenshot of the text editor view of CMakeSettings.json](media/asan-cmake-json.png)
151151

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

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

156-
![cmake-F5-runt](MEDIA/asan-cmake-f5-error.PNG)
156+
![Screenshot of the CMake build error message](media/asan-cmake-error-f5.png)
157157

158158
## AddressSanitizer crash dumps
159159

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ set ASAN_OPTIONS=alloc_dealloc_mismatch=1
4646
devenv /debugexe example1.exe 2
4747
```
4848

49-
## Resulting error
49+
### Resulting error
5050

51-
![example1](SRC_CODE/alloc-dealloc-mismatch/example1.PNG)
51+
![Screenshot of debugger displaying error in example1](media/alloc-dealloc-mismatch-example1.png)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ cl example1.cpp /fsanitize=address /Zi
4141
devenv /debugexe example1.exe
4242
```
4343

44-
## Resulting error
44+
### Resulting error
4545

46-
![example1](SRC_CODE/allocation-size-too-big/example1.PNG)
46+
![Screenshot of debugger displaying error in example1](media/allocation-size-too-big-example1.png)

docs/sanitizers/examples-calloc-overflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ cl example1.cpp /fsanitize=address /Zi
3737
devenv /debugexe example1.exe
3838
```
3939

40-
## Resulting error
40+
### Resulting error
4141

42-
![example1](SRC_CODE/calloc-overflow/example1.PNG)
42+
![Screenshot of debugger displaying error in example1](media/calloc-overflow-example1.png)

docs/sanitizers/examples-double-free.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ cl example1.cpp /fsanitize=address /Zi
3333
devenv /debugexe example1.exe
3434
```
3535

36-
## Resulting error - double operator delete
36+
### Resulting error - double operator delete
3737

38-
![example1](SRC_CODE/double-free/example1.PNG)
38+
![Screenshot of debugger displaying error in example1](media/double-free-example1.png)
3939

4040
## Example 'C' - double fre()
4141

@@ -65,9 +65,9 @@ cl example2.cpp /fsanitize=address /Zi
6565
devenv /debugexe example2.exe
6666
```
6767

68-
## Resulting error - double free()
68+
### Resulting error - double free()
6969

70-
![example2](SRC_CODE/double-free/example2.PNG)
70+
![Screenshot of debugger displaying error in example2](media/double-free-example2.png)
7171

7272
## Example - Windows HeapCreate() double free
7373

@@ -94,6 +94,6 @@ cl example3.cpp /fsanitize=address /Zi
9494
devenv /debugexe example3.exe
9595
```
9696

97-
## Resulting error - Windows HeapCreate() double free
97+
### Resulting error - Windows HeapCreate() double free
9898

99-
![example3](SRC_CODE/double-free/example3.PNG)
99+
![Screenshot of debugger displaying error in example3](media/double-free-example3.png)

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ cl example1.cpp /fsanitize=address /Zi
4040
devenv /debugexe example1.exe
4141
```
4242

43-
## Resulting error
43+
### Resulting error
4444

45-
![example1](SRC_CODE/dynamic-stack-buffer-overflow/example1.PNG)
45+
![Screenshot of debugger displaying error in example1](media/dynamic-stack-buffer-overflow-example1.png)
4646

4747
## Example - `alloca` overflow (left)
4848

@@ -71,9 +71,9 @@ cl example2.cpp /fsanitize=address /Zi
7171
devenv /debugexe example2.exe
7272
```
7373

74-
## Resulting error - `alloca` overflow (left)
74+
### Resulting error - `alloca` overflow (left)
7575

76-
![example2](SRC_CODE/dynamic-stack-buffer-overflow/example2.PNG)
76+
![Screenshot of debugger displaying error in example2](media/dynamic-stack-buffer-overflow-example2.png)
7777

7878
## Example - several calls to `alloca`
7979

@@ -160,6 +160,6 @@ cl example3.cpp /fsanitize=address /Zi
160160
devenv /debugexe example3.exe
161161
```
162162

163-
## Resulting error - several calls to alloca
163+
### Resulting error - several calls to alloca
164164

165-
![example3](SRC_CODE/dynamic-stack-buffer-overflow/example3.PNG)
165+
![Screenshot of debugger displaying error in example3](media/dynamic-stack-buffer-overflow-example3.png)

docs/sanitizers/examples-global-overflow.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ cl a.c b.c c.c example1-main.c /fsanitize=address /Zi
4949
devenv /debugexe example1-main.exe
5050
```
5151

52-
## Resulting error
52+
### Resulting error
5353

54-
![example1](SRC_CODE/global-overflow/example1.PNG)
54+
![Screenshot of debugger displaying error in example1](media/global-overflow-example1.png)
5555

5656
## Example - simple function level static
5757

@@ -82,9 +82,9 @@ cl example2.cpp /fsanitize=address /Zi
8282
devenv /debugexe example2.exe
8383
```
8484

85-
## Resulting error - simple function level static
85+
### Resulting error - simple function level static
8686

87-
![example2](SRC_CODE/global-overflow/example2.PNG)
87+
![Screenshot of debugger displaying error in example2](media/global-overflow-example2.png)
8888

8989
## Example - all global scopes in C++
9090

@@ -136,6 +136,6 @@ cl example3.cpp /fsanitize=address /Zi
136136
devenv /debugexe example3.exe -l
137137
```
138138

139-
## Resulting error - all global scopes in C++
139+
### Resulting error - all global scopes in C++
140140

141-
![example3](SRC_CODE/global-overflow/example3.PNG)
141+
![Screenshot of debugger displaying error in example3](media/global-overflow-example3.png)

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ cl example1.cpp /fsanitize=address /Zi
3535
devenv /debugexe example1.exe
3636
```
3737

38-
## Resulting error
38+
### Resulting error
3939

40-
![example1](SRC_CODE/heap-buffer-overflow/example1.PNG)
40+
![Screenshot of debugger displaying error in example1](media/heap-buffer-overflow-example1.png)
4141

4242
## Example - improper down cast
4343

@@ -70,9 +70,9 @@ cl example2.cpp /fsanitize=address /Zi
7070
devenv /debugexe example2.exe
7171
```
7272

73-
## Resulting error - improper down cast
73+
### Resulting error - improper down cast
7474

75-
![example2](SRC_CODE/heap-buffer-overflow/example2.PNG)
75+
![Screenshot of debugger displaying error in example2](media/heap-buffer-overflow-example2.png)
7676

7777
## Example - strncpy into heap
7878

@@ -100,6 +100,6 @@ cl example3.cpp /fsanitize=address /Zi
100100
devenv /debugexe example3.exe
101101
```
102102

103-
## Resulting error - strncpy into heap
103+
### Resulting error - strncpy into heap
104104

105-
![example3](SRC_CODE/heap-buffer-overflow/example3.PNG)
105+
![Screenshot of debugger displaying error in example3](media/heap-buffer-overflow-example3.png)

0 commit comments

Comments
 (0)