[Bug 263828] Meinproc4 crashes when building documentation

Ralf Habacker ralf.habacker at freenet.de
Sat Mar 26 20:23:30 CET 2011


https://bugs.kde.org/show_bug.cgi?id=263828





--- Comment #8 from Ralf Habacker <ralf habacker freenet de>  2011-03-26 20:23:27 ---
After digging into libxml and the windows patches for a few hours I recognized
three issues for msvc 2010: 

1. Some of the source patches related to tree.c which has been required 3 years
ago does not fit anymore with kde 4.6 and results into crashing libxml2.
Removing this patch do not have any known negative side effect with kde 4.6
(kde 4.5 not tested yet)

2. The setenv problem reported in 2011-03-24 21:50:22

3. The problems covered by the damn-you-meinproc.diff is caused by an access to
an already free'd node in __xmlRaiseError() and xmlCtxtDumpNode(). The node
pointer and/or some members are set to 0xdddddddd, which indicates the free'd
situation - see http://www.nobugs.org/developer/win32/debug_crt_heap.html for
more informations. No idea yet, where this happens. I found a workaround by
checking the node pointer against the value 0xdddddddd, but this is a msvc only
solution. 

diff -Nru libxml2-2.7.8.orig/error.c libxml2-2.7.8/error.c
--- libxml2-2.7.8.orig/error.c    2010-10-12 08:25:32.000000000 +0200
+++ libxml2-2.7.8/error.c    2011-03-26 19:12:45.703738300 +0100
@@ -509,7 +509,7 @@
             }
         }
         to = &ctxt->lastError;
-    } else if ((node != NULL) && (file == NULL)) {
+    } else if ((node != NULL && node->doc != 0xdddddddd) && (file == NULL)) {
     int i;

     if ((node->doc != NULL) && (node->doc->URL != NULL)) {

diff -Nru libxml2-2.7.8.orig/debugXML.c libxml2-2.7.8/debugXML.c
--- libxml2-2.7.8.orig/debugXML.c    2010-11-04 10:44:21.000000000 +0100
+++ libxml2-2.7.8/debugXML.c    2011-03-26 19:53:11.856437700 +0100
@@ -1067,6 +1069,13 @@
         }
         return;
     }
+    if (node == (xmlNodePtr*)0xdddddddd) {
+        if (!ctxt->check) {
+            xmlCtxtDumpSpaces(ctxt);
+            fprintf(ctxt->output, "node is freed\n");
+        }
+        return;
+    }
     xmlCtxtDumpOneNode(ctxt, node);
     if ((node->type != XML_NAMESPACE_DECL) && 
         (node->children != NULL) && (node->type != XML_ENTITY_REF_NODE)) {
@@ -1087,7 +1096,7 @@
 static void
 xmlCtxtDumpNodeList(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
 {
-    while (node != NULL) {
+    while (node != NULL && node != 0xdddddddd) {
         xmlCtxtDumpNode(ctxt, node);
         node = node->next;
     }
diff -Nru libxml2-2.7.8.orig/error.c libxml2-2.7.8/error.c
--- libxml2-2.7.8.orig/error.c    2010-10-12 08:25:32.000000000 +0200
+++ libxml2-2.7.8/error.c    2011-03-26 19:12:45.703738300 +0100
@@ -509,7 +509,7 @@
             }
         }
         to = &ctxt->lastError;
-    } else if ((node != NULL) && (file == NULL)) {
+    } else if ((node != NULL && node->doc != 0xdddddddd) && (file == NULL)) {
     int i;

     if ((node->doc != NULL) && (node->doc->URL != NULL)) {

... so far

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Kde-windows mailing list