[Ace-users] [tao-users] TAO_AMH_DSI_Exception_Holder usage ...clarification requested

Phil Mesnier mesnier_p at ociweb.com
Wed Nov 7 22:36:46 CST 2007


Hi Doug,

Sure, this is something we added in support of combined dynamic-asynch 
middle tier applications. I worked with Venkat of IDEngines a couple of 
weeks ago related to this code, see bug 3093. I'm not sure if this is 
the same Venkat.

I think the AMH_DSI Exception Holder impl needs to be redone using 
templates that are used by generated AMH Exception Holders. I tried a 
quick stab at that a couple of weeks ago but encountered crashes so I 
had to back out my changes.

Thanks for bringing this to my attention. I will investigate and 
followup as soon as I can.

-Phil

Douglas C. Schmidt wrote:
> Hi Phil,
> 
>    Is this something that you or the OCI team knows anything about?!
>    
>    Thanks,
>    
>         Doug
> 
> 
>>Hello TAO team,
>>
>>Following is the PRF details for the problem:
>>
>>TAO VERSION: 1.6.1
>>ACE VERSION: 5.6.1
>>
>>HOST MACHINE and OPERATING SYSTEM:
>>amd64, NetBSD 3.1
>>
>>TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
>>same
>>THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
>>specific file, simply state which one]:
>>config-netbsd.h
>>
>>THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE :
>>platform_netbsd.GNU
>>CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
>>ssl=1
>>
>>AREA/CLASS/EXAMPLE AFFECTED:
>>COMPILATION? No
>>LINKING? No
>>EXECUTION? No
>>
>>SYNOPSIS:
>>
>>   Incorrect usage or memory leak of TAO_AMH_DSI_Exception_Holder?
>>
>>DESCRIPTION:
>>
>>Example: TAO/tests/DSI_AMI_Gateway/My_DII_Reply_Handler.cpp
>>
>>void
>>My_DII_Reply_Handler::handle_response(TAO_InputCDR &incoming)
>>{   .............
>>
>>  TAO_AMH_DSI_Exception_Holder h (new CORBA::UNKNOWN());  // Heap
>>allocated
>>   response_handler_->invoke_excep(&h);
>>
>>BUT  it is not released by the holder;
>>
>>TAO/tao/DynamicInterface/AMH_DSI_Response_Handler.*
>>
>>TAO_AMH_DSI_Exception_Holder::TAO_AMH_DSI_Exception_Holder
>>(CORBA::Exception *ex)
>> : exception_ (ex)
>>
>>
>>private:
>> TAO_AMH_DSI_Exception_Holder (const TAO_AMH_DSI_Exception_Holder &);
>> void operator= (const TAO_AMH_DSI_Exception_Holder &);
>> CORBA::Exception *exception_;
>>
>>--------------
>>It is not clear what is the right usage. If the Holder is not supposed
>>to release it, then test code has a memory leak. This seems to be the
>>problem. But if the lifetime of the exception held by the Holder is
>>beyond the creation, then Holder has incorrect implementation.
>>
>>Pls. clarify which one is the right interpretation?
>>
>>REPEAT BY:
>>SAMPLE FIX/WORKAROUND:
>>
>>Thanks
>>Venakt
>>
> 
> 
> 

-- 
Phil Mesnier
Principal Software Engineer,    http://www.ociweb.com
Object Computing, Inc.          +01.314.579.0066



More information about the Ace-users mailing list