Blog
Notes from Colin Neilens on building small Mac apps, and on debugging C++.
Posts
-
Five small Mac apps I built to fix my own annoyances
Over the past few weeks I’ve turned five little utilities I wrote for myself into proper Mac apps that anyone can buy. Each one fixes a single everyday annoyance, lives quietly in the menu bar or along the edge of the screen, and costs $1.99 once, with a 7-day free trial.
-
C++ Debugging Insights: the series
This series explores the mindset and systematic approaches that senior engineers use to tackle complex debugging challenges.
-
Advanced Debugging Case Studies in C++
In this final installment of our C++ debugging series, we’ll dive into some truly gnarly bugs that even seasoned developers struggle with. We’ll tackle heap corruption, buffer overflows, memory alignment issues, sneaky undefined behavior (like ODR violations and integer overflow), and multithreading nightmares (race conditions, data corruption, deadlocks). For each case study, we’ll walk through the senior debugging mindset step-by-step. You’ll see how to use AddressSanitizer (ASan) and UndefinedBehaviorSanitizer (UBSan) to catch errors, and then leverage powerful debuggers – LLDB (macOS), WinDbg (Windows), VS Code + CodeLLDB (macOS), and VS Code + CppDbg (Windows) – to trace problems down to the root cause. Let’s get started!
-
Debugging Memory Corruption and Crashes in C++ (Part 3)
In this third part of our series, we’ll walk through multiple debugging case studies involving memory corruption, crashes, and undefined behavior in C++ programs. We’ll use the same buggy code in each case and debug it step-by-step with four different tools/environments:
-
Debugging Memory Corruption Like a Senior Engineer
Memory corruption bugs – such as double frees, use-after-frees, out-of-bounds writes, stack overflows, or using unallocated memory – are among the most insidious issues in C and C++ development[1]. They can lurk unnoticed, causing subtle data corruption or “undefined behavior” that only triggers crashes under specific conditions[1]. In this post, we’ll explore how a senior engineer methodically tracks down these bugs. We’ll cover both modern tools (like AddressSanitizer) and old-school techniques (when such tools aren’t available). Finally, we’ll discuss C++ undefined behavior issues and how to debug them with and without UndefinedBehaviorSanitizer (UBSan).
-
Debugging C++ Applications: A Senior Engineer's Guide
Debugging is an essential skill for every software engineer. As Brian Kernighan famously noted, “Debugging is twice as hard as writing a program in the first place. So if you’re as clever as you can be when you write it, how will you ever debug it?”[1]. Studies suggest developers spend roughly 50% of their time debugging code[2]. This guide will help you develop a systematic, senior-level thought process for debugging tricky C++ issues – from single-threaded crashes to complex multi-threaded bugs – so you can tackle problems methodically and confidently.
subscribe via RSS