Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

2008-12-19 Mark Probst <mark.probst@gmail.com>

	* mini-exceptions.c (get_exception_catch_class): Corrected an
	overly strict assertion.

2008-12-19  Mark Probst  <mark.probst@gmail.com>

	* class.c, class-internals.h: Made
	mono_class_has_parent_and_ignore_generics() non-static.

2008-12-19  Mark Probst  <mark.probst@gmail.com>

	* bug-459285.2.cs: New generic sharing test.

	* Makefile.am: Test added.

svn path=/trunk/mono/; revision=121841
  • Loading branch information...
commit 0ae638538239df482a60c05d24ab480e034e949e 1 parent 27e2330
@schani schani authored
View
4 mono/metadata/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-19 Mark Probst <mark.probst@gmail.com>
+
+ * class.c, class-internals.h: Made
+ mono_class_has_parent_and_ignore_generics() non-static.
Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
View
3  mono/metadata/class-internals.h
@@ -1131,6 +1131,9 @@ mono_method_can_access_field_full (MonoMethod *method, MonoClassField *field, Mo
MonoClass *
mono_class_get_generic_type_definition (MonoClass *klass) MONO_INTERNAL;
+gboolean
+mono_class_has_parent_and_ignore_generics (MonoClass *klass, MonoClass *parent) MONO_INTERNAL;
+
int
mono_method_get_vtable_slot (MonoMethod *method) MONO_INTERNAL;
View
2  mono/metadata/class.c
@@ -7201,7 +7201,7 @@ mono_class_get_generic_type_definition (MonoClass *klass)
*
* Visibility checks ignoring generic instantiations.
*/
-static gboolean
+gboolean
mono_class_has_parent_and_ignore_generics (MonoClass *klass, MonoClass *parent)
{
int i;
View
5 mono/mini/ChangeLog
@@ -1,3 +1,8 @@
+2008-12-19 Mark Probst <mark.probst@gmail.com>
+
+ * mini-exceptions.c (get_exception_catch_class): Corrected an
+ overly strict assertion.
+
2008-12-18 Mark Mason <mmason@upwardaccess.com>
* method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
View
2  mono/mini/mini-exceptions.c
@@ -767,7 +767,7 @@ 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);
+ g_assert (mono_class_has_parent_and_ignore_generics (class, method_container_class));
/* FIXME: we shouldn't inflate but instead put the
type in the rgctx and fetch it from there. It
View
6 mono/tests/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-19 Mark Probst <mark.probst@gmail.com>
+
+ * bug-459285.2.cs: New generic sharing test.
+
+ * Makefile.am: Test added.
+
2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
* bug-389886-sre-generic-interface-instances.cs: New regression test.
View
3  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 \
@@ -723,7 +724,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; \
View
34 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;
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.