[Mono-bugs] [Bug 459285] New: Exception thrown in generic base classes causes runtime failure
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Dec 15 19:20:58 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=459285
Summary: Exception thrown in generic base classes causes runtime
failure
Product: Mono: Runtime
Version: SVN
Platform: x86-64
OS/Version: Linux
Status: NEW
Severity: Major
Priority: P5 - None
Component: generics
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: mono at e-tobi.net
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=260206)
--> (https://bugzilla.novell.com/attachment.cgi?id=260206)
The test case causing the runtime error
This simple test case will make the runtime fail (see the log below).
It only happens, if the exception is thrown in a generic base class and only if
the exception gets catched.
using System;
public class Foo<T>
{
public void DoSomething()
{
try
{
throw new Exception("Error");
}
catch
{
throw;
}
}
}
public class Bar: Foo<string>
{
}
public class MainClass
{
public static void Main()
{
new Bar().DoSomething();
}
}
And heres the runtime error caused by the above test case:
[mono-trunk] /tmp @ mono --debug ./testcase.exe
**
** ERROR:(mini-exceptions.c:770):get_exception_catch_class: assertion failed:
(!class->generic_container && class == method_container_class)
Stacktrace:
Native stacktrace:
mono [0x47dad0]
/lib/libpthread.so.0 [0x7f877db21a80]
/lib/libc.so.6(gsignal+0x35) [0x7f877d56eed5]
/lib/libc.so.6(abort+0x183) [0x7f877d5703f3]
/usr/lib/libglib-2.0.so.0(g_assertion_message+0x104) [0x7f877e19afe4]
/usr/lib/libglib-2.0.so.0 [0x7f877e19b482]
mono [0x47cb97]
mono [0x47cb05]
mono(mono_amd64_throw_exception+0x139) [0x4ae9b9]
[0x4187bb36]
Debug info from gdb:
[Thread debugging using libthread_db enabled]
[New Thread 0x7f877e7fa720 (LWP 32056)]
[New Thread 0x41c36950 (LWP 32058)]
[New Thread 0x409a7950 (LWP 32057)]
0x00007f877d609269 in syscall () from /lib/libc.so.6
3 Thread 0x409a7950 (LWP 32057) 0x00007f877db210e1 in nanosleep () from
/lib/libpthread.so.0
2 Thread 0x41c36950 (LWP 32058) 0x00007f877db1fbd1 in sem_wait () from
/lib/libpthread.so.0
1 Thread 0x7f877e7fa720 (LWP 32056) 0x00007f877d609269 in syscall () from
/lib/libc.so.6
Thread 3 (Thread 0x409a7950 (LWP 32057)):
#0 0x00007f877db210e1 in nanosleep () from /lib/libpthread.so.0
#1 0x0000000000556712 in collection_thread (unused=<value optimized out>) at
collection.c:34
#2 0x00007f877db19fc7 in start_thread () from /lib/libpthread.so.0
#3 0x00007f877d60c5ad in clone () from /lib/libc.so.6
#4 0x0000000000000000 in ?? ()
Thread 2 (Thread 0x41c36950 (LWP 32058)):
#0 0x00007f877db1fbd1 in sem_wait () from /lib/libpthread.so.0
#1 0x00000000005270da in finalizer_thread (unused=<value optimized out>) at
gc.c:928
#2 0x0000000000510673 in start_wrapper (data=<value optimized out>) at
threads.c:620
#3 0x000000000055884b in thread_start_routine (args=0x2162348) at
threads.c:279
#4 0x000000000056ea22 in GC_start_routine (arg=0x7f877e6a5e70) at
pthread_support.c:1382
#5 0x00007f877db19fc7 in start_thread () from /lib/libpthread.so.0
#6 0x00007f877d60c5ad in clone () from /lib/libc.so.6
#7 0x0000000000000000 in ?? ()
Thread 1 (Thread 0x7f877e7fa720 (LWP 32056)):
#0 0x00007f877d609269 in syscall () from /lib/libc.so.6
#1 0x000000000047dbd2 in mono_handle_native_sigsegv (signal=10, ctx=<value
optimized out>) at mini-exceptions.c:1406
#2 <signal handler called>
#3 0x00007f877d56eed5 in raise () from /lib/libc.so.6
#4 0x00007f877d5703f3 in abort () from /lib/libc.so.6
#5 0x00007f877e19afe4 in g_assertion_message () from /usr/lib/libglib-2.0.so.0
#6 0x00007f877e19b482 in g_assertion_message_expr () from
/usr/lib/libglib-2.0.so.0
#7 0x000000000047cb97 in mono_handle_exception_internal (ctx=0x7fff8681b590,
obj=0x7f877e647de0, original_ip=<value optimized out>, test_only=1,
out_filter_idx=0x7fff8681b63c)
at mini-exceptions.c:770
#8 0x000000000047cb05 in mono_handle_exception_internal (ctx=0x7fff8681b680,
obj=0x7f877e647de0, original_ip=0x404f84e4, test_only=0, out_filter_idx=0x0) at
mini-exceptions.c:863
#9 0x00000000004ae9b9 in mono_amd64_throw_exception (dummy1=<value optimized
out>, dummy2=<value optimized out>, dummy3=<value optimized out>, dummy4=<value
optimized out>,
dummy5=<value optimized out>, dummy6=<value optimized out>,
exc=0x7f877e647de0, rip=1078953188, rsp=140735450036128, rbx=0,
rbp=140735450036176, r12=34781600, r13=0,
r14=140219918208000, r15=0, rdi=140219917827552, rsi=140219917836152,
rax=140219917827552, rcx=1078952384, rdx=0, rethrow=0) at
exceptions-amd64.c:348
#10 0x000000004187bb36 in ?? ()
#11 0x00007f877e647de0 in ?? ()
#12 0x00000000404f84e4 in ?? ()
#13 0x00007fff8681b7a0 in ?? ()
#14 0x0000000000000000 in ?? ()
#0 0x00007f877d609269 in syscall () from /lib/libc.so.6
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list