Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ➜ server git:(debug_server) ✗ valgrind build/server
- ==10561== Memcheck, a memory error detector
- ==10561== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
- ==10561== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
- ==10561== Command: build/server
- ==10561==
- ____ _ _
- | _ \ | | | |
- | |_) | __ _ | |__ ___ | |
- | _ < / _` || '_ \ / _ \| |
- | |_) || (_| || |_) || __/| |
- |____/ \__,_||_.__/ \___||_|
- [DATABASE] try import users already created
- [DATABASE] empty
- [TCP SERVER] listening on port 4243
- [TCP CLIENT] inserted on address 127.0.0.1
- # UNPACK # 0x1
- # PACKCMD [0x1] [ICommand::REG]
- # PACKCMD [0x14] [ICommand::ERR]
- errorCode= '0'
- [REG] OK
- ==10561== Mismatched free() / delete / delete []
- ==10561== at 0x4C2C83C: operator delete[](void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==10561== by 0x40D3EE: TcpClient::sendHandler(boost::system::error_code const&, unsigned long) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x411248: boost::asio::detail::write_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf2<void, TcpClient, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<TcpClient*>, boost::arg<1> (*)(), boost::arg<2> (*)()> > >::operator()(boost::system::error_code const&, unsigned long, int) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x4114F6: boost::asio::detail::reactive_socket_send_op<boost::asio::mutable_buffers_1, boost::asio::detail::write_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf2<void, TcpClient, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<TcpClient*>, boost::arg<1> (*)(), boost::arg<2> (*)()> > > >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned long) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x41607E: boost::asio::detail::task_io_service::run(boost::system::error_code&) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x4122E4: TcpServer::run() (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x4080DC: main (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== Address 0x62c99e0 is 0 bytes inside a block of size 16 alloc'd
- ==10561== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==10561== by 0x421D41: CommandErr::setParam(std::vector<std::string, std::allocator<std::string> >*) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x422142: HandleCmd::packCmd(ICommand::Instruction, std::vector<std::string, std::allocator<std::string> >&) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x41A059: BabelServer::sendStateCommand(Client*, int, ICommand::Instruction) const (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x41BC9F: BabelServer::onReg(Client*, std::vector<std::string, std::allocator<std::string> >&, ICommand::Instruction) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x416A7F: Client::onSocketReadable(IClientSocket*, unsigned int) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x40D93A: boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, TcpClient::startRecv()::{lambda(boost::system::error_code const&, unsigned long)#1}>::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned long) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x41607E: boost::asio::detail::task_io_service::run(boost::system::error_code&) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x4122E4: TcpServer::run() (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x4080DC: main (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561==
- [TCP CLIENT] inserted on address 127.0.0.1
- # UNPACK # 0x1
- # PACKCMD [0x1] [ICommand::REG]
- # PACKCMD [0x14] [ICommand::ERR]
- errorCode= '0'
- [REG] OK
- # UNPACK # 0x2
- # PACKCMD [0x2] [ICommand::LOG]
- [DISPLAY] Attributes of a client 'simon'
- - account: 'simon'
- - pseudo: 'simon'
- - status: '1'
- - statusCall: '0'
- - isConnected: '0'
- - lastPingTime: '1414785676'
- - contacts: '
- * Empty Contact List
- -----------
- # PACKCMD [0x14] [ICommand::ERR]
- errorCode= '0'
- [LOG] OK
- # UNPACK # 0x4
- # PACKCMD [0x4] [ICommand::SHOW]
- # PACKCMD [0x14] [ICommand::ERR]
- errorCode= '0'
- [SHOW] OK
- # PACKCMD [0x4] [ICommand::SHOW]
- # UNPACK # 0x2
- # PACKCMD [0x2] [ICommand::LOG]
- [DISPLAY] Attributes of a client 'ninon'
- - account: 'ninon'
- - pseudo: 'ninon'
- - status: '1'
- - statusCall: '0'
- - isConnected: '0'
- - lastPingTime: '1414785684'
- - contacts: '
- * Empty Contact List
- -----------
- # PACKCMD [0x14] [ICommand::ERR]
- errorCode= '0'
- [LOG] OK
- # UNPACK # 0x4
- # PACKCMD [0x4] [ICommand::SHOW]
- # PACKCMD [0x14] [ICommand::ERR]
- errorCode= '0'
- [SHOW] OK
- # PACKCMD [0x4] [ICommand::SHOW]
- # UNPACK # 0x5
- # PACKCMD [0x5] [ICommand::ADD]
- ==10561== Invalid write of size 8
- ==10561== at 0x41F560: CommandAdd::getParam(IClientSocket*) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x421EDF: HandleCmd::unPackCmd() (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x416A61: Client::onSocketReadable(IClientSocket*, unsigned int) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x40D93A: boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, TcpClient::startRecv()::{lambda(boost::system::error_code const&, unsigned long)#1}>::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned long) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x41607E: boost::asio::detail::task_io_service::run(boost::system::error_code&) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x4122E4: TcpServer::run() (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x4080DC: main (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== Address 0x0 is not stack'd, malloc'd or (recently) free'd
- ==10561==
- ==10561==
- ==10561== Process terminating with default action of signal 11 (SIGSEGV)
- ==10561== Access not within mapped region at address 0x0
- ==10561== at 0x41F560: CommandAdd::getParam(IClientSocket*) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x421EDF: HandleCmd::unPackCmd() (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x416A61: Client::onSocketReadable(IClientSocket*, unsigned int) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x40D93A: boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, TcpClient::startRecv()::{lambda(boost::system::error_code const&, unsigned long)#1}>::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned long) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x41607E: boost::asio::detail::task_io_service::run(boost::system::error_code&) (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x4122E4: TcpServer::run() (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== by 0x4080DC: main (in /home/simon/Babel-VOIP-Epitech/Babel/server/build/server)
- ==10561== If you believe this happened as a result of a stack
- ==10561== overflow in your program's main thread (unlikely but
- ==10561== possible), you can try to increase the size of the
- ==10561== main thread stack using the --main-stacksize= flag.
- ==10561== The main thread stack size used in this run was 8388608.
- ==10561==
- ==10561== HEAP SUMMARY:
- ==10561== in use at exit: 25,166 bytes in 181 blocks
- ==10561== total heap usage: 643 allocs, 462 frees, 151,326 bytes allocated
- ==10561==
- ==10561== LEAK SUMMARY:
- ==10561== definitely lost: 3,476 bytes in 29 blocks
- ==10561== indirectly lost: 0 bytes in 0 blocks
- ==10561== possibly lost: 1,908 bytes in 29 blocks
- ==10561== still reachable: 19,782 bytes in 123 blocks
- ==10561== suppressed: 0 bytes in 0 blocks
- ==10561== Rerun with --leak-check=full to see details of leaked memory
- ==10561==
- ==10561== For counts of detected and suppressed errors, rerun with: -v
- ==10561== ERROR SUMMARY: 9 errors from 2 contexts (suppressed: 0 from 0)
- [1] 10561 segmentation fault (core dumped) valgrind build/server
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement