file-position doesn't support large files on win32

Bug #1271545 reported by Salvatore Insalaco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

On 32-bit windows, file-position is limited by 32 bit offsets. Actually the windows implementation of seek in sbcl supports large offsets, but it's blocked by the ansi-stream-file-position type definition. On HEAD is:
  (declare (type (or index (alien sb!unix:off-t) (member nil :start :end))
                 position))
while it should be:
  (declare (type (or index (alien sb!unix:unix-offset) (member nil :start :end))
                 position))

sb-unix:unix-offset was introduced just for this particular case, but it's not actually used.

You can reproduce it with:
(file-position (open "test" :if-does-not-exist :create) 10000000000)

Tested with sbcl 1.1.12, 1.1.14 and HEAD on win32.

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

In 26d918bc648eaf5b1914eb2ac4f278a757d18fca, sorry for the delay.

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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