Steel Bank Common Lisp

read-byte is inlined

Reported by Stas Boukarev on 2010-04-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

Due to (declaim (inline read-byte)) in src/code/load.lisp read-byte becomes inlined, which causes problems:

(with-open-file (stream "/dev/zero" :element-type 'unsigned-byte)
    (declare (file-stream stream))
    (read-byte stream))
The stream #<SB-SYS:FD-STREAM for "file /dev/zero" {A9572D9}> has no suitable method for STREAM-READ-BYTE

I attached a patch, which declaims read-byte notinline at the end of load.lisp

Stas Boukarev (stassats) wrote :
Paul Khuong (pvk) wrote :

With denormals, the range of negative exponents is different than that of positive ones. I'm fairly certain the patch above will let some infinities through, but slightly larger exponents will result in read-time errors.

Paul Khuong (pvk) wrote :
Stas Boukarev (stassats) on 2010-04-27
Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers