Re: ORBit2 and checking CORBA_Environent's



Owen Taylor <otaylor redhat com> writes:

> Well, except for the semi-random and hard-to-find bits, I think
> causing crashes in this circumstance is good. Perhaps we should always
> return, say, (CORBA_Object)0xbad in this case to get something that
> is:
>  
>  - reliably non-null
>  - In the first page, so segfaulting as fast as possible 
> 
> I don't think we should be encouraging people to write code that
> is invalid according to the CORBA spec.

Well, this isn't such a bad idea, but there's still a bug.

I'm not sure about this, but am I allowed to return an invalid pointer
from the implementation of a CORBA method if I raise an exception ?

====
CORBA_Object
impl_Foo (PortableServer_Servant servant, CORBA_Environment *ev)
{
        bonobo_exception_set (ev, ex_something);

        return 0xbad;
}
====

This currently crashes.

The problem is that AFAIK the following is allowed according to the spec:

=====
CORBA_Object
impl_Foo (PortableServer_Servant servant, CORBA_Environment *ev)
{
        return bonobo_get_object ("something", "something", ev);
}
====

-- 
Martin Baulig
martin gnome org (private)
baulig suse de (work)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]