Bug 41941 - Thread Abort Exceptions not caught in mono/tests test on bitcode
Summary: Thread Abort Exceptions not caught in mono/tests test on bitcode
Status: NEEDINFO
Alias: None
Product: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: 4.5.X
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Alexander Kyte
URL:
Depends on:
Blocks:
 
Reported: 2016-06-17 17:09 UTC by Alexander Kyte
Modified: 2017-09-06 17:57 UTC (History)
4 users (show)

See Also:
Tags: bitcode_mobile_static
Is this bug a regression?: ---
Last known good build:


Attachments

Description Alexander Kyte 2016-06-17 17:09:38 UTC
The following tests abort threads:


bug-561239.exe
block_guard_restore_aligment_on_exit.exe
async-exc-compilation.exe
finally_block_ending_in_dead_bb.exe

On bitcode, this results in the entire runtime coming to a screeching halt with the following stacktrace:


        0   mono                                0x000000010fd19fae mono_handle_native_sigsegv + 334
        1   mono                                0x000000010fe218f5 sigabrt_signal_handler + 165
        2   libsystem_platform.dylib            0x00007fff8aed0eaa _sigtramp + 26
        3   ???                                 0x0000000048617ab0 0x0 + 1214347952
        4   libsystem_c.dylib                   0x00007fff8f6926e7 abort + 129
        5   libc++abi.dylib                     0x00007fff91aedf81 __cxa_bad_cast + 0
        6   libc++abi.dylib                     0x00007fff91b13a47 _ZL26default_unexpected_handlerv + 0
        7   libobjc.A.dylib                     0x00007fff991d26c3 _ZL15_objc_terminatev + 124
        8   libc++abi.dylib                     0x00007fff91b1119e _ZSt11__terminatePFvvE + 8
        9   libc++abi.dylib                     0x00007fff91b10c12 _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception + 0
        10  mono                                0x000000010fd8ce96 mono_llvm_cpp_throw_exception + 38
        11  mono                                0x000000010fd1b0c9 throw_exception + 249
        12  mono                                0x000000010fd1afc7 mono_llvm_throw_exception + 23
        13  mono                                0x000000010fd14bd5 mono_llvm_raise_exception + 21
        14  mono                                0x000000010ff5b024 mono_raise_exception + 36
        15  mono                                0x000000010fe63b80 mono_error_raise_exception + 48
        16  mono                                0x000000010ff0c804 start_wrapper_internal + 1044
        17  mono                                0x000000010ff0c3e1 start_wrapper + 33
        18  mono                                0x00000001100508ef inner_start_thread + 575
        19  libsystem_pthread.dylib             0x00007fff9bc40c13 _pthread_body + 131
        20  libsystem_pthread.dylib             0x00007fff9bc40b90 _pthread_body + 0
        21  libsystem_pthread.dylib             0x00007fff9bc3e375 thread_start + 13
Comment 1 Andi McClure 2016-08-29 16:44:28 UTC
Note: This bug is not specifically about Thread.Abort (which is not supported on any current Bitcode platform anyway) but is a general problem with exception handling in bitcode.
Comment 2 Alexander Kyte 2016-08-29 16:50:43 UTC
This was due to issues with the EH backend in general. Only one landing pad per frame will be entered. These tests were failing for different proximal causes, but the root was this. Also it's worth noting that Thread.Abort isn't supported on WatchOS. Either way, I believe this to be fixed by the pending explicit protected region changes.
Comment 3 Ludovic Henry 2017-09-06 17:57:34 UTC
Alexander, is that fixed on latest Mono version?

Note You need to log in before you can comment on or make changes to this bug.