Re: (no subject)



On Thu, 30 Nov 2000, Colm Smyth wrote:

> CDR_buffer_putn(CDR_Codec *codec, void *datum, int bsize)
> {
> #ifdef PURIFY
>  	unsigned int forward = (unsigned long)ALIGN_ADDRESS(codec->wptr,
> bsize);
> 	while (forward > codec->wptr)
> 		codec->buffer[codec->wptr++] = '\0';
> #else
> 	codec->wptr = (unsigned int)ALIGN_ADDRESS(codec->wptr, bsize);
> #endif
>
> (as an aside, I changed the unsigned long cast to unsigned int to match
> the declaration of CDR_Codec.wptr.
>
> In a dbx-purify run of some test programs, only one other warning is
> reported because of the deliberate use of uninitialised data in
> genrand_unix().
>
> It's very nice to see that ORBit is very clean ;) but more importantly
> if this fix is accepted, it's easier to purify applications based
> on ORBit.

I have put basically this patch into the orbit-stable-0-5 branch in CVS -
the change will be in version 0.5.5.

> By the way, I wonder if the alignment is strictly necessary since data is
> always copied byte-wise to and from a CDR_Codec buffer.

The alignment is for the CDR stream, not to facilitate local machine usage
(well, that's partially false - the CDR alignment rules exist to
facilitate local machine usage).

-- Elliot
"The Pythagorean Theorem employed 24 words, the Lord's Prayer has 66 words,
Archimedes Principle has 67 words, the 10 Commandments have 179 words, the
Gettysburg Address had 286 words, the Declaration of Independence, 1,300 words and
finally the European Commission's regulation on the sale of cabbage: 26,911 words."








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