gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] make-array rank check


From: Camm Maguire
Subject: Re: [Gcl-devel] make-array rank check
Date: 07 Jun 2004 10:51:53 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings, and thanks for this!

Am committing to cvs head now.

1) It would appear that as 2.6.2 has already entered the final testing
   phase, that we should not backport into the stable branch, as there
   are doubtless many other such instances which we have not yet
   discovered.  I think we need to close the chapter on 2.6.2 as
   quickly as possible, and move attention to the 2.7.x branch.  Any
   objections? 

2) Am leaving the ansi-test code alone for the moment, as I am more
   comfortable when Paul makes edits in this area.  But beyond this,
   should we not just increase the rank limit to 1024?  I suppose the
   spec is silent on such matters?  This, like function call argument
   limits, is a member of a substantial class of arbitrary
   restrictions on GCL internals which I'd like to eliminate if
   possible if for no other reason to reduce future maintenance.  You
   can see the earlier discussion of libffi support for ideas on
   treatment of the latter example.

Take care,

Michael Koehne <address@hidden> writes:

> Moin Camm & Paul,
> 
>   I told that the implemention of io-syntax in write-to-string showed
>   a nasty GCL crash (core dumped ;) - the first solution, to reduce the
>   rank of the dimensions, had been right. But Paul is of course true,
>   that the bug is still there. Please backport the following side track
>   from my patch to GCL 2.6.2 :
> 
>   make-array has to check for rank :
> 
> *** ../gcl-cvs/./o/array.c    Tue Jun  1 00:35:07 2004
> --- ./o/array.c       Fri Jun  4 02:01:25 2004
> *************** DEFUN_NEW("MAKE-ARRAY1",object,fSmake_ar
> *** 530,535 ****
> --- 530,537 ----
>          object dimensions),"")
>   {   
>     int rank = length(dimensions);
> +   if (rank > ARRAY_RANK_LIMIT)
> +       FEerror("Array rank limit exceeded.",0);
>     { object x,v;
>       char *tmp_alloc;
>       int dim =1,i; 
> 
>   ansi-tests should know about GCL's limitations :
> 
> *** ../gcl-cvs/./ansi-tests/print-array.lsp   Tue May 25 15:05:07 2004
> --- ./ansi-tests/print-array.lsp      Fri Jun  4 04:09:33 2004
> ***************
> *** 416,422 ****
>   
>   (deftest print.array.multi-dim.1
>     (with-standard-io-syntax
> !    (loop for d in '(4 5 6 7 8 9 10 12 16 20 30 40 100 200 400 600 800 1023)
>        for dims = (make-list d :initial-element 1)
>        for a = (make-array dims :initial-element 0)
>        for result = (with-standard-io-syntax
> --- 416,424 ----
>   
>   (deftest print.array.multi-dim.1
>     (with-standard-io-syntax
> !    (loop for d in
> !          #-gcl'(4 5 6 7 8 9 10 12 16 20 30 40 100 200 400 600 800 1023)
> !          #+gcl'(4 5 6 7 8 9 10 12 16 20 30 40 50 63) ; max rank for GCL
>        for dims = (make-list d :initial-element 1)
>        for a = (make-array dims :initial-element 0)
>        for result = (with-standard-io-syntax
> ***************
> *** 433,439 ****
>   
>   (deftest print.array.multi-dim.2
>     (with-standard-io-syntax
> !    (loop for d = (+ 4 (random 1020))
>        for p = (random d)
>        for dims = (let ((list (make-list d :initial-element 1)))
>                     (setf (elt list p) 0)
> --- 435,442 ----
>   
>   (deftest print.array.multi-dim.2
>     (with-standard-io-syntax
> !    (loop for d = (+ 4 #+gcl(random 59) ; max rank 63 for GCL
> !                   #-gcl(random 1020))
>        for p = (random d)
>        for dims = (let ((list (make-list d :initial-element 1)))
>                     (setf (elt list p) 0)
> 
> bye Michael
> -- 
>   mailto:address@hidden             UNA:+.? 'CED+2+:::Linux:2.4.22'UNZ+1'
>   http://www.xml-edifact.org/           CETERUM CENSEO WINDOWS ESSE DELENDAM
> 
> 
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gcl-devel
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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