Package: mono-gmcs
Version: 2.4.3+dfsg-1.1
Severity: normal
Tags: patch

I have a compile error compiling basenji.
https://bugs.launchpad.net/basenji/+bug/508440
The bug is an upstream mono bug:
https://bugzilla.novell.com/show_bug.cgi?id=563909

applying the attached patch to mono, the problem disappears.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32.3 (SMP w/2 CPU cores)
Locale: LANG=hu_HU.UTF-8, LC_CTYPE=hu_HU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mono-gmcs depends on:
ii  libc6                     2.10.2-5       Embedded GNU C Library: Shared lib
ii  libmono-corlib2.0-cil     2.4.3+dfsg-1.1 Mono core library (for CLI 2.0)
ii  libmono-system2.0-cil     2.4.3+dfsg-1.1 Mono System libraries (for CLI 2.0
ii  mono-runtime              2.4.3+dfsg-1.1 Mono runtime

Versions of packages mono-gmcs recommends:
ii  pkg-config                    0.22-1     manage compile and link flags for 

mono-gmcs suggests no packages.

-- no debconf information
--- branches/mono-2-4-3/mono/mono/metadata/reflection.c	2009/11/17 17:59:44	146367
+++ branches/mono-2-4-3/mono/mono/metadata/reflection.c	2009/12/14 18:26:55	148397
@@ -1629,9 +1629,10 @@
 	/* encode custom attributes before the type */
 	if (type->num_mods) {
 		for (i = 0; i < type->num_mods; ++i) {
-			if (field_image) {
+			if (field_image && (type->modifiers [i].token & 0xff000000)) {
 				MonoClass *class = mono_class_get (field_image, type->modifiers [i].token);
-				g_assert (class);
+				if (!class)
+					g_error ("Can't lookup custom mod token %08x", type->modifiers [i].token);
 				token = mono_image_typedef_or_ref (assembly, &class->byval_arg);
 			} else {
 				token = type->modifiers [i].token;

Reply via email to