On Mon, 16 Aug 1999, Gilles Detillieux wrote:
> Is this patch the bug fix in HtHeap you mentioned above? If so, it
> hasn't been committed to CVS yet. I found a couple minor problems in
No, I haven't committed it to CVS yet. I'm basically offline all this week
and I'm hoping I can get set up quickly in Chicago when I arrive this
weekend. I'm hoping my LinuxPPC CD will be there when I arrive so I can
get a development environment set up quickly.
> HtVector. In its Last and Index methods, it seemed to be overstepping
> the array bounds. I've also added some bounds checking to Last and Nth.
This could be the problem with the Heap code since it uses both. As I
said, I can believe there are bugs in these--I wrote them in the span of
maybe 2 hrs without as much testing as I like.
> - Object *Last() {return data[element_count];}
> + Object *Last() {return element_count<=0?(Object
>*)NULL:data[element_count-1];}
Doh. Of course... Serves me right for following the implementation I did
in Pascal...
> - Object *operator[] (int n) {return data[n];}
> - Object *Nth(int n) {return data[n];}
> + Object *operator[] (int n) {return
>(n<0||n>=element_count)?(Object *)NULL:data[n];}
> + Object *Nth(int n) {return
>(n<0||n>=element_count)?(Object *)NULL:data[n];}
..
> - while (index <= element_count && data[index] != obj)
> + while (index < element_count && data[index] != obj)
Yes, these are correct. I'd obviously appreciate it if you could commit
this, since I don't have access to a CVS tree.
> In any case, there are memory problems elsewhere.
I'll try to compile in LeakTracer when I get everything set up. It usually
does a good job of spotting places where memory gets clobbered. I'm a bit
suprised though because it works OK for me over HTTP.
In any case, I have a contract that will require me to clean up the 3.2
code by the end of the month, so I hope to take care of these problems.
(We can debate about whether the cleanup will result in 3.2.0b1 when we
get there.)
-Geoff
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.