mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/jsiwek/bit-1885'
* origin/topic/jsiwek/bit-1885: BIT-1885: fix input framework memory leak Increase timeout for a memleak test
This commit is contained in:
commit
45338b1942
6 changed files with 28 additions and 4 deletions
8
CHANGES
8
CHANGES
|
@ -1,4 +1,12 @@
|
|||
|
||||
2.5-897 | 2018-08-23 15:53:16 +0000
|
||||
|
||||
* BIT-1885: Fix input framework memory leak. For input threads that
|
||||
get joined during run-time, messages could remain in the thread's
|
||||
queue and leak. (Jon Siwek, Corelight)
|
||||
|
||||
* Increase timeout for a memleak test. (Jon Siwek, Corelight)
|
||||
|
||||
2.5-894 | 2018-08-22 12:05:19 -0500
|
||||
|
||||
* Ensure external test repo hashes track origin/master (Jon Siwek, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
2.5-894
|
||||
2.5-897
|
||||
|
|
|
@ -160,6 +160,7 @@ void Manager::Process()
|
|||
for ( all_thread_list::iterator i = to_delete.begin(); i != to_delete.end(); i++ )
|
||||
{
|
||||
BasicThread* t = *i;
|
||||
t->WaitForStop();
|
||||
|
||||
all_threads.remove(t);
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@ public:
|
|||
network_time(network_time) { }
|
||||
|
||||
virtual bool Process() {
|
||||
if ( Object()->child_finished )
|
||||
return true;
|
||||
bool result = Object()->OnFinish(network_time);
|
||||
Object()->Finished();
|
||||
return result;
|
||||
|
@ -90,7 +92,19 @@ public:
|
|||
KillMeMessage(MsgThread* thread)
|
||||
: OutputMessage<MsgThread>("ReporterMessage", thread) {}
|
||||
|
||||
virtual bool Process() { thread_mgr->KillThread(Object()); return true; }
|
||||
virtual bool Process()
|
||||
{
|
||||
auto rval = true;
|
||||
|
||||
if ( ! Object()->child_finished )
|
||||
{
|
||||
rval = Object()->OnFinish(network_time);
|
||||
Object()->Finished();
|
||||
}
|
||||
|
||||
thread_mgr->KillThread(Object());
|
||||
return rval;
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -181,6 +181,7 @@ protected:
|
|||
friend class HeartbeatMessage;
|
||||
friend class FinishMessage;
|
||||
friend class FinishedMessage;
|
||||
friend class KillMeMessage;
|
||||
|
||||
/**
|
||||
* Pops a message sent by the child from the child-to-main queue.
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
#
|
||||
# @TEST-EXEC: cp input1.log input.log
|
||||
# @TEST-EXEC: HEAP_CHECK_DUMP_DIRECTORY=. HEAPCHECK=local btest-bg-run bro bro -m -b %INPUT
|
||||
# @TEST-EXEC: $SCRIPTS/wait-for-file bro/got2 8 || (btest-bg-wait -k 1 && false)
|
||||
# @TEST-EXEC: $SCRIPTS/wait-for-file bro/got2 60 || (btest-bg-wait -k 1 && false)
|
||||
# @TEST-EXEC: cat input2.log >> input.log
|
||||
# @TEST-EXEC: $SCRIPTS/wait-for-file bro/got6 8 || (btest-bg-wait -k 1 && false)
|
||||
# @TEST-EXEC: $SCRIPTS/wait-for-file bro/got6 15 || (btest-bg-wait -k 1 && false)
|
||||
# @TEST-EXEC: cat input3.log >> input.log
|
||||
# @TEST-EXEC: btest-bg-wait 60
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue