Xcode 11.2.1 线程清理程序 abort_with_payload
Xcode 11.2.1 Thread Sanitizer abort_with_payload
我正在尝试在 Xcode 11.2.1 中使用 Thread Sanitizer,但是每当应用程序启动时(只是 Xcode 模板中的一个视图应用程序,没有添加任何内容)它会点击 __abort_with_payload:
libsystem_kernel.dylib`__abort_with_payload:
0x7fff51b73be0 <+0>: movl [=12=]x2000209, %eax ; imm = 0x2000209
0x7fff51b73be5 <+5>: movq %rcx, %r10
0x7fff51b73be8 <+8>: syscall
-> 0x7fff51b73bea <+10>: jae 0x7fff51b73bf4 ; <+20>
0x7fff51b73bec <+12>: movq %rax, %rdi
0x7fff51b73bef <+15>: jmp 0x7fff51b54a89 ; cerror_nocancel
0x7fff51b73bf4 <+20>: retq
0x7fff51b73bf5 <+21>: nop
0x7fff51b73bf6 <+22>: nop
0x7fff51b73bf7 <+23>: nop
None 的 Apple 文档或其他人使用 Thread Sanitizer 的指南说你需要做的不仅仅是勾选方案设置中的框,但对我来说这不起作用:(
打印出 $arg5 得到
pthread_t was corrupted
听起来不太好!
这是在 Catalina 10.15.2 上使用 iPhone 11 Pro Max 模拟器
我也遇到了类似的问题,Thread Sanitizer
在方案设置中是 ON
,关闭它解决了我的问题。
看起来它已连接到此 tsan 提交
https://github.com/llvm/llvm-project/commit/f9a706a36ae5dcb87b0b6649d0c80e989400f48e
https://reviews.llvm.org/D71559
我非常需要 运行 thread sanitizer,所以
使用
构建了最新的 llvm
> mkdir workspace/
> git clone https://github.com/llvm/llvm-project.git
> cd llvm-project; mkdir build; cd build
>cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;libcxx;libcxxabi;libunwind;lldb;compiler-rt;lld;polly' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$HOME/llvm -DLLVM_ENABLE_DUMP=ON # not everything is needed though here
>ninja
并替换了
~/Library/Developer/CoreSimulator/Devices/C0E36E0C-C22A-426E-80B7-557164B2FBD3/data/Containers/Bundle/Application/D6D4D9DB-4C26-4FA0-8363-5CA03A47B6C0/Spotify.app/Frameworks/libclang_rt.tsan_iossim_dynamic.dylib
使用来自
的新建库
/workspace/llvm-project/build/lib/clang/10.0.0/lib/darwin/libclang_rt.tsan_iossim_dynamic.dylib # 10.0.0 is the previos version some artifact of my bulding, it had the fixed revision ^
该应用程序似乎在模拟器中加载并且不会因
而崩溃
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00007fff523d5bea __abort_with_payload + 10
1 libsystem_kernel.dylib 0x00007fff523d74f3 abort_with_payload_wrapper_internal + 80
2 libsystem_kernel.dylib 0x00007fff523d74a3 abort_with_reason + 19
3 libsystem_pthread.dylib 0x00007fff52469974 pthread_self.cold.1 + 24
4 libsystem_pthread.dylib 0x00007fff52462fe3 pthread_self + 34
5 libclang_rt.tsan_iossim_dynamic.dylib 0x000000013b59816b __tsan::cur_thread() + 11
6 libclang_rt.tsan_iossim_dynamic.dylib 0x000000013b56d985 wrap_sysctlbyname + 37
7 libsystem_sim_kernel.dylib 0x00007fff52470331 assert_simulator_supported_host + 44
8 libSystem.B.dylib 0x00007fff4ff167c1 libSystem_initializer + 78
9 dyld_sim 0x000000013b3a73a7 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 517
还有!我的应用程序似乎显示了第一个屏幕,但之后就冻结了,所以不确定它是否完全可用。
希望对您有所帮助
此问题已在 Xcode 11.3.1 中得到解决,感谢 vandzi 指出!
我正在尝试在 Xcode 11.2.1 中使用 Thread Sanitizer,但是每当应用程序启动时(只是 Xcode 模板中的一个视图应用程序,没有添加任何内容)它会点击 __abort_with_payload:
libsystem_kernel.dylib`__abort_with_payload:
0x7fff51b73be0 <+0>: movl [=12=]x2000209, %eax ; imm = 0x2000209
0x7fff51b73be5 <+5>: movq %rcx, %r10
0x7fff51b73be8 <+8>: syscall
-> 0x7fff51b73bea <+10>: jae 0x7fff51b73bf4 ; <+20>
0x7fff51b73bec <+12>: movq %rax, %rdi
0x7fff51b73bef <+15>: jmp 0x7fff51b54a89 ; cerror_nocancel
0x7fff51b73bf4 <+20>: retq
0x7fff51b73bf5 <+21>: nop
0x7fff51b73bf6 <+22>: nop
0x7fff51b73bf7 <+23>: nop
None 的 Apple 文档或其他人使用 Thread Sanitizer 的指南说你需要做的不仅仅是勾选方案设置中的框,但对我来说这不起作用:(
打印出 $arg5 得到
pthread_t was corrupted
听起来不太好!
这是在 Catalina 10.15.2 上使用 iPhone 11 Pro Max 模拟器
我也遇到了类似的问题,Thread Sanitizer
在方案设置中是 ON
,关闭它解决了我的问题。
看起来它已连接到此 tsan 提交 https://github.com/llvm/llvm-project/commit/f9a706a36ae5dcb87b0b6649d0c80e989400f48e
https://reviews.llvm.org/D71559
我非常需要 运行 thread sanitizer,所以 使用
构建了最新的 llvm> mkdir workspace/
> git clone https://github.com/llvm/llvm-project.git
> cd llvm-project; mkdir build; cd build
>cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;libcxx;libcxxabi;libunwind;lldb;compiler-rt;lld;polly' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$HOME/llvm -DLLVM_ENABLE_DUMP=ON # not everything is needed though here
>ninja
并替换了
~/Library/Developer/CoreSimulator/Devices/C0E36E0C-C22A-426E-80B7-557164B2FBD3/data/Containers/Bundle/Application/D6D4D9DB-4C26-4FA0-8363-5CA03A47B6C0/Spotify.app/Frameworks/libclang_rt.tsan_iossim_dynamic.dylib
使用来自
的新建库/workspace/llvm-project/build/lib/clang/10.0.0/lib/darwin/libclang_rt.tsan_iossim_dynamic.dylib # 10.0.0 is the previos version some artifact of my bulding, it had the fixed revision ^
该应用程序似乎在模拟器中加载并且不会因
而崩溃Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00007fff523d5bea __abort_with_payload + 10
1 libsystem_kernel.dylib 0x00007fff523d74f3 abort_with_payload_wrapper_internal + 80
2 libsystem_kernel.dylib 0x00007fff523d74a3 abort_with_reason + 19
3 libsystem_pthread.dylib 0x00007fff52469974 pthread_self.cold.1 + 24
4 libsystem_pthread.dylib 0x00007fff52462fe3 pthread_self + 34
5 libclang_rt.tsan_iossim_dynamic.dylib 0x000000013b59816b __tsan::cur_thread() + 11
6 libclang_rt.tsan_iossim_dynamic.dylib 0x000000013b56d985 wrap_sysctlbyname + 37
7 libsystem_sim_kernel.dylib 0x00007fff52470331 assert_simulator_supported_host + 44
8 libSystem.B.dylib 0x00007fff4ff167c1 libSystem_initializer + 78
9 dyld_sim 0x000000013b3a73a7 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 517
还有!我的应用程序似乎显示了第一个屏幕,但之后就冻结了,所以不确定它是否完全可用。
希望对您有所帮助
此问题已在 Xcode 11.3.1 中得到解决,感谢 vandzi 指出!