From 08038cbf3b982239d9ed74f6181576a7caf308b4 Mon Sep 17 00:00:00 2001 From: Mark Probst Date: Fri, 19 Dec 2008 12:42:38 +0000 Subject: 2008-12-19 Mark Probst * mini-exceptions.c (get_exception_catch_class): Removed overly strict assertion. 2008-12-19 Mark Probst * bug-459285.2.cs: New generic sharing test. * Makefile.am: Test added. svn path=/branches/mono-2-2/mono/; revision=121840 --- mono/mini/ChangeLog | 5 +++++ mono/mini/mini-exceptions.c | 2 -- mono/tests/ChangeLog | 6 ++++++ mono/tests/Makefile.am | 3 ++- mono/tests/bug-459285.2.cs | 34 ++++++++++++++++++++++++++++++++++ 5 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 mono/tests/bug-459285.2.cs diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog index cd0ac1e59de..78946798890 100644 --- a/mono/mini/ChangeLog +++ b/mono/mini/ChangeLog @@ -1,3 +1,8 @@ +2008-12-19 Mark Probst + + * mini-exceptions.c (get_exception_catch_class): Removed overly + strict assertion. + 2008-12-19 Mark Probst Backport of r121292. diff --git a/mono/mini/mini-exceptions.c b/mono/mini/mini-exceptions.c index e1325e6978e..4079c578a7d 100644 --- a/mono/mini/mini-exceptions.c +++ b/mono/mini/mini-exceptions.c @@ -766,8 +766,6 @@ get_exception_catch_class (MonoJitExceptionInfo *ei, MonoJitInfo *ji, MonoContex if (class->generic_class) g_assert (class->generic_class->container_class == method_container_class); - else - g_assert (!class->generic_container && class == method_container_class); /* FIXME: we shouldn't inflate but instead put the type in the rgctx and fetch it from there. It diff --git a/mono/tests/ChangeLog b/mono/tests/ChangeLog index 183c44d10d2..5bd5e2e1b18 100644 --- a/mono/tests/ChangeLog +++ b/mono/tests/ChangeLog @@ -1,3 +1,9 @@ +2008-12-19 Mark Probst + + * bug-459285.2.cs: New generic sharing test. + + * Makefile.am: Test added. + 2008-12-19 Mark Probst Backport of r121292. diff --git a/mono/tests/Makefile.am b/mono/tests/Makefile.am index 502165a9b10..c5b046f3476 100644 --- a/mono/tests/Makefile.am +++ b/mono/tests/Makefile.am @@ -290,6 +290,7 @@ BASE_TEST_CS_SRC= \ generic-typedef.2.cs \ generic-marshalbyref.2.cs \ bug-431413.2.cs \ + bug-459285.2.cs \ generic-virtual-invoke.2.cs \ recursive-generics.2.cs \ bug-80392.2.cs \ @@ -719,7 +720,7 @@ test-generic-sharing : generics-sharing.2.exe shared-generic-methods.2.exe \ generic-synchronized.2.exe generic-delegate-ctor.2.exe \ generic-constrained.2.exe bug-431413.2.exe \ generic-virtual-invoke.2.exe generic-typedef.2.exe \ - generic-marshalbyref.2.exe + generic-marshalbyref.2.exe bug-459285.2.exe @for fn in $+ ; do \ echo "Testing $$fn ..."; \ MONO_GENERIC_SHARING=all $(RUNTIME) -O=gshared $$fn > $$fn.stdout || exit 1; \ diff --git a/mono/tests/bug-459285.2.cs b/mono/tests/bug-459285.2.cs new file mode 100644 index 00000000000..0439099d1b5 --- /dev/null +++ b/mono/tests/bug-459285.2.cs @@ -0,0 +1,34 @@ +using System; + +public class Foo +{ + public void DoSomething() + { + try + { + throw new Exception("Error"); + } + catch + { + throw; + } + } +} + +public class Bar: Foo +{ +} + + +public class MainClass +{ + public static int Main() + { + try { + new Bar().DoSomething(); + } catch { + return 0; + } + return 1; + } +} -- cgit v1.2.3