file-position doesn't support large files on win32

Bug #1271545 reported by Salvatore Insalaco on 2014-01-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone

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))
while it should be:
  (declare (type (or index (alien sb!unix:unix-offset) (member nil :start :end))

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.

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

Other bug subscribers