Skip to content

Commit

Permalink
Merge pull request #773 from pbalcer/uncaught-exception-pool
Browse files Browse the repository at this point in the history
[umf][disjoint pool] fix potential unchaught exception in USM Alloc
  • Loading branch information
igchor committed Aug 9, 2023
2 parents e3f4822 + 45f36f2 commit 736cfd2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/common/umf_pools/disjoint_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,10 +966,10 @@ DisjointPool::~DisjointPool() {
size_t HighPeakSlabsInUse;
if (impl->getParams().PoolTrace > 1) {
auto name = impl->getParams().name;
impl->printStats(TitlePrinted, HighBucketSize, HighPeakSlabsInUse,
name.c_str());
if (TitlePrinted) {
try { // cannot throw in destructor
try { // cannot throw in destructor
impl->printStats(TitlePrinted, HighBucketSize, HighPeakSlabsInUse,
name.c_str());
if (TitlePrinted) {
std::cout << "Current Pool Size "
<< impl->getParams().limits->TotalSize.load()
<< std::endl;
Expand All @@ -978,8 +978,8 @@ DisjointPool::~DisjointPool() {
<< std::string(name.c_str() + 1) << ":"
<< HighBucketSize << "," << HighPeakSlabsInUse
<< ",64K" << std::endl;
} catch (...) { // ignore exceptions
}
} catch (...) { // ignore exceptions
}
}
}
Expand Down

0 comments on commit 736cfd2

Please sign in to comment.