https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81256
--- Comment #1 from programmerjake at gmail dot com --- assuming this is fixed, basic_filebuf::~basic_filebuf will need to add a try-catch to ignore exceptions thrown there instead of calling terminate because it's noexcept.