Re: BUG? arrays are not recognized as such
- From: Michael Meeks <michael ximian com>
- To: Michael Kohl <Michael Kohl hp com>
- Cc: orbit <orbit-list gnome org>
- Subject: Re: BUG? arrays are not recognized as such
- Date: Sat, 04 Dec 2004 11:31:58 +0000
Hi Michael,
On Wed, 2004-11-24 at 15:01 +0100, Michael Kohl wrote:
> I've looked into ORBit2 for some few months now, so please correct me if
> my assumptions are wrong.
Sounds like you have your head screwed on well :-)
> I have reduced my problem to the following case.
What _really_ helps here is a patch to ORBit2/test/everything/* that
adds a method that exercises this code-path. AFAIR the array code is
under-used in Gnome & I guess doesn't get as much testing as much of the
other code, so I can believe it's sub-optimal. Mostly we use sequences
instead :-)
> Now within the server I will get a pointer to something, which is not
> test_CharacterSet. Since this is a fixed structure and an inout
> parameter, the skeleton will have allocated the space and copied the
> parameter into it.
Right; although this is all done generically using type information, as
I guess you know;
> But the amount of the allocated space is not
> correct. The ORBit_gather_alloc_info() function in
> src/orb/orb-core/corba-any.c is summing up each element of the structure
> + aligning. But for "lowercase" it calculates only 1 byte (CORBA_tk_char
> instead of CORBA_tk_array)!
Oh - that's pretty odd; why does 'lowercase' not have CORBA_tk_array ?
sounds like some IDL compiler breakage or somesuch ?
> And thus, accessing ISOName (btw. the size
> for this was correct) will give me a segmentation violation.
Right.
> Now my questions:
> - Are my assumptions incorrect and this is not valid IDL syntax? I went
> forth and back in the "OMG IDL Syntax and Semantics" document and I
> think this is valid.
No idea - it looks reasonable though.
> - Or is this a bug? Which can easily be fixed? By whom? When? Where?
> I'm not able to fix it, I'm lost in (source code) space :-)
The 1st thing is: create a patch to the regression tests, then it can
be easily repeated [ for every subsequent release / check-in ] - usually
trivial to fix; as you say, the code is ~all in corba-any.c to do
~everything interesting in this area. If the typecode is right, the bug
is there, otherwise perhaps it's in the IDL compiler :-)
> Hope somebody can clarify things,
Sorry for the delay; hope that helps,
Regards,
Michael.
--
michael meeks novell com <><, Pseudo Engineer, itinerant idiot
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]