Skip to content

Commit 736cfd2

Browse files
authored
Merge pull request #773 from pbalcer/uncaught-exception-pool
[umf][disjoint pool] fix potential unchaught exception in USM Alloc
2 parents e3f4822 + 45f36f2 commit 736cfd2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/common/umf_pools/disjoint_pool.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -966,10 +966,10 @@ DisjointPool::~DisjointPool() {
966966
size_t HighPeakSlabsInUse;
967967
if (impl->getParams().PoolTrace > 1) {
968968
auto name = impl->getParams().name;
969-
impl->printStats(TitlePrinted, HighBucketSize, HighPeakSlabsInUse,
970-
name.c_str());
971-
if (TitlePrinted) {
972-
try { // cannot throw in destructor
969+
try { // cannot throw in destructor
970+
impl->printStats(TitlePrinted, HighBucketSize, HighPeakSlabsInUse,
971+
name.c_str());
972+
if (TitlePrinted) {
973973
std::cout << "Current Pool Size "
974974
<< impl->getParams().limits->TotalSize.load()
975975
<< std::endl;
@@ -978,8 +978,8 @@ DisjointPool::~DisjointPool() {
978978
<< std::string(name.c_str() + 1) << ":"
979979
<< HighBucketSize << "," << HighPeakSlabsInUse
980980
<< ",64K" << std::endl;
981-
} catch (...) { // ignore exceptions
982981
}
982+
} catch (...) { // ignore exceptions
983983
}
984984
}
985985
}

0 commit comments

Comments
 (0)