Open KrisThielemans opened 1 year ago
I'm not seeing a call to tellg
in your example.
sorry! I meant tellp
. I haven't tried with tellg
yet.
std::ios_base::failure
is what gets thrown when a seek fails.
This suggests that somewhere (maybe in boost, maybe in the underlying standard library) there is a problem with seeking past 0x7FFFFFFFF.
It is in boost. I've tried it with std::stringstream
and std::fstream
I have reproduced it; and it is throwing from:
* frame #0: 0x000000010000343c a.out`boost::iostreams::detail::direct_streambuf<boost::iostreams::basic_array<char>, std::__1::char_traits<char> >::seek_impl(this=0x00007ff7bfeff418, off=0, way=cur, which=16) at direct_streambuf.hpp:238:36
Test program:
fails. g++-8 and boost 1.65.1 gives
g++-12 and boost 1.74.0. gives
It works fine when not calling
tellg()
. This is similar to https://github.com/boostorg/interprocess/issues/190, although here we don't have a segfault.