#1422 GCC 4.5.0 libstdc++ lacks large file support

OTHER
open
gcc (462)
Bug
none
Unknown
True
2013-08-30
2010-04-19
John E.
No

In both of the recent GCC 4.5.0 releases, the fstreams library in libstdc++ will only use 32-bit pointers for all file operations, limiting usable file sizes to 2Gb in a majority of cases. This holds true for both 32-bit and 64-bit targets (the latter running under WOW64, of course). I've attached a testcase that demonstrates this limitation for seek functionality. When operating correctly, it will create an ~3Gb file and print the correct seek offset each line; when this bug appears, it will cap out at 2Gb and print "-1" as the seek offset thereafter.

I've also attached a patch that fixes the problem. It's been tested to work as expected in recent TDM-GCC releases. Rather than fixing the configury's LFS support detection, which might be a fairly involved process, it merely makes libstdc++ use different functions on the MINGW32 platform.

Discussion

  • John E.

    John E. - 2010-04-19

    mingw32 - Enable large file support

     
  • John E.

    John E. - 2010-04-19

    Test large file support

     
  • John E.

    John E. - 2010-04-19
    • summary: libstdc++ lacks large file support --> GCC 4.5.0 libstdc++ lacks large file support
     
  • Earnie Boyd

    Earnie Boyd - 2013-02-07
    • status: open --> closed
    • milestone: --> OTHER
    • type: --> Bug
    • resolution: --> out-of-date
    • category: --> Unknown
    • patch_attached: --> False
     
  • Keith Marshall

    Keith Marshall - 2013-08-30
    • status: closed --> open
    • assigned_to: Earnie Boyd
    • Resolution: out-of-date --> none
    • Patch attached: False --> True
     
  • Keith Marshall

    Keith Marshall - 2013-08-30

    According to this ML thread, this remains an issue in GCC-4.7.2, (and likely has not been resolved in upstream GCC-4.8). Reopened accordingly, and assigned to Earnie, (because I know you are pursuing a GCC-4.8 release).

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks