This is an automated email from the ASF dual-hosted git repository.
oknet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 422aae5 Fixes use-after-free in PVCTestDriver::start_tests
422aae5 is described below
commit 422aae5834a6de05a66a6ff7744e87659b137841
Author: Oknet Xu <[email protected]>
AuthorDate: Wed May 8 20:04:09 2019 +0800
Fixes use-after-free in PVCTestDriver::start_tests
This reverts commit 83e5b28cfb7612640f462543f47f7080d676da6e and re-fix
use-after-free in PVCTestDriver::start_tests.
---
proxy/PluginVC.cc | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/proxy/PluginVC.cc b/proxy/PluginVC.cc
index 569ea85..98a0969 100644
--- a/proxy/PluginVC.cc
+++ b/proxy/PluginVC.cc
@@ -1283,7 +1283,7 @@ public:
~PVCTestDriver() override;
void start_tests(RegressionTest *r_arg, int *pstatus_arg);
- bool run_next_test();
+ void run_next_test();
int main_handler(int event, void *data);
private:
@@ -1306,13 +1306,12 @@ PVCTestDriver::start_tests(RegressionTest *r_arg, int
*pstatus_arg)
r = r_arg;
pstatus = pstatus_arg;
+ SET_HANDLER(&PVCTestDriver::main_handler);
- if (run_next_test()) {
- SET_HANDLER(&PVCTestDriver::main_handler);
- }
+ run_next_test();
}
-bool
+void
PVCTestDriver::run_next_test()
{
unsigned a_index = i * 2;
@@ -1326,7 +1325,7 @@ PVCTestDriver::run_next_test()
*pstatus = REGRESSION_TEST_FAILED;
}
delete this;
- return false;
+ return;
}
completions_received = 0;
i++;
@@ -1341,8 +1340,6 @@ PVCTestDriver::run_next_test()
PluginVC *a_vc = core->connect();
a->init_test(NET_VC_TEST_ACTIVE, this, a_vc, r, &netvc_tests_def[a_index],
"PluginVC", "pvc_test_detail");
-
- return true;
}
int