mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
GH-188: fix crash when shutting down with pending reporter errors
This fixes some use-after-free issues in the shutdown order of various systems: I/O, plugin, logging, and reporter systems may interact during shutdown if there's errors emitted (or maybe just still pending) during the shutdown. Fixes GH-188
This commit is contained in:
parent
766b1d9520
commit
38cb3dbf2e
5 changed files with 17 additions and 4 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
|||
|
||||
2.6-70 | 2019-01-14 15:34:18 -0600
|
||||
|
||||
* GH-188: fix crash when shutting down with pending reporter errors(Jon Siwek, Corelight)
|
||||
|
||||
2.6-69 | 2019-01-14 14:49:49 -0600
|
||||
|
||||
* Fix compiler warning in DNS analyzer (Jon Siwek, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
2.6-69
|
||||
2.6-70
|
||||
|
|
|
@ -377,11 +377,11 @@ void terminate_bro()
|
|||
delete event_registry;
|
||||
delete analyzer_mgr;
|
||||
delete file_mgr;
|
||||
delete log_mgr;
|
||||
delete plugin_mgr;
|
||||
delete reporter;
|
||||
// broker_mgr is deleted via iosource_mgr
|
||||
delete iosource_mgr;
|
||||
delete log_mgr;
|
||||
delete reporter;
|
||||
delete plugin_mgr;
|
||||
delete port_mgr;
|
||||
|
||||
reporter = 0;
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
warning: ./config/Input::READER_CONFIG: Init: cannot open ./config
|
||||
error: reporter/Log::WRITER_ASCII: cannot open reporter.log: Permission denied
|
||||
error: reporter/Log::WRITER_ASCII: terminating thread
|
6
testing/btest/core/reporter-shutdown-order-errors.bro
Normal file
6
testing/btest/core/reporter-shutdown-order-errors.bro
Normal file
|
@ -0,0 +1,6 @@
|
|||
# @TEST-EXEC: touch reporter.log && chmod -w reporter.log
|
||||
# @TEST-EXEC: bro %INPUT >out 2>&1
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
redef Config::config_files += { "./config" };
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue