tag 527329 patch
thanks

Hi Ray,

[nothing as nice as attaching the patch to a mail claiming patch]

with respect to the problem of pstoedit segfaulting at termination (this
might not matter much for command line usage, so I downgraded the
severity, but it does break programs using pstoedit, I found it with the
inkscape Render LaTeX function), I propose to disable the dlclose call.
It does not seem to be called except at program termination (when the
static variable LoadedPlugins is deinitialized and deinitializes all
DynLoader instances that have been add'ed to it), so there seems little
gain in doing the dlclose.
In the long term, another option might be to do away with the plugin
regime completely. As it is presently used, there seems little advantage
for Debian, but, naturally, you are more qualified to make this call.

Please consider attached patch. If you are busy or something, I can try
to find someone else to upload this as an NMU.

Thanks for maintaining pstoedit.

Kind regards

T.
-- 
Thomas Viehmann, http://thomas.viehmann.net/

diff -u pstoedit-3.45/config.guess pstoedit-3.45/config.guess
diff -u pstoedit-3.45/config.sub pstoedit-3.45/config.sub
diff -u pstoedit-3.45/debian/changelog pstoedit-3.45/debian/changelog
--- pstoedit-3.45/debian/changelog
+++ pstoedit-3.45/debian/changelog
@@ -1,3 +1,16 @@
+pstoedit (3.45-6.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Disable unloading of plugins (comment out dlclose in dynload.cpp).
+    This did lead to segmentation faults, aparently because something
+    got deinitialized twice by plugins that were unloaded.
+    However, libpstoedit does not support any way of unloading them
+    except automatically calling the destructor at program termination,
+    so we might just get by without unloading the libraries.
+    Closes: #527329
+
+ -- Thomas Viehmann <t...@beamnet.de>  Fri, 08 May 2009 23:35:38 +0200
+
 pstoedit (3.45-6) unstable; urgency=medium
 
   * [debian/control]
diff -u pstoedit-3.45/src/dynload.cpp pstoedit-3.45/src/dynload.cpp
--- pstoedit-3.45/src/dynload.cpp
+++ pstoedit-3.45/src/dynload.cpp
@@ -135,7 +135,8 @@
 {
 	if (handle) {
 #if defined(__linux) || defined(__linux__) || defined(__CYGWIN32__) || defined(__FreeBSD__) || defined(__hpux) || defined(__sparc) || defined(__OS2__) || defined(_AIX) || (defined (HAVE_DLFCN_H) && (HAVE_DLFCN_H==1 ) )
-		dlclose(handle);
+	        /* disabled because deinitializing plugins seem to cause segfaults at program termination */
+		/* dlclose(handle); */
 #elif defined(_WIN32)
 		(void) WINFREELIB((HINSTANCE) handle);
 #else

Reply via email to