[omniORB] crash in _NP_alignedSize
Duncan Grisby
dgrisby@uk.research.att.com
Fri, 30 Nov 2001 10:18:21 +0000
On Thursday 29 November, garfield-omniorb@irving.iisd.sra.com wrote:
[...]
> My C++ servant implementation returns 0. Something like:
>
> class B_impl : ..... {
> A *op(void) { return 0; }
> };
>
> This causes a segmentation violation in the function _NP_alignedSize
> of the structure's implementation. I have tried this with both the
> 3.0.4 release and with the omni3_develop cvs branch.
>
> My question is: is this a bug in omniORB or am I performing an illegal
> operation. If the later, can you give me a reference as to where it
> is declared illegal?
It is illegal. You must never return null pointers from CORBA
operations. See section 1.22 of the C++ mapping, where it says:
"...A callee may not return a null pointer under any of the
following circumstances:
* out and return variable-length struct
...
"
This is on page 105 of http://www.omg.org/cgi-bin/doc?ptc/2001-06-07
Cheers,
Duncan.
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --