Re: Bug in ARRAY2/ARRAY3 garbage collection
Guillaume Lemaître <[email protected]> Thu, 28 Dec 2006 17:06:24 +0100
| Newsgroups | gmane.comp.lang.eiffel.smalleiffel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------070504030609040201070801 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Guillaume Lemaître a écrit : > Hello > > I tried to submit this bug directly to bugzilla, but the server was not > able to send me a new password. > > The following program shows the problem. It exists both for ARRAY2 and > ARRAY3, but not for ARRAY. I'm currently using 12/27 snapshot. > > Regards, > Guillaume > Here are the patches I apply, it seems to work. It is a typic "off by one" bug. Regards, Guillaume --------------070504030609040201070801 Content-Type: text/plain; name="patch_bug_array2.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_bug_array2.txt" diff -Naur SmartEiffel/lib/storage/collection2/array2.e SmartEiffel_patch/lib/storage/collection2/array2.e --- SmartEiffel/lib/storage/collection2/array2.e 2006-12-28 16:58:17.000000000 +0100 +++ SmartEiffel_patch/lib/storage/collection2/array2.e 2006-09-20 04:23:06.000000000 +0200 @@ -367,9 +367,9 @@ i: INTEGER do from - i := count - 1 + i := count until - i < 0 + i < 1 loop mark_item(storage, i) i := i - 1 --------------070504030609040201070801 Content-Type: text/plain; name="patch_bug_array3.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_bug_array3.txt" diff -Naur SmartEiffel/lib/storage/collection3/array3.e SmartEiffel_patch/lib/storage/collection3/array3.e --- SmartEiffel/lib/storage/collection3/array3.e 2006-12-28 16:58:17.000000000 +0100 +++ SmartEiffel_patch/lib/storage/collection3/array3.e 2006-09-20 04:23:06.000000000 +0200 @@ -362,9 +362,9 @@ i: INTEGER do from - i := count - 1 + i := count until - i < 0 + i < 1 loop mark_item(storage, i) i := i - 1 --------------070504030609040201070801--