SOURCES: mono-console-no-utf8-bom.patch (NEW), mono-fix_delegate_m...
wrobell
wrobell at pld-linux.org
Wed Aug 15 15:50:54 CEST 2007
Author: wrobell Date: Wed Aug 15 13:50:54 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- added patches from debian fixing some critical issues (ppc mainly)
---- Files affected:
SOURCES:
mono-console-no-utf8-bom.patch (NONE -> 1.1) (NEW), mono-fix_delegate_memory_leak_r79001.patch (NONE -> 1.1) (NEW), mono-g_thread_init.patch (NONE -> 1.1) (NEW), mono-ppc_fix_memory_corruption_r81413.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/mono-console-no-utf8-bom.patch
diff -u /dev/null SOURCES/mono-console-no-utf8-bom.patch:1.1
--- /dev/null Wed Aug 15 15:50:54 2007
+++ SOURCES/mono-console-no-utf8-bom.patch Wed Aug 15 15:50:49 2007
@@ -0,0 +1,12 @@
+--- trunk/mcs/class/corlib/System/Console.cs.old 2006-08-29 18:21:12.473936000 +0200
++++ trunk/mcs/class/corlib/System/Console.cs 2006-08-29 18:23:46.607568750 +0200
+@@ -97,8 +97,7 @@
+ int code_page = 0;
+ Encoding.InternalCodePage (ref code_page);
+
+- if (code_page != -1 && ((code_page & 0x0fffffff) == 3 // UTF8Encoding.UTF8_CODE_PAGE
+- || ((code_page & 0x10000000) != 0)))
++ if (code_page == UTF8Encoding.UTF8_CODE_PAGE || ((code_page & 0x10000000) != 0))
+ inputEncoding = outputEncoding = Encoding.UTF8Unmarked;
+ else
+ inputEncoding = outputEncoding = Encoding.Default;
================================================================
Index: SOURCES/mono-fix_delegate_memory_leak_r79001.patch
diff -u /dev/null SOURCES/mono-fix_delegate_memory_leak_r79001.patch:1.1
--- /dev/null Wed Aug 15 15:50:54 2007
+++ SOURCES/mono-fix_delegate_memory_leak_r79001.patch Wed Aug 15 15:50:49 2007
@@ -0,0 +1,40 @@
+diff -urNad mono-1.2.4~/mono/metadata/loader.c mono-1.2.4/mono/metadata/loader.c
+--- mono-1.2.4~/mono/metadata/loader.c 2007-04-25 20:48:41.000000000 +0200
++++ mono-1.2.4/mono/metadata/loader.c 2007-07-21 16:02:11.000000000 +0200
+@@ -1551,17 +1551,11 @@
+ g_free ((char*)method->name);
+ if (mw->method.header)
+ g_free ((char*)mw->method.header->code);
++ g_free (mw->method.header);
+ g_free (mw->method_data);
+- }
+-
+- if (method->dynamic && !(method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) && ((MonoMethodNormal *)method)->header) {
+- /* FIXME: Ditto */
+- /* mono_metadata_free_mh (((MonoMethodNormal *)method)->header); */
+- g_free (((MonoMethodNormal*)method)->header);
+- }
+-
+- if (method->dynamic)
++ g_free (method->signature);
+ g_free (method);
++ }
+ }
+
+ void
+diff -urNad mono-1.2.4~/mono/metadata/marshal.c mono-1.2.4/mono/metadata/marshal.c
+--- mono-1.2.4~/mono/metadata/marshal.c 2007-05-01 00:49:22.000000000 +0200
++++ mono-1.2.4/mono/metadata/marshal.c 2007-07-21 16:02:11.000000000 +0200
+@@ -8765,7 +8765,11 @@
+
+
+ /* we copy the signature, so that we can modify it */
+- csig = signature_dup (method->klass->image, sig);
++ if (this)
++ /* Need to free this later */
++ csig = mono_metadata_signature_dup (sig);
++ else
++ csig = signature_dup (method->klass->image, sig);
+ csig->hasthis = 0;
+ csig->pinvoke = 1;
+
================================================================
Index: SOURCES/mono-g_thread_init.patch
diff -u /dev/null SOURCES/mono-g_thread_init.patch:1.1
--- /dev/null Wed Aug 15 15:50:54 2007
+++ SOURCES/mono-g_thread_init.patch Wed Aug 15 15:50:49 2007
@@ -0,0 +1,13 @@
+--- mono/mono/mini/driver.c 2007/05/24 17:28:21 77922
++++ mono/mono/mini/driver.c 2007/05/27 20:11:48 78018
+@@ -695,6 +695,9 @@
+
+ setlocale (LC_ALL, "");
+
++ if (!g_thread_supported ())
++ g_thread_init (NULL);
++
+ if (mono_running_on_valgrind () && getenv ("MONO_VALGRIND_LEAK_CHECK")) {
+ GMemVTable mem_vtable;
+
+
================================================================
Index: SOURCES/mono-ppc_fix_memory_corruption_r81413.patch
diff -u /dev/null SOURCES/mono-ppc_fix_memory_corruption_r81413.patch:1.1
--- /dev/null Wed Aug 15 15:50:54 2007
+++ SOURCES/mono-ppc_fix_memory_corruption_r81413.patch Wed Aug 15 15:50:49 2007
@@ -0,0 +1,29 @@
+--- mono/mono/mini/mini-ppc.c (Revision 81412)
++++ mono/mono/mini/mini-ppc.c (Revision 81413)
+@@ -2560,8 +2560,12 @@
+ ppc_rlwinm (code, ppc_r11, ppc_r11, 0, 0, 27);
+ /* use ctr to store the number of words to 0 if needed */
+ if (ins->flags & MONO_INST_INIT) {
+- /* we zero 4 bytes at a time */
+- ppc_addi (code, ppc_r0, ins->sreg1, 3);
++ /* we zero 4 bytes at a time:
++ * we add 7 instead of 3 so that we set the counter to
++ * at least 1, otherwise the bdnz instruction will make
++ * it negative and iterate billions of times.
++ */
++ ppc_addi (code, ppc_r0, ins->sreg1, 7);
+ ppc_srawi (code, ppc_r0, ppc_r0, 2);
+ ppc_mtctr (code, ppc_r0);
+ }
+@@ -2571,7 +2575,10 @@
+
+ if (ins->flags & MONO_INST_INIT) {
+ /* adjust the dest reg by -4 so we can use stwu */
+- ppc_addi (code, ins->dreg, ppc_sp, (area_offset - 4));
++ /* we actually adjust -8 because we let the loop
++ * run at least once
++ */
++ ppc_addi (code, ins->dreg, ppc_sp, (area_offset - 8));
+ ppc_li (code, ppc_r11, 0);
+ zero_loop_start = code;
+ ppc_stwu (code, ppc_r11, 4, ins->dreg);
================================================================
More information about the pld-cvs-commit
mailing list