mirror of
https://github.com/vale981/ray
synced 2025-03-05 18:11:42 -05:00
Fix heap-use-after-free bug of gcs pub sub testcase (#8968)
This commit is contained in:
parent
b68fede30b
commit
4facac023f
1 changed files with 5 additions and 1 deletions
|
@ -45,9 +45,13 @@ class GcsPubSubTest : public ::testing::Test {
|
|||
pub_sub_.reset();
|
||||
client_->Disconnect();
|
||||
io_service_.stop();
|
||||
client_.reset();
|
||||
thread_io_service_->join();
|
||||
thread_io_service_.reset();
|
||||
|
||||
// Note: If we immediately reset client_ after io_service_ stop, because client_ still
|
||||
// has thread executing logic, such as unsubscribe's callback, the problem of heap
|
||||
// used after free will occur.
|
||||
client_.reset();
|
||||
}
|
||||
|
||||
void Subscribe(const std::string &channel, const std::string &id,
|
||||
|
|
Loading…
Add table
Reference in a new issue