MAP/MAP-INTO don't always check types when storing into typed arrays

Bug #1459581 reported by 3b
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

(map-into (make-array 1 :element-type '(signed-byte 16)) (constantly nil))
-> #(11) on x8664 windows 1.2.11.70, x8664 linux 1.2.10.49
-> #(2) on arm linux 1.2.7.54

expected error, NIL is not a (signed-byte 16)

(funcall (lambda (x)
           (map '(vector (signed-byte 16) 1) #'identity x))
 '(1.0))

-> #(12) on x8664 windows
-> "The value 1.0 is not of type (SIGNED-BYTE 16)" error on arm and x8664 linux

doesn't seem to be affected by SPEED or SAFETY declarations

Revision history for this message
3b (00003b) wrote :

seems to have been introduced in 892a8350afb02baabef38c4cba48c25a82d9d679 "widetag dispatch for MAP-INTO", which added some (safety 0) declarations, so MAP-INTO has been affected since 1.0.58.

(map-into (cons 1 2) (constantly 'foo))

 -> EXCEPTION_ACCESS_VIOLATION on windows
-> CORRUPTION WARNING ... SB-SYS:MEMORY-FAULT-ERROR on linux

is a test case for the LIST branch of the MAP-INTO code

Revision history for this message
Stas Boukarev (stassats) wrote :

In ff9e9d77a420ece50c15ab72bf016cb69c54fa08

Changed in sbcl:
status: New → Fix Committed
Revision history for this message
Stas Boukarev (stassats) wrote :

And the cons case in 1fcf535464c6b38b69cfcb0a9a77aa3178189441.

Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.