[omniORB] crash when transmitting NULL pointer in IDL method parm
Duncan Grisby
duncan@grisby.org
Fri Nov 29 13:44:00 2002
On Friday 29 November, Hartmut Raschick wrote:
> NotificationClient_ptr cbObj = NULL;
> ...
> howDidItGo = topoIF->setAttr(objAddr, attrIDList, rwModes,
> aValUnionList, cbObj, trxID);
> ...
> --snap---------------------------------------------------
> this crashes because no-one tests for cbObj (not) being NULL
Null is not a valid nil object reference. As others have pointed out,
you should use NotificationClient::_nil().
omniORB 3 used to be lenient and allow a null pointer; omniORB 4 is
not. What do people think? Should it accept null? If so, should it
emit a warning that it's wrong?
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan@grisby.org --
-- http://www.grisby.org --