Subject: Perl/Tk bug solved - was Re: one user segfaulting other users' program
To: None <netbsd-help@netbsd.org>
From: theo borm <theo_nbsdhelp@borm.org>
List: netbsd-help
Date: 05/29/2006 17:10:25
Hi,
Sorry for the confusion; as it turns out this segfault was caused by a
(known) bug in Perl/Tk, triggered by programs using newer verions of the
gtk2 library.
Attached patch against p5-Tk-804.027nb6 seems to solve the issue, though
I'm not convinced that it takes away the root cause. It may be worthwile
to add this patch in pkgsrc, but I'm unfamilliar with the proper procedure.
more info:
http://rt.cpan.org/Public/Bug/Display.html?id=16053
with kind regards,
Theo.
--- pTk/mTk/generic/tkEvent.c.orig 2003-12-30 12:54:31.000000000 +0100
+++ pTk/mTk/generic/tkEvent.c 2006-05-29 18:00:04.000000000 +0200
@@ -986,8 +986,9 @@
TkWmProtocolEventProc(winPtr, eventPtr);
} else {
/* Perl/Tk had/has its own hook for this */
- LangClientMessage(winPtr->mainPtr->interp, (Tk_Window)
winPtr, eventPtr);
-
+ if (eventPtr && winPtr && winPtr->mainPtr) {
+ LangClientMessage(winPtr->mainPtr->interp,
(Tk_Window) winPtr, eventPtr);
+ }
/*
* Finally, invoke any ClientMessage event handlers.
*/