]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Better code coverage stats when enabled 11996/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 25 Feb 2022 15:15:56 +0000 (16:15 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 21 Sep 2022 14:52:05 +0000 (16:52 +0200)
commit5f7151eb45c172002e8ca8d40ab329834f972506
tree1052a5b19873f5dd717b78b5742e6cd635237e2a
parent4d33db9465d80cc1f922c04d29d0b2bf8f161e17
dnsdist: Better code coverage stats when enabled

When exiting on user request, dnsdist calls _Exit() to avoid any
issue caused by the order in which the destructors of our long-lived
objects are called (it would be nice to fix this properly, but it
would require a fairly large refactoring).
Since the static destructors are not called in that case, the most
recent coverage data is not always properly dumped to disk.
Explicitly calling __gcov_dump` before exiting ensures that no data
is lost.
pdns/dnsdist-lua.cc
pdns/dnsdist.cc