Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
C++ Memory Debugging with AddressSanitizer in Visual Studio
New
9 students

C++ Memory Debugging with AddressSanitizer in Visual Studio

Detect and debug C++ memory errors, buffer overflows, and use-after-free with AddressSanitizer in Visual Studio.
Created byUmar Lone
Last updated 11/2026
English

What you'll learn

  • Understand how AddressSanitizer detects memory errors using Shadow Memory.
  • Detect and debug heap buffer overflows and use-after-free errors.
  • Detect stack and global buffer overflows.
  • Use AddressSanitizer's memory poisoning features.
  • Control instrumentation using conditional compilation and configuration options.
  • Customize AddressSanitizer behavior using runtime options.

Course content

4 sections • 16 lectures • 1h 37m total length
  • Introduction6:21
  • Setting Up AddressSanitizer in Visual Studio7:27
  • Understanding Shadow Memory10:05

Requirements

  • Basic knowledge of C++ programming.
  • Familiarity with pointers, dynamic memory allocation, and deallocation.
  • Basic understanding of Visual Studio and building C++ projects.

Description

Find and Debug C++ Memory Errors with AddressSanitizer

Memory errors are among the most challenging bugs to diagnose in C++ applications. Problems such as buffer overflows, use-after-free, and memory corruption can cause unexpected behavior, application crashes, and unpredictable results. These bugs can be particularly difficult to track down using traditional debugging techniques.

AddressSanitizer (ASan) is a powerful runtime memory error detection tool that helps identify these problems while your application is running.

In this course, you'll learn how to use Microsoft's AddressSanitizer integration in Visual Studio to detect and investigate common C++ memory errors. We'll explore how AddressSanitizer works internally, how it identifies invalid memory accesses, and how you can control its behavior to suit different debugging scenarios.

What does the course cover?

Understanding AddressSanitizer

Get started with AddressSanitizer in Visual Studio, configure your C++ projects, and understand the concept of Shadow Memory, which plays a central role in detecting memory errors.

Detecting Heap Memory Errors

Learn to identify common heap-related problems, including heap buffer overflows, use-after-free errors, and allocation/deallocation mismatches. Understand how these issues occur and how AddressSanitizer helps expose them.

Detecting Stack and Global Memory Errors

Explore memory errors involving stack and global variables. Learn how AddressSanitizer detects invalid memory accesses in these memory regions.

Advanced AddressSanitizer Features

Go beyond basic error detection and explore features such as user-poisoned memory, conditional compilation, and selectively disabling instrumentation. You'll also learn about AddressSanitizer runtime options and how to configure them for different debugging requirements.

Throughout the course, practical examples will help you understand these features and see how they can be applied when debugging C++ applications.

AddressSanitizer can make difficult memory-related bugs much easier to identify. Learn to use it effectively and add another powerful tool to your C++ debugging workflow.

Who this course is for:

  • Developers using Microsoft Visual Studio for C++ development.
  • Programmers who want to improve their debugging and troubleshooting skills.
  • C++ developers looking to understand memory safety issues such as buffer overflows and use-after-free errors.
  • Software engineers who want to use AddressSanitizer to identify memory-related bugs early in development.