bugGnash - The GNU Flash player - Bugs: bug #24068, Change MIT-SHM to automatically...

 
 

bug #24068: Change MIT-SHM to automatically destroy shm segment

Submitted by:  Craig Kelley <inconnu>
Submitted on:  Thu 14 Aug 2008 04:52:23 PM UTC  
 
Category: gui-gtkSeverity: 3 - Normal
Release: trunkStatus: Fixed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 04 Sep 2008 11:09:45 AM UTC, comment #4:

Well, dunno who committed it, but this patch is in trunk already.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Fri 15 Aug 2008 05:08:06 PM UTC, comment #3:

I was testing it with 0.8.3+xv. ipcs kept growing the number of shm segments on the system, which led me to this solution. I then checked out the latest trunk and added the single line in, which is this patch. As for commenting out ENABLE_MIT_SHM; this is a problem for autoconf. It should not be enabled on Win32 builds... I don't use Windows at all, so I have no idea how it was detected on that system.

Craig Kelley <inconnu>
Fri 15 Aug 2008 02:21:36 PM UTC, comment #2:

I'm the guilty party forcibly #undef'ing ENABLE_MIT_SHM as it was the only way I could get Gnash to even build on Win32.

If someone can get the build working without it forcibly #undef'ed on a non-Win32 platform, I'll fix it so that it's only conditionally #undef'ed on Win32.

Dossy Shiobara <dossy>
Fri 15 Aug 2008 08:48:01 AM UTC, comment #1:

It seems ENABLE_MIT_SHM is forceably undefined
in gui/gtk_glue_agg.h. When I tried to comment-out
the undef my build failed, does it work for you ?
Are you using trunk ?

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 14 Aug 2008 04:52:23 PM UTC, original submission:

While playing around with my XVideo patches, I discovered that gnash would leak shared memory segments. This should ensure that they go away when gnash finishes.

diff -urN trunk/gui/gtk_glue_agg.cpp trunk-ink/gui/gtk_glue_agg.cpp
--- trunk/gui/gtk_glue_agg.cpp 2008-08-14 10:43:16.000000000 -0600
+++ trunk-ink/gui/gtk_glue_agg.cpp 2008-08-14 10:46:29.000000000 -0600
@@ -201,6 +201,9 @@
destroy_shm_image();
return;
}
+
+ // mark segment for automatic destruction after last process detaches
+ shmctl(_shm_info->shmid, IPC_RMID, 0);

//log_debug("create_shm_image() OK"); // <-- remove this
#endif // ENABLE_MIT_SHM

Craig Kelley <inconnu>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dossy (Posted a comment)
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by strk
  • -unavailable- added by inconnu (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 11 Sep 2008 01:37:53 PM UTCstrkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 04 Sep 2008 11:09:45 AM UTCstrkStatusIn Progress=>Ready For Test
    Fri 15 Aug 2008 08:48:01 AM UTCstrkStatusNone=>In Progress
      Assigned toNone=>strk
      Carbon-Copy-=>Added dossy

    Back to the top


    Powered by Savane 3.1-cleanup1