Skip to content

Commit

Permalink
Fix asan stack use after return error. (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanebay authored Mar 21, 2024
1 parent 2c500c5 commit f338864
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class HomestoreConan(ConanFile):
name = "homestore"
version = "5.1.14"
version = "5.1.15"

homepage = "https://github.com/eBay/Homestore"
description = "HomeStore Storage Engine"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/checkpoint/cp_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ void CPManager::start_cp_thread() {

{
std::unique_lock< std::mutex > lk{ctx->mtx};
ctx->cv.wait(lk, [&ctx] { return (ctx->thread_cnt == 1); });
ctx->cv.wait(lk, [ctx] { return (ctx->thread_cnt == 1); });
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/index/wb_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void IndexWBCache::start_flush_threads() {

for (int32_t i{0}; i < nthreads; ++i) {
iomanager.create_reactor("index_cp_flush" + std::to_string(i), iomgr::INTERRUPT_LOOP, 1u,
[this, &ctx](bool is_started) {
[this, ctx](bool is_started) {
if (is_started) {
{
std::unique_lock< std::mutex > lk{ctx->mtx};
Expand All @@ -71,7 +71,7 @@ void IndexWBCache::start_flush_threads() {

{
std::unique_lock< std::mutex > lk{ctx->mtx};
ctx->cv.wait(lk, [&ctx, nthreads] { return (ctx->thread_cnt == nthreads); });
ctx->cv.wait(lk, [ctx, nthreads] { return (ctx->thread_cnt == nthreads); });
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/lib/logstore/log_store_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void LogStoreService::start_threads() {

m_flush_fiber = nullptr;
iomanager.create_reactor("log_flush_thread", iomgr::TIGHT_LOOP | iomgr::ADAPTIVE_LOOP, 1 /* num_fibers */,
[this, &ctx](bool is_started) {
[this, ctx](bool is_started) {
if (is_started) {
m_flush_fiber = iomanager.iofiber_self();
{
Expand All @@ -273,7 +273,7 @@ void LogStoreService::start_threads() {

m_truncate_fiber = nullptr;
iomanager.create_reactor("logstore_truncater", iomgr::INTERRUPT_LOOP, 2 /* num_fibers */,
[this, &ctx](bool is_started) {
[this, ctx](bool is_started) {
if (is_started) {
m_truncate_fiber = iomanager.sync_io_capable_fibers()[0];
{
Expand All @@ -285,7 +285,7 @@ void LogStoreService::start_threads() {
});
{
std::unique_lock< std::mutex > lk{ctx->mtx};
ctx->cv.wait(lk, [&ctx] { return (ctx->thread_cnt == 2); });
ctx->cv.wait(lk, [ctx] { return (ctx->thread_cnt == 2); });
}
}

Expand Down

0 comments on commit f338864

Please sign in to comment.