Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Dec 2002 07:30:02 -0800 (PST)
From:      Keith <freebsd.dev@blueyonder.co.uk>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/32508: [PATCH] www/flashplugin-mozilla has malloc bug
Message-ID:  <200212311530.gBVFU2dH033082@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/32508; it has been noted by GNATS.

From: Keith <freebsd.dev@blueyonder.co.uk>
To: freebsd-gnats-submit@FreeBSD.org, brooks@one-eyed-alien.net
Cc:  
Subject: Re: ports/32508: [PATCH] www/flashplugin-mozilla has malloc bug
Date: Tue, 31 Dec 2002 15:23:29 +0000

 This is a multi-part message in MIME format.
 --------------060809040606090201050905
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Hi,
 
 I did a bit more investigation of this under -CURRENT, and it appears
 that when the plugin's destructor is called, a bus error occurs when it
 calls XtRemoveEventHandler(). I can only assume this is because Mozilla
 has already blown away the frame to which the widget refers, so it's too
 late to try to remove the event handler.
 
 The simplest workaround is to remove the XtRemoveEventHandler() call, as 
   shown in the attached replacement for patch-plugin.c, on the grounds 
 that the call isn't doing any good anyway. In the longer term, someone 
 with some knowledge of Mozilla and the X toolkit might want to take a 
 closer look at this and figure out what's really going on! ;)
 
 Keith
 
 --------------060809040606090201050905
 Content-Type: text/plain;
  name="patch-plugin.c"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-plugin.c"
 
 --- plugin.c.orig	Mon Jun 12 09:24:09 2000
 +++ plugin.c	Tue Dec 31 15:16:31 2002
 @@ -193,12 +193,19 @@
  			XSync(This->dpy,False);
  			XFreePixmap(This->dpy, This->canvas);
  			shmdt(This->segInfo.shmaddr);
 +#ifndef linux
 +			{
 +				struct shmid_ds buf;
 +
 +			if (shmctl(This->segInfo.shmid, IPC_RMID, &buf) < 0) {
 +				perror("shmctl");
 +				}
 +			}
 +#endif
  
  			FlashClose(This->fh);
  			This->fh = 0;
  		}
 -		XtRemoveEventHandler(This->widget, FLASH_XEVENT_MASK,
 -				  True, (XtEventHandler) flashEvent, (XtPointer)This);
  
  		prev = 0;
  		for(l = This->loading; l; prev = l, l = l->next) {
 
 --------------060809040606090201050905--
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212311530.gBVFU2dH033082>