]> git.ipfire.org Git - thirdparty/pdns.git/commit
rec: Fix stack-use-after-scope reported by ASAN
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 5 Jun 2025 13:55:29 +0000 (15:55 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 5 Jun 2025 13:59:05 +0000 (15:59 +0200)
commit70d8016c29a80fb1502193400def05a0cd186eec
treeaab64d04a6ad544e4d78f6aa152f0a08ab37d75b
parentbb2f4050a5679f623cb07d98d0378bcf2cc39cb1
rec: Fix stack-use-after-scope reported by ASAN

Technically we are indeed using a stack that is no longer the active
one, because we just switched to a different context, but since the
previous stack still exists that I do not believe it is a real issue.
After this commit we access the previous stack before notifying ASAN
that the stack switch is finished, so we are still allowed to do that.
Note that clang 19 ASAN is fine with both behaviour, but GCC 14 and 15
ASAN aren't.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/recursordist/mtasker_context.cc