bug-kawa
[Top][All Lists]
Advanced

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

[Bug-kawa] [bug #4310] share-array edge case


From: nobody
Subject: [Bug-kawa] [bug #4310] share-array edge case
Date: Thu, 17 Jul 2003 00:35:26 -0400
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030612

=================== BUG #4310: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4310&group_id=145

Changes by: Per Bothner <address@hidden>
Date: Thu 07/17/2003 at 04:35 (GMT)

------------------ Additional Follow-up Comments ----------------------------
Just a test to see if this gets sent to address@hidden



=================== BUG #4310: FULL BUG SNAPSHOT ===================


Submitted by: ctdean                  Project: Kawa                         
Submitted on: Tue 07/15/2003 at 05:05
Category:  None                       Severity:  5 - Major                  
Bug Group:  None                      Resolution:  None                     
Assigned to:  None                    Status:  Closed                       

Summary:  share-array edge case

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>


Follow-up Comments
*******************

-------------------------------------------------------
Date: Thu 07/17/2003 at 04:35       By: bothner
Just a test to see if this gets sent to address@hidden

-------------------------------------------------------
Date: Wed 07/16/2003 at 14:45       By: bothner
Thanks.  I checked in the fixed, as well as your (slightly modified) testcases.

-------------------------------------------------------
Date: Tue 07/15/2003 at 19:50       By: ctdean
Thanks, that worked.  I've attached a patch with some testsuite tests.

-------------------------------------------------------
Date: Tue 07/15/2003 at 18:46       By: bothner
Ok, this time (hopefully) with the patch.

-------------------------------------------------------
Date: Tue 07/15/2003 at 18:30       By: bothner
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?


CC list is empty


File Attachments
****************

-------------------------------------------------------
Date: Tue 07/15/2003 at 19:50  Name: array-testsuite.patch  Size: 1KB   By: 
ctdean
Testsuite patch
http://savannah.gnu.org/bugs/download.php?group_id=145&amp;bug_id=4310&amp;bug_file_id=537

-------------------------------------------------------
Date: Tue 07/15/2003 at 18:46  Name: Arrays.patch  Size: 2KB   By: bothner
suggested fix
http://savannah.gnu.org/bugs/download.php?group_id=145&amp;bug_id=4310&amp;bug_file_id=536


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4310&group_id=145

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]