Skip to content

Commit

Permalink
wip - trace exit handling
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Apr 30, 2023
1 parent 3bc429e commit b1a74c2
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions patches/libxml2/9998-trace-exit-handling.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/parser.c b/parser.c
index c6383f6e..12c760ec 100644
--- a/parser.c
+++ b/parser.c
@@ -14351,6 +14351,8 @@ xmlCleanupParser(void) {
if (!xmlParserInitialized)
return;

+ fprintf(stderr, "MIKE: %s:%d: xmlCleanupParser cleaning up\n", __FILE__, __LINE__);
+
xmlCleanupCharEncodingHandlers();
#ifdef LIBXML_CATALOG_ENABLED
xmlCatalogCleanup();
diff --git a/threads.c b/threads.c
index 56a917e6..13597649 100644
--- a/threads.c
+++ b/threads.c
@@ -477,6 +477,8 @@ xmlFreeGlobalState(void *state)
{
xmlGlobalState *gs = (xmlGlobalState *) state;

+ fprintf(stderr, "MIKE: %s:%d: xmlFreeGlobalState cleaning up\n", __FILE__, __LINE__);
+
/* free any memory allocated in the thread's xmlLastError */
xmlResetError(&(gs->xmlLastError));
free(state);

0 comments on commit b1a74c2

Please sign in to comment.