jimingham wrote: > Looks like this patch is making UBSAN very unhappy: > https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake-sanitized/3799 > > Bunch of tests are failing with: > > ``` > 11:49:38 > /Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/source/Target/Process.cpp:3919:52: > runtime error: load of value 190, which is not a valid value for type 'bool' > 11:49:38 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior > /Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/source/Target/Process.cpp:3919:52 > > 11:49:38 PLEASE submit a bug report to > https://github.com/llvm/llvm-project/issues/ and include the crash backtrace > and instructions to reproduce the bug. > 11:49:38 Stack dump without symbol names (ensure you have llvm-symbolizer in > your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): > 11:49:38 0 liblldb.23.0.99git.dylib 0x000000013b11b2b8 > llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 268 > 11:49:38 1 liblldb.23.0.99git.dylib 0x000000013b115d08 > llvm::sys::RunSignalHandlers() + 136 > 11:49:38 2 liblldb.23.0.99git.dylib 0x000000013b11d440 > SignalHandler(int, __siginfo*, void*) + 1140 > 11:49:38 3 libsystem_platform.dylib 0x000000019de27744 _sigtramp > + 56 > 11:49:38 4 libsystem_pthread.dylib 0x000000019de1d888 > pthread_kill + 296 > 11:49:38 5 libsystem_c.dylib 0x000000019dd22850 abort + 124 > 11:49:38 6 libclang_rt.asan_osx_dynamic.dylib 0x0000000100abc294 > __sanitizer::Atexit(void (*)()) + 0 > 11:49:38 7 libclang_rt.asan_osx_dynamic.dylib 0x0000000100abb7c4 > __sanitizer::Die() + 104 > 11:49:38 8 libclang_rt.asan_osx_dynamic.dylib 0x0000000100ad3fdc > __ubsan_handle_implicit_conversion + 0 > 11:49:38 9 liblldb.23.0.99git.dylib 0x000000013a1dd900 > std::__1::__function::__func<lldb_private::Process::PrivateStateThread::StartupThread()::$_0, > > std::__1::allocator<lldb_private::Process::PrivateStateThread::StartupThread()::$_0>, > void* ()>::operator()() + 124 > ``` > > Could you take a look? > > It's pointing to following line: > > ``` > bool Process::PrivateStateThread::StartupThread() { > llvm::Expected<HostThread> private_state_thread = > ThreadLauncher::LaunchThread( > m_thread_name, > [this] { > return m_process.RunPrivateStateThread(m_is_secondary_thread); > <<<<<<< UBSAN points here > }, > 8 * 1024 * 1024); > ``` > > It's most likely because `m_is_secondary_thread` isn't being initialised > anywhere. So we're reading garbage
Fixed in: https://github.com/llvm/llvm-project/pull/180255 https://github.com/llvm/llvm-project/pull/179799 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
