Closed gubatron closed 6 years ago
so my guess is that readv
is going in here:
std::int64_t file::readv(std::int64_t file_offset, span<iovec_t const> bufs
, error_code& ec, int flags)
{
if (m_file_handle == INVALID_HANDLE_VALUE)
{
#ifdef TORRENT_WINDOWS
ec = error_code(ERROR_INVALID_HANDLE, system_category());
#else
// goes here because it's android vvvvvvvvvvvvvvvvvv
ec = error_code(boost::system::errc::bad_file_descriptor, generic_category());
#endif
return -1;
}
...
then on storage.cpp
, file_op(...)
I wonder if these TORRENT_ASSERT
calls are causing the crash, do we build with TORRENT_ASSERT
on?
// we either get an error or 0 or more bytes read
TORRENT_ASSERT(e || ret >= 0);
TORRENT_ASSERT(ret <= bufs_size(bufs));
no, we don't build with TORRENT_ASSERT
I guess TORRENT_ASSERT
is not on, since a SIGINT
isn't raised by assert_fail
, and we're getting a SIGSEGV
think the crash is happening here, on that error_code()
call?
ec = error_code(boost::system::errc::bad_file_descriptor, generic_category());
# define BOOST_NOEXCEPT noexcept
Fixed with 1.2.0.13-RC14
The comment on that function definition might be a clue
perhaps the crash is due to it being used in the wrong context