Catch a more specific exception in environments that do not have a libc shared library.

This commit is contained in:
Ryan Dick 2023-10-03 12:20:09 -04:00
parent 5915a4a51c
commit ba54277011

View File

@ -53,13 +53,11 @@ class MemorySnapshot:
# time to test it properly.
vram = None
malloc_info = None
try:
malloc_info = LibcUtil().mallinfo2()
except Exception:
# TODO(ryand): Catch a more specific exception.
except OSError:
# This is expected in environments that do not have the 'libc.so.6' shared library.
pass
malloc_info = None
return cls(process_ram, vram, malloc_info)