[FreeVMS] [Fwd: Andrews Update]
Andrew Allison
freevms at sympatico.ca
Mar 23 Aou 19:22:56 CEST 2005
On Tue, 2005-08-23 at 06:46, Roar Thronæs wrote:
> On Tue, Aug 16, 2005 at 11:39:58AM -0400, Andrew Allison wrote:
> >
> > I thought I would concentrate on dynamic for now, just for forward
> > progress. With rtl_str_test I did make some design considerations for
> > multiple descriptor types by putting a two character code for descriptor
> > type. Right know I not sure why I choose CD for dynamic descriptor and not
> > DD, momentary brain fade I think.
>
> How long before you look through the dynamic descriptors and find errors?
Being a true programer, I thought I had found all the errors with the
test programs. As usual the second set of eyes will find the obvious
mistakes.
>
> As of the current release, valgrind found something it did not like when
> running teststr.
I will have to download this program and see what it finds before
uploading code. I didn't recogonize Valgrind from the mailing list, good
thing for google.
>
> I have also got some problems with telnet crashing inside malloc, and
> that may be a sign of writing somewhere it should not.
Telnet crashing INSIDE malloc? I appologize, I haven't build FreeVMS for
a few releases. I working on getting the lastest version to build, hense
the gcc question and finding out what out ncsftp does.
>
> The following is a fix for what valgrind complained about.
>
> diff -u -r1.2 str_get1_dx.c
> --- librtl/src/str_get1_dx.c 29 Dec 2004 11:53:39 -0000 1.2
> +++ librtl/src/str_get1_dx.c 23 Aug 2005 10:37:24 -0000
> @@ -116,7 +116,8 @@
> DOSIGNAL(STR$_INSVIRMEM);
> return STR$_INSVIRMEM;
> }
> - for (i=0; i < *word_integer_length; i++)
> + int minlen = character_string->dsc$w_length < *word_integer_length ? character_string->dsc$w_length : *word_integer_length;
> + for (i=0; i < minlen; i++)
> new_memory[i] = character_string->dsc$a_pointer[i];
>
> free(character_string->dsc$a_pointer);
It looks like if charstring is shorter then new it will copy some junk
onto the end of the new descriptor. Now how did I miss that.
I noticed on, I think freshmeat that we have a new logo.
Andrew
Plus d'informations sur la liste de diffusion FreeVMS