Bug 25719 - FieldInfo.GetRawConstantValue() crashes runtime in dynamic assemblies
Summary: FieldInfo.GetRawConstantValue() crashes runtime in dynamic assemblies
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Reflection ()
Version: 3.12.0
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-05 13:39 UTC by Eirik Tsarpalis
Modified: 2015-02-24 19:07 UTC (History)
2 users (show)

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


Attachments
F# code reproducing the issue (602 bytes, application/octet-stream)
2015-01-05 13:39 UTC, Eirik Tsarpalis
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Eirik Tsarpalis 2015-01-05 13:39:06 UTC
Created attachment 9242 [details]
F# code reproducing the issue

Mono runtime crashing consistently whenever calling FieldInfo.GetRawConstantValue() in const fields of dynamic types.
Comment 1 Zoltan Varga 2015-01-06 13:00:13 UTC
Fixed in mono master a9a87caa20693d01cea7a011670b8ca917c55978.
Comment 2 Eirik Tsarpalis 2015-02-24 19:01:48 UTC
Hi, the problem seems to persist in 3.12.

Mono JIT compiler version 3.12.0 ((detached/de2f33f Mon Feb  2 14:42:07 EST 2015)

* Assertion: should not be reached at icall.c:1902

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoField.GetRawConstantValue (System.Reflection.MonoField) <0xffffffff>
  at <StartupCode$repro>.$Repro.main@ () <0x00131>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	0   mono                                0x0017ee96 mono_handle_native_sigsegv + 342
	1   mono                                0x001d22ca sigabrt_signal_handler + 122
	2   libsystem_platform.dylib            0x988c103b _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   libsystem_c.dylib                   0x97315eee abort + 156
	5   mono                                0x003206b1 monoeg_log_default_handler + 129
	6   mono                                0x003207ab monoeg_assertion_message + 107
	7   mono                                0x0020b562 ves_icall_MonoField_GetRawConstantValue + 450
	8   ???                                 0x00597210 0x0 + 5861904
	9   ???                                 0x00593f12 0x0 + 5848850
	10  ???                                 0x00593ffe 0x0 + 5849086
	11  mono                                0x000d468f mono_jit_runtime_invoke + 751
	12  mono                                0x002937ff mono_runtime_invoke + 127
	13  mono                                0x00299641 mono_runtime_exec_main + 401
	14  mono                                0x002993ea mono_runtime_run_main + 682
	15  mono                                0x00149dbd mono_jit_exec + 93
	16  mono                                0x0014c090 mono_main + 7904
	17  mono                                0x000c6fa0 main + 768
	18  mono                                0x000c6c95 start + 53
Comment 3 Zoltan Varga 2015-02-24 19:03:45 UTC
That fix didn't make 3.12.
Comment 4 Eirik Tsarpalis 2015-02-24 19:07:29 UTC
Whoops, I guess I should try with one of the snapshot builds then.