Cover image for Address Sanitizer with Xcode

Address Sanitizer with Xcode

Strengthen C++ memory safety with precise Xcode runtime diagnostics

Umar Lone

Created by Umar Lone

Learn how to uncover and fix hidden C++ memory errors using Address Sanitizer directly within Xcode. Explore runtime diagnostics, shadow memory, and advanced configuration so you can quickly pinpoint and resolve issues that impact application stability.

Packt | Jul 2026 | 99 min

What You Will Learn

You'll start by setting up Address Sanitizer in Xcode and learning its core principles. Step-by-step examples will help you identify and interpret common memory errors, from heap overflows to use-after-free bugs. As you progress, you'll experiment with advanced features like custom poisoning, selective instrumentation, and runtime logging to build a workflow tailored to your debugging needs.

Key Features

  • Find and diagnose heap, stack, and global memory errors in C++ using Xcode tools
  • Understand sanitizer reports and shadow memory to trace unsafe code paths
  • Control diagnostics with selective checks, custom poisoning, and runtime logging

Target Audience

Ideal for C++ developers and macOS engineers who want to strengthen memory safety in their Xcode projects. If you have a basic understanding of C++ and want to catch elusive bugs or improve your debugging process, you'll benefit from these practical techniques and real-world examples.

Related courses

Cover image for Crash & Hang Analysis on macOS
Cover image for Python Mastery - 100 Days, 100 Projects
Cover image for Python Basics for IT Professionals with AI Skills
Cover image for Python Testing with pytest - Write Reliable and Maintainable Code
Cover image for Solutions Architect's Handbook Audiobook
Cover image for Domain-Driven Refactoring Audiobook