You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using UndefinedBehaviorSanitizer, we systematically find runtime errors of the like:
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/User/Developer/libutp/utp_internal.cpp:2564:77 in
/Users/User/Developer/libutp/utp_internal.cpp:2564:77: runtime error: store to misaligned address 0x000106f5c504 for type 'UTPSocket *', which requires 8 byte alignment
Thread 6#0 0x0000000104f08eb4 in __ubsan_on_report ()
#1 0x0000000104f08f68 in __ubsan::UndefinedBehaviorReport::UndefinedBehaviorReport(char const*, __ubsan::Location&, __sanitizer::InternalScopedString&) ()
#2 0x0000000104f048f8 in __ubsan::Diag::~Diag() ()
#3 0x0000000104f06234 in handleTypeMismatchImpl(__ubsan::TypeMismatchData*, unsigned long, __ubsan::ReportOptions) ()
#4 0x0000000104f05ebc in __ubsan_handle_type_mismatch_v1 ()
#5 0x00000001033a44d8 in utp_initialize_socket(UTPSocket*, sockaddr const*, unsigned int, bool, unsigned int, unsigned int, unsigned int) at /Users/User/Developer/transmission/third-party/libutp/utp_internal.cpp:2574
#6 0x00000001033a7cfc in ::utp_connect(utp_socket *, const sockaddr *, socklen_t) at /Users/User/Developer/transmission/third-party/libutp/utp_internal.cpp:2748
#7 0x0000000102bcbfe8 in tr_peerIo::new_outgoing(tr_session*, tr_bandwidth*, tr_address const&, tr_port, std::__1::array<std::byte, 20ul> const&, bool, bool) at /Users/User/Developer/transmission/libtransmission/peer-io.cc:142
#8 0x0000000102bf647c in (anonymous namespace)::connect_helpers::initiateConnection(tr_peerMgr*, tr_swarm*, peer_atom&) at /Users/User/Developer/transmission/libtransmission/peer-mgr.cc:2451
#9 0x0000000102bf3608 in tr_peerMgr::makeNewPeerConnections(unsigned long) at /Users/User/Developer/transmission/libtransmission/peer-mgr.cc:2490
#10 0x0000000102bf2598 in tr_peerMgr::reconnectPulse() at /Users/User/Developer/transmission/libtransmission/peer-mgr.cc:2156
#11 0x0000000102bf39b8 in tr_peerMgr::bandwidthPulse() at /Users/User/Developer/transmission/libtransmission/peer-mgr.cc:2221
#12 0x0000000102bfeac4 in tr_peerMgr::tr_peerMgr(tr_session*)::'lambda'()::operator()() const at /Users/User/Developer/transmission/libtransmission/peer-mgr.cc:689
#13 0x0000000102bfea6c in decltype(std::declval<tr_peerMgr::tr_peerMgr(tr_session*)::'lambda'()&>()()) std::__1::__invoke[abi:v160002]<tr_peerMgr::tr_peerMgr(tr_session*)::'lambda'()&>(tr_peerMgr::tr_peerMgr(tr_session*)::'lambda'()&) at /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/__functional/invoke.h:394
#14 0x0000000102bfe8dc in void std::__1::__invoke_void_return_wrapper<void, true>::__call<tr_peerMgr::tr_peerMgr(tr_session*)::'lambda'()&>(tr_peerMgr::tr_peerMgr(tr_session*)::'lambda'()&) at /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/__functional/invoke.h:487
#15 0x0000000102bfe870 in std::__1::__function::__alloc_func<tr_peerMgr::tr_peerMgr(tr_session*)::'lambda'(), std::__1::allocator<tr_peerMgr::tr_peerMgr(tr_session*)::'lambda'()>, void ()>::operator()[abi:v160002]() at /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/__functional/function.h:185
#16 0x0000000102bfa778 in std::__1::__function::__func<tr_peerMgr::tr_peerMgr(tr_session*)::'lambda'(), std::__1::allocator<tr_peerMgr::tr_peerMgr(tr_session*)::'lambda'()>, void ()>::operator()() at /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/__functional/function.h:356
#17 0x0000000102b81754 in std::__1::__function::__value_func<void ()>::operator()[abi:v160002]() const at /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/__functional/function.h:510
#18 0x0000000102b7ff90 in std::__1::function<void ()>::operator()() const at /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/__functional/function.h:1156
#19 0x00000001030e0ab0 in libtransmission::EvTimer::handleTimer() at /Users/User/Developer/transmission/libtransmission/timer-ev.cc:145
#20 0x00000001030dfd40 in libtransmission::EvTimer::onTimer(int, short, void*) at /Users/User/Developer/transmission/libtransmission/timer-ev.cc:137
#21 0x0000000103286868 in event_persist_closure at /Users/User/Developer/transmission/third-party/libevent/event.c:1623
#22 0x000000010328255c in event_process_active_single_queue at /Users/User/Developer/transmission/third-party/libevent/event.c:1682
#23 0x00000001032621d8 in event_process_active at /Users/User/Developer/transmission/third-party/libevent/event.c:1783
#24 0x000000010325b600 in event_base_loop at /Users/User/Developer/transmission/third-party/libevent/event.c:2006
#25 0x0000000102b7e790 in tr_session_thread_impl::sessionThreadFunc(event_base*) at /Users/User/Developer/transmission/libtransmission/session-thread.cc:245
#26 0x0000000102b83980 in decltype(*std::declval<tr_session_thread_impl*>().*std::declval<void (tr_session_thread_impl::*)(event_base*)>()(std::declval<event_base*>())) std::__1::__invoke[abi:v160002]<void (tr_session_thread_impl::*)(event_base*), tr_session_thread_impl*, event_base*, void>(void (tr_session_thread_impl::*&&)(event_base*), tr_session_thread_impl*&&, event_base*&&) at /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/__functional/invoke.h:359
#27 0x0000000102b838ac in void std::__1::__thread_execute[abi:v160002]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (tr_session_thread_impl::*)(event_base*), tr_session_thread_impl*, event_base*, 2ul, 3ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (tr_session_thread_impl::*)(event_base*), tr_session_thread_impl*, event_base*>&, std::__1::__tuple_indices<2ul, 3ul>) at /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/thread:288
#28 0x0000000102b82770 in void* std::__1::__thread_proxy[abi:v160002]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (tr_session_thread_impl::*)(event_base*), tr_session_thread_impl*, event_base*>>(void*) at /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/thread:299
#29 0x0000000104b61628 in _pthread_start ()
The text was updated successfully, but these errors were encountered:
Using UndefinedBehaviorSanitizer, we systematically find runtime errors of the like:
It's happening on that line:
libutp/utp_internal.cpp
Line 2564 in 2b364cb
It's not a crash, but it's undefined behavior.
The Xcode documentation to attempt to resolve that is at https://developer.apple.com/documentation/xcode/misaligned-pointer.
The text was updated successfully, but these errors were encountered: