TRT
Sign in

Advanced · Module 12 · Lesson 4 of 5

Sanitizers and Tests: Proving the Pool Correct

Compile with address, thread and undefined sanitizers, then assert single execution, queue draining and clean shutdown for a small pool.

Pro — members onlyAbout 12 minutes

By the end you can

  • Run address, thread and undefined sanitizers on threaded code
  • Write deterministic unit tests for task queues and shutdown
  • Interpret sanitizer reports to locate races and lifetime faults

Builds on Acquire-Release: Publishing Work Safely.

01 · A question first

The pool passes one thousand runs on your laptop and fails once in production. A counter drifts, a worker touches freed memory, shutdown hangs on alternate Fridays. Which tool turns those rare failures into a precise file and line on the first reproduction?

Make a guess before you read on.

02 · The idea

Members only

Unlock the full lesson

This lesson is part of the membership. Join to read it in full, along with every other premium deep dive.

What's inside

  • Start with the problem
  • How the idea works
  • Why it is correct
  • What it costs
  • Pitfalls and variations
  • Where it is used

03 · Practice

Something wrong with this lesson? Report a problem