[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49820] fseek fails for large (>4GByte files)
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #49820] fseek fails for large (>4GByte files) |
Date: |
Sat, 10 Dec 2016 16:10:00 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
Update of bug #49820 (project octave):
Status: None => Works For Me
_______________________________________________________
Follow-up Comment #1:
It works for me:
octave:1> version
ans = 4.2.0
octave:2> fid = fopen ("big-file", "r")
fid = 21
octave:3> pos = 2^33
pos = 8.5899e+09
octave:4> fseek (fid, pos)
ans = 0
octave:5> ftell (fid)
ans = 8.5899e+09
octave:6> format long
octave:7> ftell (fid)
ans = 8589934592
octave:8> pos
pos = 8589934592
octave:9> quit
coredump:2311> ls -l big-file
-rw-r--r-- 1 jwe jwe 15172985856 Dec 10 11:00 big-file
In the DEFUN for fseek, it calls the function octave_stream::seek (const
octave_value& const octave_value&), which specifically unpacks the offset as a
64-bit value:
http://hg.savannah.gnu.org/hgweb/octave/file/691d81fc885b/libinterp/corefcn/oct-stream.cc#l6117
How is this failing for you?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49820>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/