This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/81256] New: basic_filebuf::close doesn't propagate exceptions


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81256

            Bug ID: 81256
           Summary: basic_filebuf::close doesn't propagate exceptions
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: programmerjake at gmail dot com
  Target Milestone: ---

in line 247 of fstream.tcc, basic_filebuf::close ignores exceptions thrown by
_M_terminate_output. _M_terminate_output calls unshift on the codecvt facet
from the imbued locale. unshift might throw if using a custom codecvt facet.

the standard (N4659) says (30.9.2.3.7), referring to calling unshift and other
functions:
If one of these calls throws an exception,
the exception is caught and rethrown after closing the file.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]