Skip to content

[mono] typeof(delegate*<...>) crashes the runtime #42917

@lambdageek

Description

@lambdageek

Description

Compile the following Gist (you may want to save it as src/mono/netcore/sample/HelloWorld) and run it

$ make
$ make run

Expected output see https://twitter.com/MStrehovsky/status/1311247635756412928/photo/2

Actual output:

unknown type 0x1b in mono_class_array_element_size

=================================================================
	Native Crash Reporting
=================================================================
Got a abrt while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

=================================================================
	Native stacktrace:
=================================================================
	0x10248fb44 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : dump_native_stacktrace
	0x10248faa1 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_dump_native_crash_info
	0x1023873fa - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_handle_native_crash
	0x10248f073 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : sigabrt_signal_handler
	0x7fff695685fd - /usr/lib/system/libsystem_platform.dylib : _sigtramp
	0x0 - Unknown
	0x7fff6943e808 - /usr/lib/system/libsystem_c.dylib : abort
	0x1027a55c2 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : monoeg_assert_abort
	0x1027593de - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_log_write_logfile
	0x1027547c1 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : structured_log_adapter
	0x1027a62fa - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : monoeg_g_logstr
	0x1027a5cdb - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : monoeg_g_logv_nofree
	0x1027a5c4b - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : monoeg_g_logv
	0x1027a5e6e - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : monoeg_g_log
	0x1025465b4 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_class_array_element_size
	0x10254e30c - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_class_layout_fields
	0x10254c54d - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_class_setup_fields
	0x10255474f - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : init_sizes_with_info
	0x10254c9a6 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_class_init_internal
	0x102546a20 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_ldtoken_checked
	0x1022cafc9 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_method_to_ir
	0x102274425 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mini_method_compile
	0x102278d2b - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_jit_compile_method_inner
	0x10227ee17 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_jit_compile_method_with_opt
	0x10227f15e - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_jit_compile_method_jit_only
	0x102281ebe - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_jit_runtime_invoke
	0x10260183a - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : do_runtime_invoke
	0x1025fbdb1 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_runtime_invoke_checked
	0x102606da5 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : do_exec_main_checked
	0x102605073 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_runtime_exec_main_checked
	0x1026050c6 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_runtime_run_main_checked
	0x102333170 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_jit_exec_internal
	0x102332f7d - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_jit_exec
	0x102337c3f - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : main_thread_handler
	0x10233611e - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : mono_main
	0x1023f6520 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : monovm_execute_assembly
	0x102490c72 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libcoreclr.dylib : coreclr_execute_assembly
	0x1022235e3 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libhostpolicy.dylib : _Z19run_app_for_contextRK20hostpolicy_context_tiPPKc
	0x1022246ee - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libhostpolicy.dylib : corehost_main
	0x1021b912b - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libhostfxr.dylib : _ZN10fx_muxer_t24handle_exec_host_commandERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERK19host_startup_info_tS8_RKNS0_13unordered_mapI13known_optionsNS0_6vectorIS6_NS4_IS6_EEEE18known_options_hashNS0_8equal_toISD_EENS4_INS0_4pairIKSD
	0x1021b82b1 - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libhostfxr.dylib : _ZN10fx_muxer_t7executeENSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiPPKcRK19host_startup_info_tPciPi
	0x1021b5caa - /Users/alklig/work/dotnet-runtime/runtime/artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/libhostfxr.dylib : hostfxr_main_startupinfo
	0x10217b783 - /Users/alklig/work/dotnet-runtime/runtime/src/mono/netcore/sample/HelloWorld/../../../../../artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/HelloWorld : _Z9exe_startiPPKc
	0x10217b9cf - /Users/alklig/work/dotnet-runtime/runtime/src/mono/netcore/sample/HelloWorld/../../../../../artifacts/bin/HelloWorld/x64/Release/osx-x64/publish/HelloWorld : main
	0x7fff6936fcc9 - /usr/lib/system/libdyld.dylib : start

=================================================================
	Telemetry Dumper:
=================================================================
Pkilling 0x123145332727808x from 0x4453203392x
Could not exec mono-hang-watchdog, expected on path '/Users/alklig/work/dotnet-runtime/runtime/artifacts/obj/mono/OSX.x64.Debug/out/etc/../bin/mono-hang-watchdog' (errno 2)
Entering thread summarizer pause from 0x4453203392x
Finished thread summarizer pause from 0x4453203392x.
Failed to create breadcrumb file (null)/crash_hash_0x0

Waiting for dumping threads to resume

=================================================================
	External Debugger Dump:
=================================================================

=================================================================
	Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x7fff694b733a):0x7fff694b732a  ff ff c3 90 90 90 b8 48 01 00 02 49 89 ca 0f 05  .......H...I....
0x7fff694b733a  73 08 48 89 c7 e9 e5 a2 ff ff c3 90 90 90 b8 53  s.H............S
0x7fff694b734a  00 00 02 49 89 ca 0f 05 73 08 48 89 c7 e9 cd a2  ...I....s.H.....
0x7fff694b735a  ff ff c3 90 90 90 b8 83 01 00 02 49 89 ca 0f 05  ...........I....

=================================================================
	Managed Stacktrace:
=================================================================
=================================================================
make: *** [run] Abort trap: 6

Configuration

OSX x64 release

Build with

$ ../build.sh -c Release -rc Debug -s mono+libs+libs.tests

Regression?

No, function pointers are new

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions