Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Debugging Race Conditions in C++ and C Programming with ThreadSanitizer (TSan)

Undo via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn how to debug race conditions in C++ and C programming using ThreadSanitizer (TSan) in this 11-minute video tutorial. Discover how this essential tool detects race conditions in multi-threaded applications by identifying when multiple threads access shared memory without proper synchronization. Follow along as Greg Law demonstrates real-world examples showing how TSan traces memory access and flags data races in pthread-based programs. Understand common synchronization mistakes like relying on sleep for thread execution management, and learn how to implement proper locks and mutexes to prevent unpredictable program behavior. The tutorial covers practical TSan configuration options including history size adjustment and flags like halt_on_error, while providing guidance on setting up TSan with both Clang and GCC compilers. Perfect for both beginners and advanced developers looking to create safer, more reliable concurrent software.

Syllabus

Debugging Race Conditions in C++ & C Programming with ThreadSanitizer (TSan)

Taught by

Undo

Reviews

Start your review of Debugging Race Conditions in C++ and C Programming with ThreadSanitizer (TSan)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.