bugKawa - Bugs: bug #4310, share-array edge case

 
 

bug #4310: share-array edge case

Submitted by:  Chris Dean <ctdean>
Submitted on:  Tue 15 Jul 2003 05:05:39 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 17 Jul 2003 04:35:26 AM UTC, comment #5:

Just a test to see if this gets sent to bug-kawa@gnu.org.

Per Bothner <bothner>
Project Administrator
Wed 16 Jul 2003 02:45:17 PM UTC, comment #4:

Thanks. I checked in the fixed, as well as your (slightly modified) testcases.

Per Bothner <bothner>
Project Administrator
Tue 15 Jul 2003 07:50:57 PM UTC, comment #3:

Thanks, that worked. I've attached a patch with some testsuite tests.

Chris Dean <ctdean>
Tue 15 Jul 2003 06:46:05 PM UTC, comment #2:

Ok, this time (hopefully) with the patch.

Per Bothner <bothner>
Project Administrator
Tue 15 Jul 2003 06:30:43 PM UTC, comment #1:

Could you try the attached patch?
Perhaps if you could write some more testcases to test edge cases, including one-width dimensions and rank 0 arrays?

Per Bothner <bothner>
Project Administrator
Tue 15 Jul 2003 05:05:39 AM UTC, original submission:

I can get a IndexOutOfBoundsException when using share-array. When
one of the dimensions in the target array shape has an extent of
length == 1 we seem to be asking for one more index than is available:

<pre>
(share-array (make-array (shape 0 1 0 1))
(shape 0 1)
(lambda (i)
(format #t "Asking for index ~S~%" i) (values i i)))

java.lang.IndexOutOfBoundsException
at gnu.lists.GeneralArray.getEffectiveIndex(GeneralArray.java:89)
at gnu.kawa.functions.Arrays.effectiveIndex(Arrays.java:84)
</pre>

Chris Dean <ctdean>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #540:  array-testsuite.patch added by ctdean (2KiB - application/octet-stream - Testsuite patch)
file #515:  Arrays.patch added by bothner (3KiB - application/octet-stream - suggested fix)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Wed 16 Jul 2003 02:45:16 PM UTCbothnerOpen/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1