diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-12-08 09:29:47 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-12-08 09:29:47 +0100 |
commit | 79493bae22675e03dd764480a00abc173ed7c694 (patch) | |
tree | 23216557b975d0494c52b5b131c1ff39eb39b981 /cpp/src/slice2cpp/Gen.cpp | |
parent | 4350 - cpp/demo/Ice/plugin fails to run if `.' isn't in LD_LIBRARY_PATH (diff) | |
download | ice-79493bae22675e03dd764480a00abc173ed7c694.tar.bz2 ice-79493bae22675e03dd764480a00abc173ed7c694.tar.xz ice-79493bae22675e03dd764480a00abc173ed7c694.zip |
Fixed bug 4400 - crash in test/Ice/slicing/objects
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 1a40799f4ac..54a844734b5 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -2702,6 +2702,15 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) if(p->returnsData()) { C << nl << "::Ice::AsyncResult::__check(__result, this, " << flatName << ");"; + + // + // COMPILERBUG: It's necessary to generate the allocate code here before + // this if(!__result->wait()). If generated after this if block, we get + // access violations errors with the test/Ice/slicing/objects test on VC9 + // and Windows 64 bits when compiled with optimization (see bug 4400). + // + writeAllocateCode(C, ParamDeclList(), ret, p->getMetaData(), _useWstring | TypeContextAMIEnd); + C << nl << "if(!__result->__wait())"; C << sb; C << nl << "try"; @@ -2733,7 +2742,6 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) C << nl << "throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());"; C << eb; C << eb; - writeAllocateCode(C, ParamDeclList(), ret, p->getMetaData(), _useWstring | TypeContextAMIEnd); C << nl << "::IceInternal::BasicStream* __is = __result->__getIs();"; if(ret || !outParams.empty()) { |