[21952] trunk/dports/net/aria2

source_changes at macosforge.org source_changes at macosforge.org
Mon Feb 12 00:56:09 PST 2007


Revision: 21952
          http://trac.macosforge.org/projects/macports/changeset/21952
Author:   eridius at macports.org
Date:     2007-02-12 00:56:09 -0800 (Mon, 12 Feb 2007)

Log Message:
-----------
Patch aria2 to fix a critical flaw in its automatic reference counting implementation that caused a bus error during launch.
Didn't run this by maintainer since it's a patch against aria2 itself, not the port

Modified Paths:
--------------
    trunk/dports/net/aria2/Portfile

Added Paths:
-----------
    trunk/dports/net/aria2/files/
    trunk/dports/net/aria2/files/patch-SharedHandle.h

Modified: trunk/dports/net/aria2/Portfile
===================================================================
--- trunk/dports/net/aria2/Portfile	2007-02-12 06:42:51 UTC (rev 21951)
+++ trunk/dports/net/aria2/Portfile	2007-02-12 08:56:09 UTC (rev 21952)
@@ -25,6 +25,8 @@
 				--with-libintl-prefix=${prefix} \
 				--with-xml-prefix=${prefix}
 
+patchfiles      patch-SharedHandle.h
+
 platform darwin 8 {
 	configure.env-append CC=/usr/bin/gcc-4.0 CXX=/usr/bin/g++-4.0
 }

Added: trunk/dports/net/aria2/files/patch-SharedHandle.h
===================================================================
--- trunk/dports/net/aria2/files/patch-SharedHandle.h	                        (rev 0)
+++ trunk/dports/net/aria2/files/patch-SharedHandle.h	2007-02-12 08:56:09 UTC (rev 21952)
@@ -0,0 +1,25 @@
+--- src/SharedHandle.h.bak	2007-02-12 03:51:25.000000000 -0500
++++ src/SharedHandle.h	2007-02-12 03:51:45.000000000 -0500
+@@ -76,13 +76,15 @@
+   RefCount* ucount;
+ 
+   void releaseReference() {
+-    if(--ucount->strongRefCount == 0) {
+-      delete obj;
+-      obj = 0;
+-    }
+-    if(--ucount->totalRefCount == 0) {
+-      delete ucount;
+-      ucount = 0;
++    if(ucount != 0) {
++      if(--ucount->strongRefCount == 0) {
++        delete obj;
++        obj = 0;
++      }
++      if(--ucount->totalRefCount == 0) {
++        delete ucount;
++        ucount = 0;
++      }
+     }
+   }
+ 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070212/62dad380/attachment.html


More information about the macports-changes mailing list