You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
seekg() and seekp() must catch and rethrow internal io exceptions. If an internal io exception occurs, the bad bit must be set:
See: http://www.cplusplus.com/reference/istream/istream/seekg/ at the bottom in the "Exception Safety" section.
Expected behavior
seekg() and seekp() must catch and rethrow internal io exceptions.
This issue was found from a boost iostreams test case: https://github.com/boostorg/iostreams/blob/develop/test/stream_state_test.cpp
Where a phony "error_device" implements internal io operations read(), write() and seek() which each throw an exception. These functions are ultimately called from seekg() and seekp() in istream and ostream.
The text was updated successfully, but these errors were encountered:
Describe the bug
seekg() and seekp() must catch and rethrow internal io exceptions. If an internal io exception occurs, the bad bit must be set:
See: http://www.cplusplus.com/reference/istream/istream/seekg/ at the bottom in the "Exception Safety" section.
Expected behavior
seekg() and seekp() must catch and rethrow internal io exceptions.
STL version
current
main
Additional context
Both llvm and gcc's c++ standard libraries do this:
https://github.com/google/libcxx/blob/master/include/istream#L1370
https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/bits/istream.tcc#L877
This issue was found from a boost iostreams test case: https://github.com/boostorg/iostreams/blob/develop/test/stream_state_test.cpp
Where a phony "error_device" implements internal io operations read(), write() and seek() which each throw an exception. These functions are ultimately called from seekg() and seekp() in istream and ostream.
The text was updated successfully, but these errors were encountered: