]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
fix shared state used after free (#11059)
authorehds <ehds@qq.com>
Thu, 5 Jan 2023 03:35:34 +0000 (19:35 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 5 Jan 2023 03:35:34 +0000 (19:35 -0800)
commit4737e1d41be28a91707bdef17843ebaca10a07d6
treed19f4e8cc849f87375fdcb1fbab42efb5672b5cb
parentb965a5a80ee1a70fd5de33818e92b4afa0d9e08c
fix shared state used after free (#11059)

Summary:
Before this pr,  the destruction order is `shared` -> `db_`(StressTest destruction) -> `stress`, but `compaction_filter` of `db_` will hold the `shared` pointer, so `shared` maybe used after free.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/11059

Reviewed By: hx235

Differential Revision: D42297366

Pulled By: ajkr

fbshipit-source-id: 17b314635359acacd5ba62f9db5f955f451133f7
db_stress_tool/db_stress_driver.cc
db_stress_tool/db_stress_driver.h
db_stress_tool/db_stress_tool.cc