Wednesday 

Room 1 

10:20 - 11:20 

(UTC+02

Talk (60 min)

How Sanitizers Work

Sanitizers like AddressSanitizer and ThreadSanitizer can find issues in your code that your compiler and tests won't otherwise find. Some important examples include uses-after-free and data races. But how exactly are they able to do this?

C++
C
Testing
Tools
Security

Some sanitizers require you to rebuild your dependencies, but others don't. Why is that? How on earth can AddressSanitizer detect uses-after-free if deallocations in your dependencies aren't instrumented?

In this talk we'll look at how two commonly used sanitizers, AddressSanitizer and ThreadSanitizer, work under the hood. This will give you a better intuition for how to work with them, what kinds of errors you can expect them to find, and how to better interpret their results.

We'll also see why AddressSanitizer works even if you don't rebuild your dependencies, while ThreadSanitizer doesn't, and we'll see what you can do work around this if you're not able to rebuild your dependencies with ThreadSanitizer yet.

Finally, we'll see a practical example of how to configure Conan to automatically re-build and re-use dependencies for sanitizers.

After this talk, you'll not only know how to use sanitizers in practice, but also better understand their output and how to interact with them.

Anders Schau Knatten

Anders started programming in Turbo Pascal in 1995, and has been programming professionally in various languages since 2001. He's currently a staff software engineer and head of the C/C++ guild at Squarehead, where he works on acoustic counter-drone tech, mostly in C++.

He's also the author of the book C++ Brain Teasers, http://cppquiz.org, and https://blog.knatten.org, an organizer of Oslo C++ Users Group, and in the agenda committee for NDC TechTown.