==19177== Memcheck, a memory error detector ==19177== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==19177== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==19177== Command: ./smartDeviceLinkCore ==19177== ==19177== Thread 23: ==19177== Syscall param ioctl(HCIINQUIRY) points to uninitialised byte(s) ==19177== at 0x736CF47: ioctl (syscall-template.S:84) ==19177== by 0x5266C91: hci_inquiry (in /usr/lib/x86_64-linux-gnu/libbluetooth.so.3.18.10) ==19177== by 0x211361E: transport_manager::transport_adapter::BluetoothDeviceScanner::DoInquiry() (bluetooth_device_scanner.cc:206) ==19177== by 0x2116DF1: transport_manager::transport_adapter::BluetoothDeviceScanner::Thread() (bluetooth_device_scanner.cc:414) ==19177== by 0x2118DF0: transport_manager::transport_adapter::BluetoothDeviceScanner::BluetoothDeviceScannerDelegate::threadMain() (bluetooth_device_scanner.cc:513) ==19177== by 0x2268CEC: threads::Thread::threadFunc(void*) (thread_posix.cc:105) ==19177== by 0x4E416B9: start_thread (pthread_create.c:333) ==19177== by 0x737741C: clone (clone.S:109) ==19177== Address 0x10848009 is 9 bytes inside a block of size 3,594 alloc'd ==19177== at 0x4C2DBF6: malloc (vg_replace_malloc.c:299) ==19177== by 0x5266C3F: hci_inquiry (in /usr/lib/x86_64-linux-gnu/libbluetooth.so.3.18.10) ==19177== by 0x211361E: transport_manager::transport_adapter::BluetoothDeviceScanner::DoInquiry() (bluetooth_device_scanner.cc:206) ==19177== by 0x2116DF1: transport_manager::transport_adapter::BluetoothDeviceScanner::Thread() (bluetooth_device_scanner.cc:414) ==19177== by 0x2118DF0: transport_manager::transport_adapter::BluetoothDeviceScanner::BluetoothDeviceScannerDelegate::threadMain() (bluetooth_device_scanner.cc:513) ==19177== by 0x2268CEC: threads::Thread::threadFunc(void*) (thread_posix.cc:105) ==19177== by 0x4E416B9: start_thread (pthread_create.c:333) ==19177== by 0x737741C: clone (clone.S:109) ==19177== ==19177== Syscall param socketcall.bind(my_addr.rc_bdaddr) points to uninitialised byte(s) ==19177== at 0x73780F7: bind (syscall-template.S:84) ==19177== by 0x5266E6B: hci_open_dev (in /usr/lib/x86_64-linux-gnu/libbluetooth.so.3.18.10) ==19177== by 0x2112D1E: transport_manager::transport_adapter::BluetoothDeviceScanner::DoInquiry() (bluetooth_device_scanner.cc:173) ==19177== by 0x2116DF1: transport_manager::transport_adapter::BluetoothDeviceScanner::Thread() (bluetooth_device_scanner.cc:414) ==19177== by 0x2118DF0: transport_manager::transport_adapter::BluetoothDeviceScanner::BluetoothDeviceScannerDelegate::threadMain() (bluetooth_device_scanner.cc:513) ==19177== by 0x2268CEC: threads::Thread::threadFunc(void*) (thread_posix.cc:105) ==19177== by 0x4E416B9: start_thread (pthread_create.c:333) ==19177== by 0x737741C: clone (clone.S:109) ==19177== Address 0x1225ff36 is on thread 23's stack ==19177== in frame #1, created by hci_open_dev (???:) ==19177== ==19177== Thread 37: ==19177== Conditional jump or move depends on uninitialised value(s) ==19177== at 0x4C30A19: strlen (vg_replace_strmem.c:458) ==19177== by 0x6DE7288: std::basic_ostream >& std::operator<< >(std::basic_ostream >&, unsigned char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21) ==19177== by 0x210F69E: transport_manager::transport_adapter::BluetoothDevice::GetRfcommChannel(int, unsigned char*) (bluetooth_device.cc:57) ==19177== by 0x2162665: transport_manager::transport_adapter::BluetoothSocketConnection::Establish(transport_manager::ConnectError**) (bluetooth_socket_connection.cc:72) ==19177== by 0x2173BF1: transport_manager::transport_adapter::ThreadedSocketConnection::threadMain() (threaded_socket_connection.cc:173) ==19177== by 0x2178A2A: transport_manager::transport_adapter::ThreadedSocketConnection::SocketConnectionDelegate::threadMain() (threaded_socket_connection.cc:369) ==19177== by 0x2268CEC: threads::Thread::threadFunc(void*) (thread_posix.cc:105) ==19177== by 0x4E416B9: start_thread (pthread_create.c:333) ==19177== by 0x737741C: clone (clone.S:109) ==19177== ==19177== Conditional jump or move depends on uninitialised value(s) ==19177== at 0x4C30A19: strlen (vg_replace_strmem.c:458) ==19177== by 0x6DE7288: std::basic_ostream >& std::operator<< >(std::basic_ostream >&, unsigned char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21) ==19177== by 0x210F69E: transport_manager::transport_adapter::BluetoothDevice::GetRfcommChannel(int, unsigned char*) (bluetooth_device.cc:57) ==19177== by 0x210DAD8: transport_manager::transport_adapter::BluetoothTransportAdapter::Store() const (bluetooth_transport_adapter.cc:99) ==19177== by 0x20FB231: transport_manager::transport_adapter::TransportAdapterImpl::ConnectDone(std::__cxx11::basic_string, std::allocator > const&, int const&) (transport_adapter_impl.cc:750) ==19177== by 0x2173FF4: transport_manager::transport_adapter::ThreadedSocketConnection::threadMain() (threaded_socket_connection.cc:179) ==19177== by 0x2178A2A: transport_manager::transport_adapter::ThreadedSocketConnection::SocketConnectionDelegate::threadMain() (threaded_socket_connection.cc:369) ==19177== by 0x2268CEC: threads::Thread::threadFunc(void*) (thread_posix.cc:105) ==19177== by 0x4E416B9: start_thread (pthread_create.c:333) ==19177== by 0x737741C: clone (clone.S:109) ==19177== ==19177== Thread 1 MainThread: ==19177== Invalid write of size 8 ==19177== at 0x2050278: threads::Thread::set_delegate(threads::ThreadDelegate*) (thread.h:128) ==19177== by 0x226C499: threads::ThreadDelegate::~ThreadDelegate() (thread_delegate.cc:44) ==19177== by 0x17CBF8F: media_manager::StreamerAdapter::Streamer::~Streamer() (streamer_adapter.cc:119) ==19177== by 0x17C3BCF: media_manager::SocketStreamerAdapter::SocketStreamer::~SocketStreamer() (socket_streamer_adapter.cc:67) ==19177== by 0x17C3BFF: media_manager::SocketStreamerAdapter::SocketStreamer::~SocketStreamer() (socket_streamer_adapter.cc:67) ==19177== by 0x17CA715: media_manager::StreamerAdapter::~StreamerAdapter() (streamer_adapter.cc:52) ==19177== by 0x17C3A61: media_manager::SocketStreamerAdapter::~SocketStreamerAdapter() (socket_streamer_adapter.cc:52) ==19177== by 0x17C14DD: media_manager::SocketVideoStreamerAdapter::~SocketVideoStreamerAdapter() (socket_video_streamer_adapter.cc:50) ==19177== by 0x17C150D: media_manager::SocketVideoStreamerAdapter::~SocketVideoStreamerAdapter() (socket_video_streamer_adapter.cc:50) ==19177== by 0x17BDAC7: utils::SharedPtr::DummyDeleter(media_manager::MediaAdapterImpl*) (shared_ptr.h:57) ==19177== by 0x17BE9CB: utils::SharedPtr::release() (shared_ptr.h:350) ==19177== by 0x17BDB0D: utils::SharedPtr::dropReference() (shared_ptr.h:368) ==19177== Address 0x875a618 is 88 bytes inside a block of size 280 free'd ==19177== at 0x4C2F1A0: operator delete(void*) (vg_replace_malloc.c:576) ==19177== by 0x226C21F: threads::Thread::~Thread() (thread_posix.cc:294) ==19177== by 0x226C2BA: threads::DeleteThread(threads::Thread*) (thread_posix.cc:303) ==19177== by 0x17CA6E0: media_manager::StreamerAdapter::~StreamerAdapter() (streamer_adapter.cc:51) ==19177== by 0x17C3A61: media_manager::SocketStreamerAdapter::~SocketStreamerAdapter() (socket_streamer_adapter.cc:52) ==19177== by 0x17C14DD: media_manager::SocketVideoStreamerAdapter::~SocketVideoStreamerAdapter() (socket_video_streamer_adapter.cc:50) ==19177== by 0x17C150D: media_manager::SocketVideoStreamerAdapter::~SocketVideoStreamerAdapter() (socket_video_streamer_adapter.cc:50) ==19177== by 0x17BDAC7: utils::SharedPtr::DummyDeleter(media_manager::MediaAdapterImpl*) (shared_ptr.h:57) ==19177== by 0x17BE9CB: utils::SharedPtr::release() (shared_ptr.h:350) ==19177== by 0x17BDB0D: utils::SharedPtr::dropReference() (shared_ptr.h:368) ==19177== by 0x17BC135: utils::SharedPtr::~SharedPtr() (shared_ptr.h:251) ==19177== by 0x17C0189: std::pair >::~pair() (stl_pair.h:96) ==19177== Block was alloc'd at ==19177== at 0x4C2E216: operator new(unsigned long) (vg_replace_malloc.c:334) ==19177== by 0x226C23E: threads::CreateThread(char const*, threads::ThreadDelegate*) (thread_posix.cc:297) ==19177== by 0x17CA559: media_manager::StreamerAdapter::StreamerAdapter(media_manager::StreamerAdapter::Streamer*) (streamer_adapter.cc:43) ==19177== by 0x17C3A04: media_manager::SocketStreamerAdapter::SocketStreamerAdapter(std::__cxx11::basic_string, std::allocator > const&, unsigned short, std::__cxx11::basic_string, std::allocator > const&) (socket_streamer_adapter.cc:50) ==19177== by 0x17C149E: media_manager::SocketVideoStreamerAdapter::SocketVideoStreamerAdapter(std::__cxx11::basic_string, std::allocator > const&, unsigned short) (socket_video_streamer_adapter.cc:48) ==19177== by 0x17B81DE: media_manager::MediaManagerImpl::Init() (media_manager_impl.cc:124) ==19177== by 0x17B7D93: media_manager::MediaManagerImpl::MediaManagerImpl(application_manager::ApplicationManager&, media_manager::MediaManagerSettings const&) (media_manager_impl.cc:68) ==19177== by 0x17AAE3E: main_namespace::LifeCycle::StartComponents() (life_cycle.cc:114) ==19177== by 0x17B57A1: main (main.cc:137) ==19177== ==19177== Invalid write of size 8 ==19177== at 0x2050278: threads::Thread::set_delegate(threads::ThreadDelegate*) (thread.h:128) ==19177== by 0x226C499: threads::ThreadDelegate::~ThreadDelegate() (thread_delegate.cc:44) ==19177== by 0x109F9A59: functional_modules::TimerThreadDelegate::~TimerThreadDelegate() (timer_director.h:44) ==19177== by 0x109F9A89: functional_modules::TimerThreadDelegate::~TimerThreadDelegate() (timer_director.h:44) ==19177== by 0x109F847B: void functional_modules::TimerDirector::UnregisterTimer(functional_modules::ModuleTimer const&) (timer_director.cc:121) ==19177== by 0x109D634E: remote_control::request_controller::RequestController::~RequestController() (request_controller.cc:48) ==19177== by 0x109BE08D: remote_control::RemoteControlPlugin::~RemoteControlPlugin() (remote_control_plugin.cc:83) ==19177== by 0x109BE0D9: remote_control::RemoteControlPlugin::~RemoteControlPlugin() (remote_control_plugin.cc:85) ==19177== by 0x22A7692: utils::SharedPtr::DummyDeleter(functional_modules::GenericModule*) (shared_ptr.h:57) ==19177== by 0x22A8C49: utils::SharedPtr::release() (shared_ptr.h:350) ==19177== by 0x22A76D7: utils::SharedPtr::dropReference() (shared_ptr.h:368) ==19177== by 0x22A679B: utils::SharedPtr::~SharedPtr() (shared_ptr.h:251) ==19177== Address 0x104e62b8 is 88 bytes inside a block of size 280 free'd ==19177== at 0x4C2F1A0: operator delete(void*) (vg_replace_malloc.c:576) ==19177== by 0x226C21F: threads::Thread::~Thread() (thread_posix.cc:294) ==19177== by 0x226C2BA: threads::DeleteThread(threads::Thread*) (thread_posix.cc:303) ==19177== by 0x109F845D: void functional_modules::TimerDirector::UnregisterTimer(functional_modules::ModuleTimer const&) (timer_director.cc:120) ==19177== by 0x109D634E: remote_control::request_controller::RequestController::~RequestController() (request_controller.cc:48) ==19177== by 0x109BE08D: remote_control::RemoteControlPlugin::~RemoteControlPlugin() (remote_control_plugin.cc:83) ==19177== by 0x109BE0D9: remote_control::RemoteControlPlugin::~RemoteControlPlugin() (remote_control_plugin.cc:85) ==19177== by 0x22A7692: utils::SharedPtr::DummyDeleter(functional_modules::GenericModule*) (shared_ptr.h:57) ==19177== by 0x22A8C49: utils::SharedPtr::release() (shared_ptr.h:350) ==19177== by 0x22A76D7: utils::SharedPtr::dropReference() (shared_ptr.h:368) ==19177== by 0x22A679B: utils::SharedPtr::~SharedPtr() (shared_ptr.h:251) ==19177== by 0x22ABFF7: std::pair >::~pair() (stl_pair.h:96) ==19177== Block was alloc'd at ==19177== at 0x4C2E216: operator new(unsigned long) (vg_replace_malloc.c:334) ==19177== by 0x226C23E: threads::CreateThread(char const*, threads::ThreadDelegate*) (thread_posix.cc:297) ==19177== by 0x109F825E: void functional_modules::TimerDirector::RegisterTimer(functional_modules::ModuleTimer&) (timer_director.cc:97) ==19177== by 0x109D629C: remote_control::request_controller::RequestController::RequestController() (request_controller.cc:44) ==19177== by 0x109BDB8D: remote_control::RemoteControlPlugin::RemoteControlPlugin() (remote_control_plugin.cc:60) ==19177== by 0x109BDB15: Create (remote_control_plugin.cc:57) ==19177== by 0x22A0D4D: functional_modules::PluginManager::LoadPlugins(std::__cxx11::basic_string, std::allocator > const&) (plugin_manager.cc:120) ==19177== by 0x17F01D6: application_manager::ApplicationManagerImpl::Init(resumption::LastState&, media_manager::MediaManager*) (application_manager_impl.cc:2244) ==19177== by 0x17AAEB7: main_namespace::LifeCycle::StartComponents() (life_cycle.cc:116) ==19177== by 0x17B57A1: main (main.cc:137) ==19177== ==19177== ==19177== HEAP SUMMARY: ==19177== in use at exit: 98,668 bytes in 210 blocks ==19177== total heap usage: 533,086 allocs, 532,876 frees, 71,899,719 bytes allocated ==19177== ==19177== LEAK SUMMARY: ==19177== definitely lost: 408 bytes in 5 blocks ==19177== indirectly lost: 13,420 bytes in 172 blocks ==19177== possibly lost: 1,280 bytes in 4 blocks ==19177== still reachable: 83,560 bytes in 29 blocks ==19177== suppressed: 0 bytes in 0 blocks ==19177== Rerun with --leak-check=full to see details of leaked memory ==19177== ==19177== For counts of detected and suppressed errors, rerun with: -v ==19177== Use --track-origins=yes to see where uninitialised values come from ==19177== ERROR SUMMARY: 10 errors from 6 contexts (suppressed: 0 from 0)