@@ -423,8 +423,8 @@ std::ostream &operator<<(std::ostream &Os, const Slab &Slab) {
423
423
Slab::Slab (Bucket &Bkt)
424
424
: // In case bucket size is not a multiple of SlabMinSize, we would have
425
425
// some padding at the end of the slab.
426
- Chunks(Bkt.SlabMinSize() / Bkt.getSize()), NumAllocated{0 },
427
- bucket (Bkt), SlabListIter{}, FirstFreeChunkIdx{0 } {
426
+ Chunks(Bkt.SlabMinSize() / Bkt.getSize()), NumAllocated{0 }, bucket(Bkt),
427
+ SlabListIter{}, FirstFreeChunkIdx{0 } {
428
428
auto SlabSize = Bkt.SlabAllocSize ();
429
429
MemPtr = memoryProviderAlloc (Bkt.getMemHandle (), SlabSize);
430
430
regSlab (*this );
@@ -446,10 +446,14 @@ Slab::~Slab() {
446
446
const char *message = " " ;
447
447
int error = 0 ;
448
448
449
- umfMemoryProviderGetLastNativeError (
450
- umfGetLastFailedMemoryProvider (), &message, &error);
451
- LOG_ERR (" Native error msg: %s, native error code: %d" , message,
452
- error);
449
+ try {
450
+ umfMemoryProviderGetLastNativeError (
451
+ umfGetLastFailedMemoryProvider (), &message, &error);
452
+ LOG_ERR (" Native error msg: %s, native error code: %d" , message,
453
+ error);
454
+ } catch (...) {
455
+ // ignore any additionall errors from logger
456
+ }
453
457
}
454
458
}
455
459
}
0 commit comments