https://www.cppnorth.ca
---
Teaching Containers and Allocators How to Sanitize Addresses - Miro Knejp - CppNorth 2023
Many people have probably heard of, and used, address sanitizer (ASAN), a tool integrated into many compilers to detect memory corruption bugs or the use of dangling pointers. But what many do not know, is that ASAN also has a runtime API. With it you can integrate its address verification mechanism into your own classes, like containers or allocators, to increase the safety of consuming code.
After a brief introduction into the internals of ASAN we will look at a custom container where ASAN does not catch out-of-bounds access and how to remedy it using the runtime API. We will further look into unit testing your integration, take a look at a more C++-friendly wrapper of the basic C-based API, and cover some gotchas when integrating it with allocators.
---
Slides: https://github.com/CppNorth/CppNorth_...
Sponsored By:
think-cell: https://www.think-cell.com/cppnorth
JetBrains: https://www.jetbrains.com/
---
Miro Knejp
Miro wrote his first line of C++ code in 1997 at the age of 12, and it has been his programming language of choice ever since. He’s especially passionate about low-level programming, low latency, 3D graphics, games engineering, and chemistry. Miro holds a Master’s degree in Computer Science from the Technical University of Munich. He has worked on projects ranging from 3D rendering libraries to airport self-boarding control systems to thermodynamic simulation. He currently works as freelancer and trainer, with the goal of creating his own video game one day.
---
CppNorth is an annual C++ conference held in Toronto, Canada.
Annual CppNorth C++ conference: https://cppnorth.ca/
CppNorth Twitter: / cppnorth
---
YouTube Videos Edited & Optimised by Digital Medium: https://events.digital-medium.co.uk
#cppnorth #cpp #programming