Skip to content

Commit e79c4d0

Browse files
TylerMSFTTylerMSFT
authored andcommitted
fix link
1 parent e2d894f commit e79c4d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/sanitizers/asan-runtime.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ The list of runtime libraries for linking to the AddressSanitizer runtime as of
2020
| `/MT` or `/MTd` | *`clang_rt.asan_dynamic-{arch}`*, *`clang_rt.asan_static_runtime_thunk-{arch}`* | *`clang_rt.asan_dynamic-{arch}`*
2121
| `/MD` or `/MDd` | *`clang_rt.asan_dynamic-{arch}`*, *`clang_rt.asan_dynamic_runtime_thunk-{arch}`* | *`clang_rt.asan_dynamic-{arch}`*
2222

23-
The following diagram shows how the runtime library is linked given the `/MT`, `/MTd`, `/MD`, and `/MDd` compiler options:
23+
The following diagram shows how the runtime libraries are linked for the `/MT`, `/MTd`, `/MD`, and `/MDd` compiler options:
2424

2525
:::image type="complex" source="media/runtime-configurations.png" alt-text="Diagram of how the runtime libraries are linked for various compiler options."
2626
The image shows three scenarios for linking the runtime library. The first is /MT or /MTd. My_exe.exe and my_dll.dll are both shown with their own copies of the statically linked VCRuntime, Universal CRT, and C++ runtimes. The scenarios show /MD in which both my_exe.exe and my_dll.dll share vcruntime140.dll, ucrtbase.dll, and msvcp140.dll. The last scenario shows /MDd in which both my_exe.exe and my_dll.dll share the debug versions of the runtimes: vcruntime140d.dll, ucrtbased.dll, and msvcp140d.dll
2727
:::image-end:::
2828

2929
When compiling with `cl /fsanitize=address`, the compiler generates instructions to manage and check the [shadow bytes](./asan-shadow-bytes.md). Your program uses this instrumentation to check memory accesses on the stack, in the heap, or in the global scope. The compiler also produces metadata describing stack and global variables. This metadata enables the runtime to generate precise error diagnostics: function names, lines, and columns in your source code. Combined, the compiler checks and runtime libraries can precisely diagnose many types of [memory safety bugs](./asan-error-examples.md) if they're encountered at run-time.
3030

31-
The following diagram shows how the ASan library is linked given various compiler options:
31+
The following diagram shows how the ASan library is linked for various compiler options:
3232

3333
:::image type="complex" source="media/asan-one-dll.png" alt-text="Diagram of how the ASan runtime dll is linked."
3434
The image shows four scenarios for linking the ASan runtime library. The scenarios are for /MT (statically link the runtime), /MTd (statically link the debug runtime), /MD (dynamically link the redist at runtime), /MDd (dynamically link the debug redist at runtime). In all cases, my_exe.exe links and its associates my_dll.dll link to a single instance of clang-rt.asan-dynamix-x86_64.dll.
@@ -40,7 +40,7 @@ Before Visual Studio 17.7 Preview 3, statically linked (**`/MT`** or **`/MTd`**)
4040

4141
The following diagram shows how the ASan library was linked before Visual Studio 2022 17.7 preview 3, for various compiler options:
4242

43-
:::image type="complex" source="media/asan-library-linking-previous-versions" alt-text="Diagram of how the ASan runtime dll was linked prior to Visual Studio 2022 preview 3."
43+
:::image type="complex" source="media/asan-library-linking-previous-versions.png" alt-text="Diagram of how the ASan runtime dll was linked prior to Visual Studio 2022 preview 3."
4444
The image shows four scenarios for linking the ASan runtime library. The scenarios are for /MT (statically link the runtime), /MTd (statically link the debug runtime), /MD (dynamically link the redist at runtime), /MDd (dynamically link the debug redist at runtime). For /MT, my_exe.exe has a statically linked copy of the ASan runtime. my_dll.dll links to the ASan runtime in my_exe.exe. For /MTd, the diagram is the same except it uses the debug statically linked ASan runtime. For /MD, both my_exe.exe and my_dll.dll link to the dynamically linked ASan runtime named clang_rt.asan_dynamic-x86_64.dll. For /MDd, the diagram is the same except my_exe.exe and my_dll.dll link to the debug ASan runtime named clang_rt.asan_dbg_dynamic-x86_64.dll.
4545
:::image-end:::
4646

0 commit comments

Comments
 (0)