[omniORB] _CORBA_ObjRef_Element Self-assignment
Duncan Grisby
duncan at grisby.org
Tue Sep 22 17:47:32 BST 2009
On Friday 11 September, "Felix Nawothnig" wrote:
> The assignment operator in _CORBA_ObjRef_Element don't check for
> self-assignment - so I currently have a crash in the duplicate call() in
Yes, you're right. The code should check if the object reference in the
element is the same as the existing one, and not release it if so. I've
checked in the fix to svn.
[...]
> The _CORBA_ObjRef_Member::T_member& operator= (T_ptr p) implementation
> looks suspicious too... I wouldn't expect that by assigning the actually
> stored _ptr it now contains a freed (invalid) reference - but that might
> actually be okay.
There's nothing wrong with that. The member is required to take
ownership of the pointer it's given. If that leads to the object
reference being released, it's a bug in the application.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list