Skip to content

Commit c71c77f

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/cpp-docs-pr (branch live)
2 parents df4242d + 7b9d10a commit c71c77f

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

docs/sanitizers/asan-runtime.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,9 @@ For more information, see the [Differences with Clang 12.0](asan.md#differences)
140140

141141
### MSVC-specific AddressSanitizer runtime options
142142

143-
- `windows_hook_legacy_allocators`
144-
Boolean, set to `false` to disable interception of [`GlobalAlloc`](/windows/win32/api/winbase/nf-winbase-globalalloc) and [`LocalAlloc`](/windows/win32/api/winbase/nf-winbase-localalloc) allocators.
143+
- [`continue_on_error`](asan-continue-on-error.md) Boolean, set to `false` by default. When set to `true`, it allows the program to continue executing after a memory violation is reported, allowing you to collect multiple error reports.
144+
145145

146-
> [!NOTE]
147-
> The option `windows_hook_legacy_allocators` wasn't available in the public llvm-project runtime when this article was written. The option may eventually be contributed back to the public project; however, it's dependent on code review and community acceptance.
148-
>
149-
> The option `windows_hook_rtl_allocators`, previously an opt-in feature while AddressSanitizer was experimental, is now enabled by default. In versions before Visual Studio 2022 version 17.4.6, the default option value is `false`. In Visual Studio 2022 version 17.4.6 and later versions, the option `windows_hook_rtl_allocators` defaults to `true`.
150146

151147
- `iat_overwrite`
152148
String, set to `"error"` by default. Other possible values are `"protect"` and `"ignore"`. Some modules may overwrite the [`import address table`](/windows/win32/debug/pe-format#import-address-table) of other modules to customize implementations of certain functions. For example, drivers commonly provide custom implementations for specific hardware. The `iat_overwrite` option manages the AddressSanitizer runtime's protection against overwrites for specific [`memoryapi.h`](/windows/win32/api/memoryapi/) functions. The runtime currently tracks the [`VirtualAlloc`](/windows/win32/api/memoryapi/nf-memoryapi-virtualalloc), [`VirtualProtect`](/windows/win32/api/memoryapi/nf-memoryapi-virtualprotect), and [`VirtualQuery`](/windows/win32/api/memoryapi/nf-memoryapi-virtualquery) functions for protection. This option is available in Visual Studio 2022 version 17.5 Preview 1 and later versions. The following `iat_overwrite` values control how the runtime reacts when protected functions are overwritten:
@@ -160,6 +156,15 @@ Boolean (false by default), set to `true` to enable the process to terminate wit
160156
>[!NOTE]
161157
>When abort_on_error value is set to true, on Windows the program terminates with an exit(3). In order to not change current behavior we decided to introduce this new option instead. If both abort_on_error and windows_fast_fail_on_error are true, the program will exit with the __fastfail.
162158
159+
- `windows_hook_legacy_allocators`
160+
Boolean, set to `false` to disable interception of [`GlobalAlloc`](/windows/win32/api/winbase/nf-winbase-globalalloc) and [`LocalAlloc`](/windows/win32/api/winbase/nf-winbase-localalloc) allocators.
161+
162+
> [!NOTE]
163+
> The option `windows_hook_legacy_allocators` wasn't available in the public llvm-project runtime when this article was written. The option may eventually be contributed back to the public project; however, it's dependent on code review and community acceptance.
164+
>
165+
> The option `windows_hook_rtl_allocators`, previously an opt-in feature while AddressSanitizer was experimental, is now enabled by default. In versions before Visual Studio 2022 version 17.4.6, the default option value is `false`. In Visual Studio 2022 version 17.4.6 and later versions, the option `windows_hook_rtl_allocators` defaults to `true`.
166+
167+
163168
## <a name="intercepted_functions"></a> AddressSanitizer list of intercepted functions (Windows)
164169

165170
The AddressSanitizer runtime hotpatches many functions to enable memory safety checks at runtime. Here's a non-exhaustive list of the functions that the AddressSanitizer runtime monitors.

0 commit comments

Comments
 (0)