bugGNU Octave - Bugs: bug #49820, fseek fails for large (>4GByte...

 
 

bug #49820: fseek fails for large (>4GByte files)

Submitted by:  None
Submitted on:  Sat 10 Dec 2016 01:07:15 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Works For MeAssigned to: None
Originator Name: Pat GioanniniOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.2.0
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 26 Dec 2016 04:39:47 PM UTC, comment #2:

No response, closing report.

Rik <rik5>
Project Administrator
Sat 10 Dec 2016 04:10:00 PM UTC, comment #1:

It works for me:

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?

John W. Eaton <jwe>
Project Administrator
Sat 10 Dec 2016 01:07:15 PM UTC, original submission:

In file_io.cc the function for fseek contains the code:

The conversion from octave_value in the last line converts args(1) to an int (32bits) rather than an off_t (64 bits). I changed the last two lines of code to be:

I am not familiar enough with octal_value to know if this is really the best solution. However you must treat the offset parameter as a 64 bit (off_t) rather than 32 bits for fseek to work properly.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 26 Dec 2016 04:39:47 PM UTCrik5Open/ClosedOpen=>Closed
    Sat 10 Dec 2016 04:10:00 PM UTCjweStatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1