Custom Query (1030 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (502 - 504 of 1030)

Ticket Resolution Summary Owner Reporter
#645 fixed stream-read-ivector fails for non-byte ivectors Gary Byers Alexander Gavrilov
Description

This function is documented as accepting any ivector. However the actual behavior is quite different:

? (defvar arr (make-array 5 :element-type 'single-float))
ARR
? (with-open-file (s "/dev/zero" :direction :input :element-type '(unsigned-byte 8))
    (stream-read-ivector s arr 0 20))
> Error: 0 doesn't match array element type of #<VECTOR 5 type SINGLE-FLOAT, simple>.
> While executing: CCL::%IOBLOCK-BINARY-IN-IVECT, in process listener(1).

This is fixed by the following change, but it is obviously a very ugly hack that depends on the implementation details of the read function:

--- l1-streams.lisp     (revision 13365)                           
+++ l1-streams.lisp     (working copy)                             
@@ -2471,10 +2471,10 @@                                            
     (let* ((b (funcall rbf ioblock)))                             
       (if (eq b :eof)                                             
        (return (- i start)))                                      
-      (setf (uvref vector i) b)                                   
-      (incf i)                                                    
-      (decf need)                                                 
-      (let* ((idx (io-buffer-idx in))                             
+   ;   (setf (uvref vector i) b)                                  
+   ;   (incf i)                                                   
+   ;   (decf need)                                                
+      (let* ((idx (1- (io-buffer-idx in)))                        
             (count (io-buffer-count in))                          
             (avail (- count idx)))                                
        (declare (fixnum idx count avail))
#646 fixed %copy-ivector-to-ivector-bytes malfunctions on x86-64 Gary Byers Alexander Gavrilov
Description

If the source and destinations are the same:

CL-USER> arr2
#(1 2 3 4 5)
CL-USER> (ccl::%copy-ivector-to-ivector-bytes arr2 0 arr2 8 12)
#(1 2 1 2 1)

This appears to fix it:

--- x86-misc.lisp       (revision 13368)
+++ x86-misc.lisp       (working copy)
@@ -135,7 +135,7 @@
     (movq (@ src-offset (% rsp)) (% rsrc))
     (cmpq (% dest) (% rsrc))
     (jne @front)
-    (cmpq (% src-byte-offset) (% dest-byte-offset))
+    (cmpq (% rsrc-byte-offset) (% dest-byte-offset))
     (jg @back)
     @front
     (testq (% nbytes) (% nbytes))
#647 fixed Printed representation of RANDOM-STATE may not be readable on 32-bit platforms R. Matthew Emerson Gary Byers
Description

On Win32 (and likely other 32-bit platforms):

? (read-from-string (format nil "~a" (make-random-state)))
> Error: value 1267438753 is not of the expected type (INTEGER 0 (2147483647)).
> While executing: INITIALIZE-MRG31K3P-STATE, in process listener(1).
Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.