Fix potential race condidion when in logger copy ctor

Don't copy other.trace - just create a new one with same size instead
This commit is contained in:
gabime
2019-09-03 14:54:17 +03:00
parent 6ff52332a8
commit 3ea7fb18d6
2 changed files with 10 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ SPDLOG_INLINE logger::logger(const logger &other)
{
if (other.tracer_)
{
tracer_ = std::make_shared<details::backtracer>(*other.tracer_);
tracer_ = std::make_shared<details::backtracer>(other.tracer_->n_messages());
}
}