logging/Manager: Fix crash for rotation format function not returning

While working on a rotation format function, ran into Zeek crashing
when not returning a value from it, fix and recover the same way as
for scripting errors.
This commit is contained in:
Arne Welzel 2023-04-05 16:00:43 +02:00
parent 6ac72a31bf
commit a5e7faf564
5 changed files with 77 additions and 5 deletions

View file

@ -0,0 +1,5 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
1299481205.000000 warning: non-void function returning without a value: Test::my_rotation_format_func
1299481205.000000 error: Failed to call Log::rotation_format_func for path test continuing with rotation to: ./test-11-03-07_06.00.05
1299495605.000000 expression error in <...>/rotate-custom-fmt-func-bad.zeek, line 34: division by zero (Test::c / 0)
1299495605.000000 error: Failed to call Log::rotation_format_func for path test continuing with rotation to: ./test-11-03-07_10.00.05

View file

@ -0,0 +1,11 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
test-1.log
test-10.log
test-11-03-07_06.00.05.log
test-11-03-07_10.00.05.log
test-2.log
test-3.log
test-5.log
test-6.log
test-7.log
test-9.log