]> git.ipfire.org Git - thirdparty/bird.git/commit
Fixed crash if logging happened in unit tests
authorOndrej Zajicek <santiago@crfreenet.org>
Wed, 27 Nov 2024 03:15:16 +0000 (04:15 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Wed, 27 Nov 2024 03:15:16 +0000 (04:15 +0100)
commitfc2b4b26a62215d12f4565c21b77e949cd861b9a
tree12f625d8c1e544b58e1dfa692ed7c6735104cddc
parent997d2f578ee61d64f57e2ab6932b15c0a6a3a8d8
Fixed crash if logging happened in unit tests

The patch initializes logging in unit tests. Previously, unit tests did
not initialize logging and other subsystems, just resources. But
resource_init() could under certain circumstances trigger logging and
cause crash.

The bug was Found by Jakub Ruzicka, dissected by David Petera and Maria
Matejka, disguised as failing build for Debian arm64 in pbuilder
emulation which did not like disabling THP.

Fixes #42.
test/birdtest.c