frostalf / libtorrent

Automatically exported from code.google.com/p/libtorrent
0 stars 0 forks source link

rev 9643 crash during checking of multi-file torrent with remapped storage #585

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
std::string libtorrent::file_storage::file_path(int, const string&) const is 
trying to address index > 0, the storage is remapped to a single file (only 
index 0 is valid) so it crashes every time.

==== debug ====

assertion failed. Please file a bugreport at 
http://code.google.com/p/libtorrent/issues
Please include the following information:

version: 1.0.0.0
$Rev: 9462 $
file: '/libtorrent/9643/src/file_storage.cpp'
line: 519
function: std::string libtorrent::file_storage::file_path(int, const string&) 
const
expression: index >= 0 && index < int(m_files.size())

stack:
1: assert_fail(char const*, int, char const*, char const*, char const*)
2: libtorrent::file_storage::file_path(int, std::string const&) const
3: libtorrent::file_pool::open_file(void*, std::string const&, int, 
libtorrent::file_storage const&, int, boost::system::error_code&)
4: libtorrent::default_storage::open_file(int, int, boost::system::error_code&) 
const
5: libtorrent::default_storage::sparse_end(int) const
6: libtorrent::piece_manager::check_one_piece(int&)
7: libtorrent::piece_manager::check_files(int&, int&, 
boost::system::error_code&)
8: libtorrent::disk_io_thread::thread_fun()
9: boost::_mfi::mf0<void, 
libtorrent::disk_io_thread>::operator()(libtorrent::disk_io_thread*) const
10: void boost::_bi::list1<boost::_bi::value<libtorrent::disk_io_thread*> 
>::operator()<boost::_mfi::mf0<void, libtorrent::disk_io_thread>, 
boost::_bi::list0>(boost::_bi::type<void>, boost::_mfi::mf0<void, 
libtorrent::disk_io_thread>&, boost::_bi::list0&, int)
11: boost::_bi::bind_t<void, boost::_mfi::mf0<void, 
libtorrent::disk_io_thread>, 
boost::_bi::list1<boost::_bi::value<libtorrent::disk_io_thread*> > 
>::operator()()
12: boost::asio::detail::posix_thread::func<boost::_bi::bind_t<void, 
boost::_mfi::mf0<void, libtorrent::disk_io_thread>, 
boost::_bi::list1<boost::_bi::value<libtorrent::disk_io_thread*> > > >::run()
13: boost_asio_detail_posix_thread_function
14:
15: clone

Original issue reported on code.google.com by oldfa...@gmail.com on 24 Feb 2014 at 6:41

GoogleCodeExporter commented 9 years ago
I added a unit test to try to reproduce this (test_remap_files.cpp) but I 
couldn't reproduce it. Would you mind helping me reproduce it or figure out 
what's going on?

Original comment by arvid.no...@gmail.com on 5 Mar 2014 at 9:47

GoogleCodeExporter commented 9 years ago
Hi,

I have set up a development environment with bjam, gdb etc with a single
torrent which causes the crash. Pls give email to provide you with
credentials and instructions of how to reproduce. It crashes every time.

Thanks!

Original comment by oldfa...@gmail.com on 5 Mar 2014 at 3:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
arvid.norberg@gmail.com

Original comment by arvid.no...@gmail.com on 5 Mar 2014 at 5:14

GoogleCodeExporter commented 9 years ago
I believe this is fixed now, in [9768]. Thanks for the report! please re-open 
if it's still broken

Original comment by arvid.no...@gmail.com on 6 Mar 2014 at 10:23

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Crash is fixed. Thanks for the fast reaction!

Original comment by oldfa...@gmail.com on 7 Mar 2014 at 7:54