Re: in-kernel ORBit2 works



hi,Michael
> 
> > .....
> >  buf->msg.u.request_1_2.service_context._buffer = NULL;
> >   if(giop_IOP_ServiceContextList_demarshal(buf, &buf->msg.u.request_1_2.service_context))
> >     return TRUE;
> >   buf->cur = ALIGN_ADDRESS(buf->cur, 8);
> >   buf->cur +=4;/*<---------------* here, i dont know why must plus 4/
> >   return FALSE;
> > }
> >
> > if buf->cur dont plus 4, the params decode error value,use echoString for example,
> 
> It looks like an offset problem somewhere; are you sure that on the
> marshaling side that you are allocating memory aligned to 8 byte
> boundaries ? it's possible that your malloc is returning it aligned to 4
> byte boundaries, since alignof (double) is only 4 on intel; but ... the
> ORB assumes the memory returned by malloc will be 8 byte aligned [ quite
> possibly - this is something we should work on / check. ].

yes, i also think it's a alignment problem, because my configure script in orbit2

didnt work properly, i copy this section of orbit-config.h from orbit 0.5.12 's:

#define ORBIT_ALIGNOF_CORBA_OCTET        1
#define ORBIT_ALIGNOF_CORBA_BOOLEAN      1
#define ORBIT_ALIGNOF_CORBA_CHAR         1
#define ORBIT_ALIGNOF_CORBA_WCHAR        2
#define ORBIT_ALIGNOF_CORBA_SHORT        2
#define ORBIT_ALIGNOF_CORBA_LONG         4
#define ORBIT_ALIGNOF_CORBA_LONG_LONG    4
#define ORBIT_ALIGNOF_CORBA_FLOAT        4
#define ORBIT_ALIGNOF_CORBA_DOUBLE       4
#define ORBIT_ALIGNOF_CORBA_LONG_DOUBLE  4
#define ORBIT_ALIGNOF_CORBA_STRUCT       1
#define ORBIT_ALIGNOF_CORBA_POINTER      4

is it right?

regards
                                                        dou wen


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