[omniORB] Bug in DSI - data caching in anyP

Paul Haesler omniorb at phaesler.org
Tue Sep 21 20:35:46 BST 2004


Hi,

I have found a problem with omniORB's DSI interface.

If you have an NVList cached from a previous invocation of
a particular operation, and you populate it with the current
invocation's arguments using 

	ServerRequest::arguments(NVList_ptr)

the cached data in the underlying anyP is NOT cleared when
the new data is unmarshalled in.  This means that a subsequent
extraction will yield the argument value from a previous
invocation, not the current invocation.  A second Any 
initialised by assignment from the corrupt Any will be 
correct because data cache is not copied.

I fixed the problem by adding the following code to the inline
function anyP::copyFrom(cdrStream &) in internal/anyP.h:

	if (pd_cached_data_ptr != 0)
       pd_cached_data_destructor(pd_cached_data_ptr);
      pd_cached_data_ptr = 0;

--
Paul Haesler

    "We are the Steely-Pips and we have no fear, no
     spats in our vats, no rules, no schools, no gloom,
     no evil influence of the moon, for we have a machine,
     a dream of a machine, with springs and gears and 
     perfect in every respect."

     Stanislaw Lem, The Cyberiad (Trurl's Prescription)



More information about the omniORB-list mailing list