diff options
author | Mark Probst <mark.probst@gmail.com> | 2008-12-19 15:42:38 +0300 |
---|---|---|
committer | Mark Probst <mark.probst@gmail.com> | 2008-12-19 15:42:38 +0300 |
commit | 08038cbf3b982239d9ed74f6181576a7caf308b4 (patch) | |
tree | 1f23e4ed9a1b680969f63d73051520956ef06e40 | |
parent | 7e7c65d58f79155fd21775e9d59109b2f0d1e1dd (diff) |
2008-12-19 Mark Probst <mark.probst@gmail.com>mono-2-2-rc1
* mini-exceptions.c (get_exception_catch_class): Removed overly
strict assertion.
2008-12-19 Mark Probst <mark.probst@gmail.com>
* bug-459285.2.cs: New generic sharing test.
* Makefile.am: Test added.
svn path=/branches/mono-2-2/mono/; revision=121840
-rw-r--r-- | mono/mini/ChangeLog | 5 | ||||
-rw-r--r-- | mono/mini/mini-exceptions.c | 2 | ||||
-rw-r--r-- | mono/tests/ChangeLog | 6 | ||||
-rw-r--r-- | mono/tests/Makefile.am | 3 | ||||
-rw-r--r-- | mono/tests/bug-459285.2.cs | 34 |
5 files changed, 47 insertions, 3 deletions
diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog index cd0ac1e59de..78946798890 100644 --- a/mono/mini/ChangeLog +++ b/mono/mini/ChangeLog @@ -1,5 +1,10 @@ 2008-12-19 Mark Probst <mark.probst@gmail.com> + * mini-exceptions.c (get_exception_catch_class): Removed overly + strict assertion. + +2008-12-19 Mark Probst <mark.probst@gmail.com> + Backport of r121292. * method-to-ir.c: Removed an unnecessary assertion. 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,5 +1,11 @@ 2008-12-19 Mark Probst <mark.probst@gmail.com> + * bug-459285.2.cs: New generic sharing test. + + * Makefile.am: Test added. + +2008-12-19 Mark Probst <mark.probst@gmail.com> + Backport of r121292. * generic-marshalbyref.2.cs: Test for calls to marshal-by-ref 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<T> +{ + public void DoSomething() + { + try + { + throw new Exception("Error"); + } + catch + { + throw; + } + } +} + +public class Bar: Foo<string> +{ +} + + +public class MainClass +{ + public static int Main() + { + try { + new Bar().DoSomething(); + } catch { + return 0; + } + return 1; + } +} |