[gs-bugs] [Bug 691591] New: Ghostscript uses fseek() and ftell(), but it cannot handle file > 2Gibyte on i386

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Fri Sep 3 07:01:36 UTC 2010


http://bugs.ghostscript.com/show_bug.cgi?id=691591

           Summary: Ghostscript uses fseek() and ftell(), but it cannot
                    handle file > 2Gibyte on i386
           Product: Bug Tracker
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P4
         Component: General
        AssignedTo: support at artifex.com
        ReportedBy: appunti2 at gmail.com
         QAContact: gs-bugs at ghostscript.com
   Estimated Hours: 0.0


Hello,
I wuold like to work with PS file greater than 2 Gibytes, on i386 arch.
Ghostscript uses functions fseek() and ftell() for access files, and that means
that the index inside file is of type `long int', that is, on i386, int32_t.
This makes impossible to access data beyond 2 Gibytes.

To let Ghostscript work with bigger files, functions fseek() and ftell() might
be replaced with fseeko() and ftello(), so that the index inside the file would
be of type `off_t', adding the option `#define _FILE_OFFSET_BITS 64' for the
GNU C library.

I tried to look inside the code, to make such change, but there are some
modules that I don't understand and the whole is much complex. In particular, I
found that something that was related to the index inside the file, becomes
part of a `size_t' inside a memmove() (in that case, an `off_t' of 64 bits
could not be used, as `size_t' remains 32 bits).

So I am asking to consider, for a future release of Ghostscript, an adaptation,
replacing fseek() and ftell(), using off_t, considering that it might be
different from `long int' and `size_t'.

Thank you for your attention.
daniele giacomini

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list