Skip to content

Instantly share code, notes, and snippets.

@kotlarmilos
Last active January 26, 2023 15:45
Show Gist options
  • Save kotlarmilos/3ebf4d91f627a2e1963ff8a083a05b3d to your computer and use it in GitHub Desktop.
Save kotlarmilos/3ebf4d91f627a2e1963ff8a083a05b3d to your computer and use it in GitHub Desktop.
Dedup in HelloiOS

Stack trace:

* thread #3, name = 'tid_e03', queue = 'com.apple.root.default-qos', stop reason = signal SIGSEGV
    frame #0: 0x000000010316390c HelloiOS`System_Threading_ManualResetEventSlim_Wait_int_System_Threading_CancellationToken + 492
    frame #1: 0x0000000103164670 HelloiOS`System_Threading_Tasks_Task_SpinThenBlockingWait_int_System_Threading_CancellationToken + 240
    frame #2: 0x0000000103488a5c HelloiOS`corlib_System_Threading_Tasks_Task_InternalWaitCore_int_System_Threading_CancellationToken + 380
    frame #3: 0x000000010349dc40 HelloiOS`corlib_System_Runtime_CompilerServices_TaskAwaiter_ValidateEnd_System_Threading_Tasks_Task + 96
    frame #4: 0x000000010349dbb4 HelloiOS`corlib_System_Runtime_CompilerServices_TaskAwaiter_GetResult + 36
    frame #5: 0x00000001032aaa0c HelloiOS`Program_Program__Main_string__ at <unknown>:0 [opt]
    frame #6: 0x000000010323f298 HelloiOS`wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 296
  * frame #7: 0x0000000102fbb624 HelloiOS`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, exc=<unavailable>, error=0x000000016d17a370) at mini-runtime.c:3501:3 [opt]
    frame #8: 0x0000000102ef0ec0 HelloiOS`mono_runtime_invoke_checked [inlined] do_runtime_invoke(method=0x0000000105810908, obj=0x0000000000000000, params=0x000000016d17a310, exc=0x0000000000000000, error=0x000000016d17a370) at object.c:2545:11 [opt]
    frame #9: 0x0000000102ef0e84 HelloiOS`mono_runtime_invoke_checked(method=0x0000000105810908, obj=0x0000000000000000, params=0x000000016d17a310, error=0x000000016d17a370) at object.c:2761:9 [opt]
    frame #10: 0x0000000102ef82f4 HelloiOS`mono_runtime_exec_main_checked [inlined] do_exec_main_checked(method=0x0000000105810908, args=<unavailable>, error=0x000000016d17a370) at object.c:0 [opt]
    frame #11: 0x0000000102ef82b8 HelloiOS`mono_runtime_exec_main_checked(method=0x0000000105810908, args=<unavailable>, error=0x000000016d17a370) at object.c:4744:9 [opt]
    frame #12: 0x0000000102ef83a0 HelloiOS`mono_runtime_run_main_checked(method=<unavailable>, argc=<unavailable>, argv=<unavailable>, error=<unavailable>) at object.c:4308:9 [opt] [artificial]
    frame #13: 0x0000000102fc17b4 HelloiOS`mono_jit_exec at driver.c:1369:13 [opt]
    frame #14: 0x0000000102fc17a4 HelloiOS`mono_jit_exec(domain=<unavailable>, assembly=<unavailable>, argc=1, argv=0x000000016d17a9e8) at driver.c:1314:7 [opt]
    frame #15: 0x0000000103148f14 HelloiOS`mono_ios_runtime_init at runtime.m:403:11
    frame #16: 0x00000001031481b0 HelloiOS`__29-[ViewController viewDidLoad]_block_invoke(.block_descriptor=0x00000001038d33b0) at main.m:49:9
    frame #17: 0x00000001046ec5a8 libdispatch.dylib`_dispatch_call_block_and_release + 32
    frame #18: 0x00000001046ee05c libdispatch.dylib`_dispatch_client_callout + 20
    frame #19: 0x00000001046f0b94 libdispatch.dylib`_dispatch_queue_override_invoke + 1052
    frame #20: 0x0000000104702478 libdispatch.dylib`_dispatch_root_queue_drain + 408
    frame #21: 0x0000000104702e74 libdispatch.dylib`_dispatch_worker_thread2 + 196
    frame #22: 0x00000001dacb1dbc libsystem_pthread.dylib`_pthread_wqthread + 228

Dedup assembly symbols:

               U ___gxx_personality_v0
0000000000000770 b _aotconst_aot_module
0000000000000780 b _aotconst_gc_card_table_addr
0000000000000778 b _aotconst_jit_icall_mini_llvm_init_method
00000000000006a0 s _assembly_guid
00000000000006c8 s _assembly_name
0000000000000000 T _gc.safepoint_poll
0000000000000370 t _mono_aot_aot_instances_eh_frame
0000000000000028 T _mono_aot_aot_instances_icall_cold_wrapper_261
0000000000000324 T _mono_aot_aot_instances_init_aotconst
0000000000000038 T _mono_aot_aot_instances_init_method
000000000000008c T _mono_aot_aot_instances_init_method_gshared_mrgctx
00000000000000e0 T _mono_aot_aot_instances_init_method_gshared_this
0000000000000134 T _mono_aot_aot_instances_init_method_gshared_vtable
                U _mono_aot_aot_instancesglobals
                U _mono_aot_aot_instancesjit_got
                U _mono_aot_aot_instancesmethod_addresses
                U _mono_aot_aot_instancesplt
                U _mono_aot_aot_instancesplt_end
                U _mono_aot_aot_instancesunbox_trampoline_addresses
                U _mono_aot_aot_instancesunbox_trampolines
                U _mono_aot_aot_instancesunbox_trampolines_end
                U _mono_aot_aot_instancesunwind_info
0000000000000450 d _mono_aot_file_info
0000000000000690 D _mono_aot_module_aot_instances_info
0000000000000788 b _mono_inited
                U _mono_polling_required
                U _p_1_plt_aot_instances__jit_icall_mono_threads_state_poll_llvm
                U _p_2_plt_aot_instances__jit_icall_llvm_throw_corlib_exception_abs_trampoline_llvm
0000000000000698 s _runtime_version
0000000000000430 s lCPI6_0
0000000000000438 s lCPI7_0
0000000000000440 s lCPI8_0
0000000000000448 s lCPI9_0
0000000000000000 t ltmp0
0000000000000430 s ltmp1
0000000000000450 d ltmp2
0000000000000770 b ltmp3
0000000000000698 s ltmp4

Stack trace of resolving functions during the runtime:

2023-01-26 15:27:52.356680+0100 HelloiOS[16684:3883318] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
2023-01-26 15:27:52.433401+0100 HelloiOS[16684:3883527] assembly_preload_hook: System.Private.CoreLib (null) /private/var/containers/Bundle/Application/A525C139-593B-4D2B-8AE8-FEA554DFC955/HelloiOS.app
2023-01-26 15:27:52.436202+0100 HelloiOS[16684:3883527] Looking for aot data for assembly 'System.Private.CoreLib'.
2023-01-26 15:27:52.436270+0100 HelloiOS[16684:3883527] Loaded aot data for System.Private.CoreLib.
void System.OutOfMemoryException:.ctor (string)
2023-01-26 15:27:52.512700+0100 HelloiOS[16684:3883527] Looking for aot data for assembly 'aot-instances'.
2023-01-26 15:27:52.512768+0100 HelloiOS[16684:3883527] Loaded aot data for aot-instances.
Searching for (wrapper runtime-invoke) object:runtime_invoke_dynamic (intptr,intptr,intptr,intptr) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
void System.NullReferenceException:.ctor (string)
void System.StackOverflowException:.ctor (string)
Searching for (wrapper alloc) object:AllocSmall (intptr,intptr) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper alloc) object:AllocVector (intptr,intptr) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) object:__icall_wrapper___emul_lmul_ovf_un_oom (long,long) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) object:__icall_wrapper_(null) (object,intptr,intptr) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-managed) string:.ctor (char*) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for System.Runtime.Intrinsics.Scalar`1<byte>:ExtractMostSignificantBit (byte) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) string:FastAllocateString (int) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
2023-01-26 15:27:52.524675+0100 HelloiOS[16684:3883527] assembly_preload_hook: Program.dll (null) /private/var/containers/Bundle/Application/A525C139-593B-4D2B-8AE8-FEA554DFC955/HelloiOS.app
2023-01-26 15:27:52.525102+0100 HelloiOS[16684:3883527] Looking for aot data for assembly 'Program'.
2023-01-26 15:27:52.525168+0100 HelloiOS[16684:3883527] Loaded aot data for Program.
2023-01-26 15:27:52.525395+0100 HelloiOS[16684:3883527] assembly_preload_hook: System.Console (null) /private/var/containers/Bundle/Application/A525C139-593B-4D2B-8AE8-FEA554DFC955/HelloiOS.app
2023-01-26 15:27:52.525819+0100 HelloiOS[16684:3883527] Looking for aot data for assembly 'System.Console'.
2023-01-26 15:27:52.525873+0100 HelloiOS[16684:3883527] Loaded aot data for System.Console.
2023-01-26 15:27:52.532758+0100 HelloiOS[16684:3883527] Executable: Program.dll
Searching for System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start<Program/<Main>d__4> (Program/<Main>d__4&) with code module Program and metadata module System.Private.CoreLib
Searching for System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start<TStateMachine_GSHAREDVT> (TStateMachine_GSHAREDVT&) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper alloc) object:Alloc (intptr) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) Interop/Sys:SchedGetCpu () with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Threading.Thread:GetCurrentThread () with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) object:__icall_wrapper_mono_gsharedvt_constrained_call (intptr,intptr,intptr,intptr,intptr) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) object:__icall_wrapper_mono_ldftn (intptr) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper native-to-managed) Program:OnButtonClick () with code module Program and metadata module Program
Searching for (wrapper managed-to-native) Program:ios_register_button_click (*()) with code module Program and metadata module Program
Searching for (wrapper managed-to-native) Program:ios_set_text (string) with code module Program and metadata module Program
Searching for (wrapper managed-to-native) object:__icall_wrapper_(null) (object) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) object:__icall_wrapper_(null) (intptr) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for System.Threading.Tasks.Task`1<System.Threading.Tasks.VoidTaskResult>:.ctor (bool,System.Threading.Tasks.VoidTaskResult,System.Threading.Tasks.TaskCreationOptions,System.Threading.CancellationToken) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for System.Threading.Tasks.Task`1<System.Threading.Tasks.VoidTaskResult>:.cctor () with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for System.Threading.Tasks.TaskCache:CreateCacheableTask<System.Threading.Tasks.VoidTaskResult> (System.Threading.Tasks.VoidTaskResult) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) object:__icall_wrapper_ves_icall_object_new_specific (intptr) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Threading.Monitor:Exit (object) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Runtime.InteropServices.GCHandle:InternalAlloc (object,System.Runtime.InteropServices.GCHandleType) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.GC:get_ephemeron_tombstone () with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper native-to-managed) System.Diagnostics.Tracing.EventPipeEventProvider:Callback (byte*,int,byte,long,long,Interop/Advapi32/EVENT_FILTER_DESCRIPTOR*,void*) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Diagnostics.Tracing.EventPipeInternal:CreateProvider (string,intptr,intptr) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper stelemref) object:virt_stelemref_sealed_class (intptr,object) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Environment:get_TickCount64 () with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Environment:GetProcessorCount () with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) Interop/Sys:GetSystemTimeAsTicks () with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) Interop/Sys:LowLevelMonitor_Create () with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Array:GetLowerBoundInternal (System.Runtime.CompilerServices.ObjectHandleOnStack,int) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for System.ArgumentOutOfRangeException:ThrowIfNegative<int> (int,string) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Array:FastCopy (System.Runtime.CompilerServices.ObjectHandleOnStack,int,System.Runtime.CompilerServices.ObjectHandleOnStack,int,int) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Threading.Thread:InitInternal (System.Threading.Thread) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Threading.Thread:SetName_icall (System.Threading.Thread,char*,int) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Threading.Thread:GetState (System.Threading.Thread) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Threading.Thread:SetState (System.Threading.Thread,System.Threading.ThreadState) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Threading.Thread:StartInternal (System.Threading.Thread,int) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Runtime.InteropServices.GCHandle:InternalGet (intptr) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<System.Threading.Tasks.VoidTaskResult>:GetStateMachineBox<Program/<Main>d__4> (Program/<Main>d__4&,System.Threading.Tasks.Task`1<System.Threading.Tasks.VoidTaskResult>&) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<System.Threading.Tasks.VoidTaskResult>:GetStateMachineBox<Program/<Main>d__4> (Program/<Main>d__4&,System.Threading.Tasks.Task`1<System.Threading.Tasks.VoidTaskResult>&) with code module Program and metadata module System.Private.CoreLib
Searching for System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<System.Threading.Tasks.VoidTaskResult>:AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter> (System.Runtime.CompilerServices.TaskAwaiter&,System.Runtime.CompilerServices.IAsyncStateMachineBox) with code module Program and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) object:__icall_wrapper_mono_gc_alloc_obj (intptr,intptr) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for System.ArgumentOutOfRangeException:ThrowIfLessThan<int> (int,int,string) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Threading.Thread:YieldInternal () with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) Interop/Sys:LowLevelMonitor_Acquire (intptr) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for System.ArgumentOutOfRangeException:ThrowIfGreaterThan<int> (int,int,string) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) System.Environment:get_TickCount () with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) Interop/Sys:<LowLevelMonitor_TimedWait>g____PInvoke|67_0 (intptr,int) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for System.Array/EmptyArray`1<int>:.cctor () with code module aot-instances and metadata module System.Private.CoreLib
Searching for System.Array/EmptyArray`1<T_INT>:.cctor () with code module System.Private.CoreLib and metadata module System.Private.CoreLib
Searching for (wrapper managed-to-native) object:__icall_wrapper_mono_generic_class_init (intptr) with code module System.Private.CoreLib and metadata module System.Private.CoreLib
(lldb) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment