[32244] trunk/dports/devel/ice-python

blair at macports.org blair at macports.org
Fri Dec 21 17:49:13 PST 2007


Revision: 32244
          http://trac.macosforge.org/projects/macports/changeset/32244
Author:   blair at macports.org
Date:     2007-12-21 17:49:12 -0800 (Fri, 21 Dec 2007)

Log Message:
-----------
Upstream patch that fixes a core dump when a user exception is thrown
from a servant locator.

Modified Paths:
--------------
    trunk/dports/devel/ice-python/Portfile
    trunk/dports/devel/ice-python/files/patch-ServantLocator.locate-can-throw-user-exceptions

Modified: trunk/dports/devel/ice-python/Portfile
===================================================================
--- trunk/dports/devel/ice-python/Portfile	2007-12-21 21:02:36 UTC (rev 32243)
+++ trunk/dports/devel/ice-python/Portfile	2007-12-22 01:49:12 UTC (rev 32244)
@@ -3,7 +3,7 @@
 PortSystem 1.0
 name		ice-python
 version		3.2.1
-revision	1
+revision	2
 categories	devel python
 maintainers	blair
 description	Fast, object-oriented RPC for C++, Java, Python, Ruby, PHP

Modified: trunk/dports/devel/ice-python/files/patch-ServantLocator.locate-can-throw-user-exceptions
===================================================================
--- trunk/dports/devel/ice-python/files/patch-ServantLocator.locate-can-throw-user-exceptions	2007-12-21 21:02:36 UTC (rev 32243)
+++ trunk/dports/devel/ice-python/files/patch-ServantLocator.locate-can-throw-user-exceptions	2007-12-22 01:49:12 UTC (rev 32244)
@@ -1,40 +1,6 @@
-diff -ru ../IcePy-3.2.1.orig/modules/IcePy/.depend ./modules/IcePy/.depend
---- ../IcePy-3.2.1.orig/modules/IcePy/.depend	2007-08-08 12:00:54.000000000 -0700
-+++ ./modules/IcePy/.depend	2007-12-20 12:26:37.000000000 -0800
-@@ -1,15 +1,15 @@
--Communicator$(OBJEXT): Communicator.cpp Communicator.h Config.h ImplicitContext.h Logger.h Util.h ObjectAdapter.h ObjectFactory.h Properties.h Proxy.h ThreadNotification.h
--Connection$(OBJEXT): Connection.cpp Connection.h Config.h ObjectAdapter.h Proxy.h Util.h
--Current$(OBJEXT): Current.cpp Current.h Config.h Connection.h ObjectAdapter.h Util.h
--ImplicitContext$(OBJEXT): ImplicitContext.cpp ImplicitContext.h Config.h ObjectAdapter.h Proxy.h Util.h
--Init$(OBJEXT): Init.cpp Communicator.h Config.h Connection.h Current.h ImplicitContext.h Logger.h Util.h ObjectAdapter.h Operation.h Properties.h Proxy.h Slice.h Types.h
--Logger$(OBJEXT): Logger.cpp Logger.h Config.h Util.h
--ObjectAdapter$(OBJEXT): ObjectAdapter.cpp ObjectAdapter.h Config.h Communicator.h Current.h Operation.h Proxy.h Util.h
--ObjectFactory$(OBJEXT): ObjectFactory.cpp ObjectFactory.h Config.h Types.h Util.h
--Operation$(OBJEXT): Operation.cpp Operation.h Config.h Current.h Proxy.h Types.h Util.h
--Properties$(OBJEXT): Properties.cpp Properties.h Config.h Util.h
--Proxy$(OBJEXT): Proxy.cpp Proxy.h Config.h Communicator.h Connection.h Util.h
--Slice$(OBJEXT): Slice.cpp Slice.h Config.h Util.h
--ThreadNotification$(OBJEXT): ThreadNotification.cpp ThreadNotification.h Config.h Util.h
--Types$(OBJEXT): Types.cpp Types.h Config.h Util.h Current.h Proxy.h
--Util$(OBJEXT): Util.cpp Util.h Config.h
-+Communicator$(OBJEXT): Communicator.cpp ./Communicator.h ./Config.h ./ImplicitContext.h ./Logger.h ./Util.h ./ObjectAdapter.h ./ObjectFactory.h ./Properties.h ./Proxy.h ./ThreadNotification.h
-+Connection$(OBJEXT): Connection.cpp ./Connection.h ./Config.h ./ObjectAdapter.h ./Proxy.h ./Util.h
-+Current$(OBJEXT): Current.cpp ./Current.h ./Config.h ./Connection.h ./ObjectAdapter.h ./Util.h
-+ImplicitContext$(OBJEXT): ImplicitContext.cpp ./ImplicitContext.h ./Config.h ./ObjectAdapter.h ./Proxy.h ./Util.h
-+Init$(OBJEXT): Init.cpp ./Communicator.h ./Config.h ./Connection.h ./Current.h ./ImplicitContext.h ./Logger.h ./Util.h ./ObjectAdapter.h ./Operation.h ./Properties.h ./Proxy.h ./Slice.h ./Types.h
-+Logger$(OBJEXT): Logger.cpp ./Logger.h ./Config.h ./Util.h
-+ObjectAdapter$(OBJEXT): ObjectAdapter.cpp ./ObjectAdapter.h ./Config.h ./Communicator.h ./Current.h ./Operation.h ./Proxy.h ./Types.h ./Util.h
-+ObjectFactory$(OBJEXT): ObjectFactory.cpp ./ObjectFactory.h ./Config.h ./Types.h ./Util.h
-+Operation$(OBJEXT): Operation.cpp ./Operation.h ./Config.h ./Current.h ./Proxy.h ./Types.h ./Util.h
-+Properties$(OBJEXT): Properties.cpp ./Properties.h ./Config.h ./Util.h
-+Proxy$(OBJEXT): Proxy.cpp ./Proxy.h ./Config.h ./Communicator.h ./Connection.h ./Operation.h ./Util.h
-+Slice$(OBJEXT): Slice.cpp ./Slice.h ./Config.h ./Util.h
-+ThreadNotification$(OBJEXT): ThreadNotification.cpp ./ThreadNotification.h ./Config.h ./Util.h
-+Types$(OBJEXT): Types.cpp ./Types.h ./Config.h ./Util.h ./Current.h ./Proxy.h
-+Util$(OBJEXT): Util.cpp ./Util.h ./Config.h
 diff -ru ../IcePy-3.2.1.orig/modules/IcePy/Communicator.cpp ./modules/IcePy/Communicator.cpp
 --- ../IcePy-3.2.1.orig/modules/IcePy/Communicator.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./modules/IcePy/Communicator.cpp	2007-12-20 12:26:37.000000000 -0800
++++ ./modules/IcePy/Communicator.cpp	2007-12-21 16:59:17.000000000 -0800
 @@ -161,11 +161,18 @@
          {
              data.threadHook = new ThreadNotificationWrapper(threadHook.get());
@@ -74,9 +40,43 @@
      {
          free(argv[i]);
      }
+diff -ru ../IcePy-3.2.1.orig/modules/IcePy/.depend ./modules/IcePy/.depend
+--- ../IcePy-3.2.1.orig/modules/IcePy/.depend	2007-08-08 12:00:54.000000000 -0700
++++ ./modules/IcePy/.depend	2007-12-21 16:59:17.000000000 -0800
+@@ -1,15 +1,15 @@
+-Communicator$(OBJEXT): Communicator.cpp Communicator.h Config.h ImplicitContext.h Logger.h Util.h ObjectAdapter.h ObjectFactory.h Properties.h Proxy.h ThreadNotification.h
+-Connection$(OBJEXT): Connection.cpp Connection.h Config.h ObjectAdapter.h Proxy.h Util.h
+-Current$(OBJEXT): Current.cpp Current.h Config.h Connection.h ObjectAdapter.h Util.h
+-ImplicitContext$(OBJEXT): ImplicitContext.cpp ImplicitContext.h Config.h ObjectAdapter.h Proxy.h Util.h
+-Init$(OBJEXT): Init.cpp Communicator.h Config.h Connection.h Current.h ImplicitContext.h Logger.h Util.h ObjectAdapter.h Operation.h Properties.h Proxy.h Slice.h Types.h
+-Logger$(OBJEXT): Logger.cpp Logger.h Config.h Util.h
+-ObjectAdapter$(OBJEXT): ObjectAdapter.cpp ObjectAdapter.h Config.h Communicator.h Current.h Operation.h Proxy.h Util.h
+-ObjectFactory$(OBJEXT): ObjectFactory.cpp ObjectFactory.h Config.h Types.h Util.h
+-Operation$(OBJEXT): Operation.cpp Operation.h Config.h Current.h Proxy.h Types.h Util.h
+-Properties$(OBJEXT): Properties.cpp Properties.h Config.h Util.h
+-Proxy$(OBJEXT): Proxy.cpp Proxy.h Config.h Communicator.h Connection.h Util.h
+-Slice$(OBJEXT): Slice.cpp Slice.h Config.h Util.h
+-ThreadNotification$(OBJEXT): ThreadNotification.cpp ThreadNotification.h Config.h Util.h
+-Types$(OBJEXT): Types.cpp Types.h Config.h Util.h Current.h Proxy.h
+-Util$(OBJEXT): Util.cpp Util.h Config.h
++Communicator$(OBJEXT): Communicator.cpp ./Communicator.h ./Config.h ./ImplicitContext.h ./Logger.h ./Util.h ./ObjectAdapter.h ./ObjectFactory.h ./Properties.h ./Proxy.h ./ThreadNotification.h
++Connection$(OBJEXT): Connection.cpp ./Connection.h ./Config.h ./ObjectAdapter.h ./Proxy.h ./Util.h
++Current$(OBJEXT): Current.cpp ./Current.h ./Config.h ./Connection.h ./ObjectAdapter.h ./Util.h
++ImplicitContext$(OBJEXT): ImplicitContext.cpp ./ImplicitContext.h ./Config.h ./ObjectAdapter.h ./Proxy.h ./Util.h
++Init$(OBJEXT): Init.cpp ./Communicator.h ./Config.h ./Connection.h ./Current.h ./ImplicitContext.h ./Logger.h ./Util.h ./ObjectAdapter.h ./Operation.h ./Properties.h ./Proxy.h ./Slice.h ./Types.h
++Logger$(OBJEXT): Logger.cpp ./Logger.h ./Config.h ./Util.h
++ObjectAdapter$(OBJEXT): ObjectAdapter.cpp ./ObjectAdapter.h ./Config.h ./Communicator.h ./Current.h ./Operation.h ./Proxy.h ./Types.h ./Util.h
++ObjectFactory$(OBJEXT): ObjectFactory.cpp ./ObjectFactory.h ./Config.h ./Types.h ./Util.h
++Operation$(OBJEXT): Operation.cpp ./Operation.h ./Config.h ./Current.h ./Proxy.h ./Types.h ./Util.h
++Properties$(OBJEXT): Properties.cpp ./Properties.h ./Config.h ./Util.h
++Proxy$(OBJEXT): Proxy.cpp ./Proxy.h ./Config.h ./Communicator.h ./Connection.h ./Operation.h ./Util.h
++Slice$(OBJEXT): Slice.cpp ./Slice.h ./Config.h ./Util.h
++ThreadNotification$(OBJEXT): ThreadNotification.cpp ./ThreadNotification.h ./Config.h ./Util.h
++Types$(OBJEXT): Types.cpp ./Types.h ./Config.h ./Util.h ./Current.h ./Proxy.h
++Util$(OBJEXT): Util.cpp ./Util.h ./Config.h
 diff -ru ../IcePy-3.2.1.orig/modules/IcePy/ObjectAdapter.cpp ./modules/IcePy/ObjectAdapter.cpp
 --- ../IcePy-3.2.1.orig/modules/IcePy/ObjectAdapter.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./modules/IcePy/ObjectAdapter.cpp	2007-12-20 12:26:37.000000000 -0800
++++ ./modules/IcePy/ObjectAdapter.cpp	2007-12-21 16:59:17.000000000 -0800
 @@ -15,6 +15,7 @@
  #include <Current.h>
  #include <Operation.h>
@@ -143,7 +143,7 @@
  
 diff -ru ../IcePy-3.2.1.orig/modules/IcePy/Operation.cpp ./modules/IcePy/Operation.cpp
 --- ../IcePy-3.2.1.orig/modules/IcePy/Operation.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./modules/IcePy/Operation.cpp	2007-12-20 12:26:37.000000000 -0800
++++ ./modules/IcePy/Operation.cpp	2007-12-21 16:59:17.000000000 -0800
 @@ -50,6 +50,7 @@
  
      OperationI(const char*, PyObject*, PyObject*, int, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*);
@@ -202,7 +202,7 @@
  
 diff -ru ../IcePy-3.2.1.orig/modules/IcePy/Operation.h ./modules/IcePy/Operation.h
 --- ../IcePy-3.2.1.orig/modules/IcePy/Operation.h	2007-08-08 12:00:54.000000000 -0700
-+++ ./modules/IcePy/Operation.h	2007-12-20 12:26:37.000000000 -0800
++++ ./modules/IcePy/Operation.h	2007-12-21 16:59:17.000000000 -0800
 @@ -24,6 +24,7 @@
  
      virtual ~Operation();
@@ -213,7 +213,7 @@
      virtual void deprecate(const std::string&) = 0;
 diff -ru ../IcePy-3.2.1.orig/modules/IcePy/Proxy.cpp ./modules/IcePy/Proxy.cpp
 --- ../IcePy-3.2.1.orig/modules/IcePy/Proxy.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./modules/IcePy/Proxy.cpp	2007-12-20 12:26:37.000000000 -0800
++++ ./modules/IcePy/Proxy.cpp	2007-12-21 16:59:17.000000000 -0800
 @@ -15,6 +15,7 @@
  #include <structmember.h>
  #include <Communicator.h>
@@ -429,7 +429,7 @@
  #ifdef WIN32
 diff -ru ../IcePy-3.2.1.orig/modules/IcePy/Types.cpp ./modules/IcePy/Types.cpp
 --- ../IcePy-3.2.1.orig/modules/IcePy/Types.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./modules/IcePy/Types.cpp	2007-12-20 12:26:37.000000000 -0800
++++ ./modules/IcePy/Types.cpp	2007-12-21 16:59:30.000000000 -0800
 @@ -16,6 +16,8 @@
  #include <Util.h>
  #include <IceUtil/InputUtil.h>
@@ -439,7 +439,7 @@
  #include <Ice/LocalException.h>
  
  using namespace std;
-@@ -2284,6 +2286,107 @@
+@@ -2284,6 +2286,116 @@
      }
  }
  
@@ -454,7 +454,7 @@
 +public:
 +
 +    UserExceptionWrapper(PyObject*, const ExceptionInfoPtr&, const Ice::CommunicatorPtr&);
-+    virtual ~UserExceptionWrapper() throw() { }
++    virtual ~UserExceptionWrapper() throw();
 +
 +    virtual string ice_name() const;
 +    virtual Ice::Exception* ice_clone() const;
@@ -479,6 +479,13 @@
 +    Py_INCREF(ex);
 +}
 +
++UserExceptionWrapper::~UserExceptionWrapper() throw()
++{
++    AdoptThread adoptThread; // Ensure the current thread is able to call into Python.
++
++    _ex = 0;
++}
++
 +string
 +UserExceptionWrapper::ice_name() const
 +{
@@ -500,6 +507,8 @@
 +void
 +UserExceptionWrapper::__write(IceInternal::BasicStream* os) const
 +{
++    AdoptThread adoptThread; // Ensure the current thread is able to call into Python.
++
 +    //
 +    // To marshal a Python user exception into a BasicStream, we first
 +    // marshal it into an OutputStream and then write the marshaled
@@ -547,7 +556,7 @@
  //
  // ExceptionInfo implementation.
  //
-@@ -2296,8 +2399,6 @@
+@@ -2296,8 +2408,6 @@
          throw AbortMarshaling();
      }
  
@@ -556,7 +565,7 @@
      ExceptionInfoPtr info = this;
      while(info)
      {
-@@ -2405,6 +2506,12 @@
+@@ -2405,6 +2515,12 @@
      }
  }
  
@@ -571,7 +580,7 @@
  //
 diff -ru ../IcePy-3.2.1.orig/modules/IcePy/Types.h ./modules/IcePy/Types.h
 --- ../IcePy-3.2.1.orig/modules/IcePy/Types.h	2007-08-08 12:00:54.000000000 -0700
-+++ ./modules/IcePy/Types.h	2007-12-20 12:26:37.000000000 -0800
++++ ./modules/IcePy/Types.h	2007-12-21 16:59:17.000000000 -0800
 @@ -356,6 +356,8 @@
      void print(PyObject*, IceUtil::Output&);
      void printMembers(PyObject*, IceUtil::Output&, PrintObjectHistory*);
@@ -583,7 +592,7 @@
      DataMemberList members;
 diff -ru ../IcePy-3.2.1.orig/modules/IcePy/Util.cpp ./modules/IcePy/Util.cpp
 --- ../IcePy-3.2.1.orig/modules/IcePy/Util.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./modules/IcePy/Util.cpp	2007-12-20 12:26:37.000000000 -0800
++++ ./modules/IcePy/Util.cpp	2007-12-21 16:59:17.000000000 -0800
 @@ -58,7 +58,7 @@
  }
  
@@ -595,7 +604,7 @@
  }
 diff -ru ../IcePy-3.2.1.orig/modules/IcePy/Util.h ./modules/IcePy/Util.h
 --- ../IcePy-3.2.1.orig/modules/IcePy/Util.h	2007-08-08 12:00:54.000000000 -0700
-+++ ./modules/IcePy/Util.h	2007-12-20 12:26:37.000000000 -0800
++++ ./modules/IcePy/Util.h	2007-12-21 16:59:17.000000000 -0800
 @@ -61,7 +61,7 @@
      void operator=(PyObject*);
      void operator=(const PyObjectHandle&);
@@ -607,7 +616,7 @@
  private:
 diff -ru ../IcePy-3.2.1.orig/test/Ice/servantLocator/AllTests.py ./test/Ice/servantLocator/AllTests.py
 --- ../IcePy-3.2.1.orig/test/Ice/servantLocator/AllTests.py	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/AllTests.py	2007-12-20 12:26:37.000000000 -0800
++++ ./test/Ice/servantLocator/AllTests.py	2007-12-21 16:59:17.000000000 -0800
 @@ -18,63 +18,108 @@
  
      try:
@@ -764,35 +773,9 @@
      print "testing servant locator...",
      sys.stdout.flush()
      base = communicator.stringToProxy("category/locate:default -p 12010 -t 10000")
-diff -ru ../IcePy-3.2.1.orig/test/Ice/servantLocator/Test.ice ./test/Ice/servantLocator/Test.ice
---- ../IcePy-3.2.1.orig/test/Ice/servantLocator/Test.ice	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/Test.ice	2007-12-20 12:26:37.000000000 -0800
-@@ -17,6 +17,10 @@
- {
- };
- 
-+exception TestImpossibleException
-+{
-+};
-+
- interface TestIntf
- {
-     void requestFailedException();
-@@ -27,6 +31,11 @@
-     void userException();
-     void pythonException();
- 
-+    void unknownExceptionWithServantException();
-+
-+    string impossibleException(bool throw) throws TestImpossibleException;
-+    string intfUserException(bool throw) throws TestIntfUserException, TestImpossibleException;
-+    
-     void shutdown();
- };
- 
 diff -ru ../IcePy-3.2.1.orig/test/Ice/servantLocator/TestAMD.ice ./test/Ice/servantLocator/TestAMD.ice
 --- ../IcePy-3.2.1.orig/test/Ice/servantLocator/TestAMD.ice	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/TestAMD.ice	2007-12-20 12:26:37.000000000 -0800
++++ ./test/Ice/servantLocator/TestAMD.ice	2007-12-21 16:59:17.000000000 -0800
 @@ -17,6 +17,10 @@
  {
  };
@@ -818,7 +801,7 @@
  
 diff -ru ../IcePy-3.2.1.orig/test/Ice/servantLocator/TestAMDI.py ./test/Ice/servantLocator/TestAMDI.py
 --- ../IcePy-3.2.1.orig/test/Ice/servantLocator/TestAMDI.py	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/TestAMDI.py	2007-12-20 12:26:37.000000000 -0800
++++ ./test/Ice/servantLocator/TestAMDI.py	2007-12-21 16:59:17.000000000 -0800
 @@ -38,6 +38,29 @@
      def pythonException_async(self, cb, current=None):
          cb.ice_response()
@@ -888,9 +871,35 @@
 +            raise Test.TestIntfUserException() # Yes, it really is meant to be TestIntfUserException.
 +        elif current.operation == "intfUserException":
 +            raise Test.TestImpossibleException() # Yes, it really is meant to be TestImpossibleException.
+diff -ru ../IcePy-3.2.1.orig/test/Ice/servantLocator/Test.ice ./test/Ice/servantLocator/Test.ice
+--- ../IcePy-3.2.1.orig/test/Ice/servantLocator/Test.ice	2007-08-08 12:00:54.000000000 -0700
++++ ./test/Ice/servantLocator/Test.ice	2007-12-21 16:59:17.000000000 -0800
+@@ -17,6 +17,10 @@
+ {
+ };
+ 
++exception TestImpossibleException
++{
++};
++
+ interface TestIntf
+ {
+     void requestFailedException();
+@@ -27,6 +31,11 @@
+     void userException();
+     void pythonException();
+ 
++    void unknownExceptionWithServantException();
++
++    string impossibleException(bool throw) throws TestImpossibleException;
++    string intfUserException(bool throw) throws TestIntfUserException, TestImpossibleException;
++    
+     void shutdown();
+ };
+ 
 diff -ru ../IcePy-3.2.1.orig/test/Ice/servantLocator/TestI.py ./test/Ice/servantLocator/TestI.py
 --- ../IcePy-3.2.1.orig/test/Ice/servantLocator/TestI.py	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/TestI.py	2007-12-20 12:26:37.000000000 -0800
++++ ./test/Ice/servantLocator/TestI.py	2007-12-21 16:59:17.000000000 -0800
 @@ -38,6 +38,27 @@
      def pythonException(self, current=None):
          pass

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071221/8e992055/attachment-0001.html


More information about the macports-changes mailing list