[Mono-dev] SIGSEGV from bad generic type (bug 30085)
curylod at asme.org
Thu May 28 21:22:55 UTC 2015
I don’t think the actual bug has been reported twice, just Alexander already picked it up (maybe it’s affecting him, too). My colleague opened the bug report because we updated the mono framework we are certifying against to 3.12.1 and this issue appeared. He said we didn’t have issues with mono 3.4.0-5, although I haven’t independently verified that.
We have several cases where we have runtime crashes with SIGSEGV, and I’m trying to eliminate as many as I can. This seems like low hanging fruit since it’s so easily reproducible.
On May 28, 2015, at 5:04 PM, Miguel de Icaza <miguel at xamarin.com> wrote:
> Updated the bug report.
> Not sure why this has all of a sudden become an issue that was reported twice. Do you happen to know?
> On Thu, May 28, 2015 at 4:29 PM, Miguel de Icaza <miguel at xamarin.com> wrote:
> There is already a similar pull request.
> The issue is that returning NULL there has a slightly different meaning. So the complete fix is to restructure some of the code.
> On Thu, May 28, 2015 at 4:25 PM, David Curylo <curylod at asme.org> wrote:
> Found the issue and created PR 1839: https://github.com/mono/mono/pull/1839
> Please take a look and let me know if you have any concerns with the fix.
> On May 28, 2015, at 3:51 PM, David Curylo <curylod at asme.org> wrote:
>> I’m researching an issue reported by a colleague of mine. The error is rather serious as the use of a bad type name causes a native SIGSEGV and kills the runtime, when it really should just return a null because it can’t find the type. This code reproduces the issue:
>> System.Type.GetType("System.Nullable`1[[System.Int32, mscorlibBAD]]")
>> Since I see there is some work going on with System.Type, I was hopeful that mono master would no longer have this issue, but it still exists. This is what I’m getting in the thread dump when this occurs and the root cause appears to be somewhere in _mono_reflection_get_type_from_info. Any ideas what may be the root cause here?
>> Thread 1 (Thread 0x7f28ae81f7c0 (LWP 76562)):
>> #0 0x00007f28adcf7ee9 in __libc_waitpid (pid=pid at entry=76565, stat_loc=stat_loc at entry=0x7f28ae82919c, options=options at entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
>> #1 0x00000000004a2015 in mono_handle_native_sigsegv (signal=signal at entry=11, ctx=ctx at entry=0x7f28ae829ac0, info=info at entry=0x7f28ae829bf0) at mini-exceptions.c:2226
>> #2 0x00000000004f782e in mono_arch_handle_altstack_exception (sigctx=sigctx at entry=0x7f28ae829ac0, siginfo=siginfo at entry=0x7f28ae829bf0, fault_addr=<optimized out>, stack_ovf=stack_ovf at entry=0) at exceptions-amd64.c:858
>> #3 0x0000000000422f28 in mono_sigsegv_signal_handler (_dummy=11, _info=0x7f28ae829bf0, context=0x7f28ae829ac0) at mini-runtime.c:2526
>> #4 <signal handler called>
>> #5 0x00000000005bcb91 in _mono_reflection_get_type_from_info (info=0x1efb270, image=image at entry=0x0, ignorecase=ignorecase at entry=0) at reflection.c:7450
>> #6 0x00000000005bc750 in mono_reflection_get_type_internal (rootimage=rootimage at entry=0x0, image=<optimized out>, info=info at entry=0x7fff8b7388e0, ignorecase=ignorecase at entry=0) at reflection.c:7565
>> #7 0x00000000005bc9b3 in mono_reflection_get_type_with_rootimage (rootimage=rootimage at entry=0x0, image=image at entry=0x0, info=info at entry=0x7fff8b7388e0, ignorecase=ignorecase at entry=0, type_resolve=type_resolve at entry=0x7fff8b7388d4) at reflection.c:7661
>> #8 0x00000000005bcb00 in mono_reflection_get_type (image=image at entry=0x0, info=info at entry=0x7fff8b7388e0, ignorecase=ignorecase at entry=0, type_resolve=type_resolve at entry=0x7fff8b7388d4) at reflection.c:7613
>> #9 0x000000000053456d in type_from_name (ignoreCase=<optimized out>, str=0x1ef44f0 "System.Nullable`1[[System.Int32, mscorlibBAD]]") at icall.c:1286
>> #10 ves_icall_type_from_name (name=0x7f28ae7981b0, throwOnError=<optimized out>, ignoreCase=<optimized out>) at icall.c:1322
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list