[Mono-bugs] [Bug 485377] New: Regression in Convert.ChangeType()
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Mar 13 23:48:30 EDT 2009
https://bugzilla.novell.com/show_bug.cgi?id=485377
Summary: Regression in Convert.ChangeType()
Classification: Mono
Product: Mono: Runtime
Version: SVN
Platform: x86-64
OS/Version: openSUSE 11.1
Status: NEW
Severity: Normal
Priority: P5 - None
Component: JIT
AssignedTo: lupus at novell.com
ReportedBy: jpryor at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
There is a regression in Systme.Convert.ChangeType(). It used to throw an
InvalidCastException when converting to an unsupported type. Now, it
segfaults.
Source:
using System;
struct Foo {}
class Test
{
public static void Main ()
{
Foo f = (Foo) Convert.ChangeType ("some-random-string", typeof (Foo));
}
}
Execute:
gmcs foo.cs
mono foo.exe
Expected Results (as per Mono 2.0.1, with openSUSE 11.1):
Unhandled Exception: System.InvalidCastException: Unknown target convertion
type from System.String to Foo
at System.Convert.ToType (System.Object value, System.Type conversionType,
IFormatProvider provider) [0x00000]
at System.Convert.ChangeType (System.Object value, System.Type
conversionType) [0x00000]
at Test.Main () [0x00000]
Actual Results:
Segmentation fault
..which isn't very useful. So run within gdb, and the `t a a bt' output:
Program received signal SIGSEGV, Segmentation fault.
0x0000000040012ff7 in ?? ()
(gdb) t a a bt
Thread 4 (Thread 0x7ffff5c70950 (LWP 4584)):
#0 0x00007ffff72f9c71 in sem_wait () from /lib64/libpthread.so.0
#1 0x0000000000534a7a in finalizer_thread (unused=<value optimized out>)
at gc.c:1077
#2 0x0000000000518153 in start_wrapper (data=<value optimized out>)
at threads.c:624
#3 0x0000000000574c3b in thread_start_routine (args=0x8ed680) at threads.c:286
#4 0x000000000058df3e in GC_start_routine (arg=0x7ffff7e8be70)
at pthread_support.c:1382
#5 0x00007ffff72f4070 in start_thread () from /lib64/libpthread.so.0
#6 0x00007ffff6e1110d in clone () from /lib64/libc.so.6
#7 0x0000000000000000 in ?? ()
Thread 3 (Thread 0x7ffff7e2a950 (LWP 4583)):
#0 0x00007ffff72fb1b1 in nanosleep () from /lib64/libpthread.so.0
#1 0x000000000057c002 in collection_thread (unused=<value optimized out>)
at collection.c:34
#2 0x00007ffff72f4070 in start_thread () from /lib64/libpthread.so.0
#3 0x00007ffff6e1110d in clone () from /lib64/libc.so.6
#4 0x0000000000000000 in ?? ()
Thread 2 (Thread 0x7ffff6b0d950 (LWP 4582)):
#0 0x00007ffff72f7d59 in pthread_cond_wait@@GLIBC_2.3.2 ()
from /lib64/libpthread.so.0
#1 0x000000000058e2ab in GC_wait_marker () at pthread_support.c:1777
#2 0x00000000005939f0 in GC_help_marker (my_mark_no=2) at mark.c:1116
#3 0x000000000058cff8 in GC_mark_thread (id=0x0) at pthread_support.c:548
#4 0x00007ffff72f4070 in start_thread () from /lib64/libpthread.so.0
#5 0x00007ffff6e1110d in clone () from /lib64/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 1 (LWP 4581):
#0 0x0000000040012ff7 in ?? ()
Cannot access memory at address 0x7fffff808f90
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list