Get the latest tech news

Logging all C++ destructors, poor mans run-time tracing


Raymii.orgQuis custodiet ipsos custodes? Home | About | All pages | Cluster Status | RSS Feed Logging all C++ destructors, poor mans run-time tracing Published: 21-09-2024 23:59 | Author: Remy van Elst | Text only version of this article Table of Contents I recently faced a challenging issue with an application that wasn't shutting down correctly, either segfaulting or terminating without an active exception. Running the program via valgrind to check for memory leaks wasn't possible because the program couldnât perform its cleanup if it didn't shut down correctly.

I recently faced a challenging issue with an application that wasn't shutting down correctly, either segfaulting or terminating without an active exception. It includes example code, setup instructions and insights into handling shutdown issues in large, multi-threaded codebases. Making the code a shared library (-rdynamic) and linking to dl also has a performance impact so I recommend you only add this whenever you really need to.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of mans

mans

Photo of time tracing

time tracing

Photo of C++ destructors

C++ destructors