[omniORB] Invalid pointer read/write errors

Sai-Lai Lo S.Lo@uk.research.att.com
23 Apr 1999 12:44:43 +0100


>>>>> Jonathan Buchanan writes:

> Hi,
> I am running omniORB 2.7.1 on Solaris 2.5.1 with SPARCWorks C++ compiler
> 4.2.

> I am doing some very simple stuff using a string sequence defined in IDL
> as:

> typedef sequence<string> MyStringSequence;

> I use this type for out parameters in some methods.  On the server side
> I dynamically allocate these sequences with new (ref OMG standard
> 20.13.3), as follows:

> // myData was passed as an out param, type MyStringSequence*&
> myData = new MyStringSequence( 12 );

By the way, the argument 12 only means that you create a sequence of string
with a maximum length of 12. You still have to call,
e.g. myData->length(5), to actually set the length of the sequence.

> It all works.  But... I ran it with Purify which produced some alarming
> errors for this statement:

As far as I can tell, these are spurious warnings from Purify. If you look
into this in detail, you'll see that the IPW occurs inside inline template
ctor and other inline template functions only. I'm inclined to think that
purify is confused when it comes to these inline template functions.

Now it may also be something more serious, such as a bug in your code :-)

Sai-Lai

-- 
Sai-Lai Lo                                   S.Lo@uk.research.att.com
AT&T Laboratories Cambridge           WWW:   http://www.uk.research.att.com 
24a Trumpington Street                Tel:   +44 223 343000
Cambridge CB2 1QA                     Fax:   +44 223 313542
ENGLAND