Skip to content

Commit ca7d5c0

Browse files
committed
further top level edits
1 parent 97dea26 commit ca7d5c0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docs/cpp/ASAN/asan-top-level.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ helpviewer_keywords: ["ASan","sanitizers","AddressSanitizer","clang_rt.asan","Cl
1010

1111
# Overview
1212

13-
The C & C++ languages are powerful, but they can suffer from different types of bugs which affect program correctness and program security. Starting with Visual Studio 2019 16.9, the Microsoft Visual C++ compiler and IDE support Address Sanitizer technology to help light up [hard-to-find bugs](#error-types).
13+
The C & C++ languages are powerful, but they can suffer from different types of bugs which affect program correctness and program security. Starting with Visual Studio 2019 16.9, the Microsoft Visual C++ compiler and IDE support Address Sanitizer technology to help light up [hard-to-find bugs](#error-types) with zero false positives.
1414

1515
Using this flag can reduce your time spent on:
1616

@@ -20,17 +20,19 @@ Using this flag can reduce your time spent on:
2020
- Stress testing
2121
- Integrating new source code
2222

23-
The Address Sanitizer is a compiler and runtime runtime [introduced by Google](https://www.usenix.org/conference/atc12/technical-sessions/presentation/serebryany). Starting with Visual Studio 2019 16.9 this technology is offered in the Visual C++ compiler toolchain. Many projects can enable Address Sanitizer with a project setting, or a single additional compiler switch. There are known limitations in certain (!!! link !!!) compilation modes (incremental linking, or the [/RTC](https://docs.microsoft.com/en-us/cpp/build/reference/rtc-run-time-error-checks?view=msvc-160) switch, for example), but otherwise all configurations of x86 and x64 are supported.
23+
The Address Sanitizer is a compiler and runtime runtime [introduced by Google](https://www.usenix.org/conference/atc12/technical-sessions/presentation/serebryany). Starting with Visual Studio 2019 16.9 this technology is offered in the Visual C++ compiler tool chain. Many projects can enable Address Sanitizer with a project setting, or a single additional compiler switch. The new flag is compatible with all levels of optimization. There are conflicts in three compilation modes: [edit-and-continue](), [incremental linking](), and [/RTC](https://docs.microsoft.com/en-us/cpp/build/reference/rtc-run-time-error-checks?view=msvc-160) switches), otherwise all configurations of x86 and x64 are supported.
2424

25-
`-fsanitize=address` is a powerful alternative to [/RTC](https://docs.microsoft.com/en-us/cpp/build/reference/rtc-run-time-error-checks?view=msvc-160), and in addition to [/analyze](https://docs.microsoft.com/en-us/cpp/code-quality/code-analysis-for-c-cpp-overview?view=msvc-160), it provides run-time bug-finding technologies which leverage your existing build systems and existing test assets.
25+
Compiling with `-fsanitize=address` is a powerful alternative to both [/RTC](https://docs.microsoft.com/en-us/cpp/build/reference/rtc-run-time-error-checks?view=msvc-160), and [/analyze](https://docs.microsoft.com/en-us/cpp/code-quality/code-analysis-for-c-cpp-overview?view=msvc-160). It provides run-time bug-finding technologies which leverage your existing build systems and existing test assets.
2626

2727
For CI/CD systems and Cloud based work flows, use the ASAN_SAVE_DUMPS environment variable to store crash dumps for post-mortem debugging specific to the Address Sanitizer.
2828

29-
By setting a new environment variable **`set ASAN_SAVE_DUMPS=”MyFileName.dmpx”`** your program will create a new type of dump file that will contain extra meta-data. These dump files can be an enabler for work flows requiring:
29+
By setting a new environment variable via **`set ASAN_SAVE_DUMPS=”MyFileName.dmpx”`** your program will create a new type of dump file that will contain extra meta-data. These dump files can be displayed with Visual Studio using the new debugger IDE. These dump files can be an enabler for work flows requiring:
3030

3131
- On-premises testing
3232
- Cloud based workflows for testing
3333

34+
These systems can store these dump files off line, with **precisely diagnosed bugs** which can be viewed against your source code, in the IDE.
35+
3436
## Installing the Address Sanitizer
3537

3638
Simply [**install the Address Sanitizer functionality**]().
@@ -46,6 +48,7 @@ Microsoft recommends using the Address Sanitizer in these **three standard workf
4648
- Visual Studio - [Command line](#Using-the-Address-Sanitizer-from-a-Developer-Command-Prompt)
4749
- Visual Studio - [Project system](#Using-the-Address-Sanitizer-from-Visual-Studio)
4850
- Visual Studio - [CMake]([CMake](#Using-the-Address-Sanitizer-from-Visual-Studio:-CMake))
51+
4952

5053
- **CI/CD** - continuous integration / continuous development
5154
- Error reporting - [New Address Sanitizer dump files]()
@@ -54,7 +57,7 @@ Microsoft recommends using the Address Sanitizer in these **three standard workf
5457
- [Azure OneFuzz](https://www.microsoft.com/security/blog/2020/09/15/microsoft-onefuzz-framework-open-source-developer-tool-fix-bugs/)
5558
- Local Machine
5659

57-
This article will cover the information needed to enable the three workflows listed above. The information will be specific to the **platform dependent** Windows 10 implementation and supplement existing documentation from [Google, Apple and GCC](#Google,-Apple-and-GCC-documentation).
60+
This article will cover the information needed to enable the three workflows listed above. The information will be specific to the **platform dependent** Windows 10 implementation of the Address Sanitizer and supplement existing documentation from [Google, Apple and GCC](#Google,-Apple-and-GCC-documentation).
5861

5962
> [!NOTE] Current support is limited to x86 and AMD64 on Windows 10. **Customer feedback** would help us prioritize shipping these sanitizers in the future: -fsanitize=thread, -fsanitize=leak, -fsanitize=memory, -fsanitize=hwaddress or -fsanitize=undefined.
6063

0 commit comments

Comments
 (0)