[omniORB] HPUX/PA-RISC 64-bits porting

Andrew Novikov anovikov at artezio.ru
Thu Apr 22 17:53:23 BST 2004


Hello,

> connectionState* cs =  new connectionState(conn,s);
> 
> connectionState** head = &(pd_connectionState[((omni::ptr_arith_t)conn)%
> 						connectionState::hashsize]);
> cs->next = *head;
> *head = cs;
> 
> The code above produces an endless loop in the
> omni::omniInterceptorP::clientSendRequest (a list) and it causes
> omni::omniInterceptorP::visit() in giopImpl12::marshalRequestHeader() to
> segfault. Strange is the fact that such a situation never occurs on
> Linux...
> So, what is the purpose of giopServer::csInsert() and why does it behave
> so strange?

I figured out why this happens. The problem is caused by the wrong
(IMHO) type of the omni::ptr_arith_t - it is signed. Considering that
user address space on HP-UX is located near the upper border,
((omni::ptr_arith_t)conn)%connectionState::hashsize gives a negative
offset. I attached a patch with the fix.

Regards,
Andrew Novikov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ptr_arith_t.patch
Type: text/x-patch
Size: 569 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20040422/0208b742/ptr_arith_t.bin


More information about the omniORB-list mailing list