From: SourceForge.net <no...@so...> - 2004-06-29 08:59:00
|
Bugs item #981828, was opened at 2004-06-29 08:58 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=981828&group_id=2435 Category: gcc Group: Known bugs Status: Open Resolution: None Priority: 5 Submitted By: RA (ra04) Assigned to: Danny Smith (dannysmith) Summary: C++ streams support for files >4GB - seek broken Initial Comment: Hello all, my program needs big file support for C++ file streams. Different GCC versions have had problems with this: GCC 2.95: Big files worked under Linux, Windows untested GCC 3.0 to 3.3: Big files broken for C++ as a whole GCC 3.4: Big files work under Linux, broken with the mingw RC (gcc-g++-3.4.0-20040501-1.tar.gz) With the mingw RC, my program can create files larger than 4 GB, but something is still broken, I think seeking with offsets >4 GB might be the problem. The small program at the end of this mail, when compiled with the mingw RC and executed on a mounted network drive (huge 1.5 TB Windows fileserver), prints: -1 strerror: No error Note that it does not print "64" - that would have indicated that the seek offsets are taken modulo 2^32. The correct output is "63". Can you provide a fix for this problem? Cheers, Richard ---------------------------------------------------------------- #include <fstream> #include <iostream> #include <string.h> using namespace std; int main() { fstream f("testfile", ios::binary|ios::in|ios::out|ios::trunc); #ifdef __MINGW32__ unsigned long long left = 0x100001000ULL; char buf[4096]; memset(buf, 0, 4096); f.write(buf, 4096); f.write("YADA@YADA!", 10); // 64 aka '@' at 0x1004 f.write(buf, 4096 - 10); left -= 8192; while (left > 0) { f.write(buf, 4096); left -= 4096; } #else f.seekp(0x100001000ULL); #endif f.write("YADA?YADA!", 10); f.seekg(0x100001004ULL); cout << f.get() << endl; // Should print 63 for the '?' at 0x100001004 cout << "strerror: " << strerror(errno) << endl; } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=981828&group_id=2435 |
From: SourceForge.net <no...@so...> - 2004-06-29 09:10:08
|
Bugs item #981828, was opened at 2004-06-29 20:58 Message generated for change (Comment added) made by dannysmith You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=981828&group_id=2435 Category: gcc Group: Known bugs Status: Open Resolution: None Priority: 5 Submitted By: RA (ra04) Assigned to: Danny Smith (dannysmith) Summary: C++ streams support for files >4GB - seek broken Initial Comment: Hello all, my program needs big file support for C++ file streams. Different GCC versions have had problems with this: GCC 2.95: Big files worked under Linux, Windows untested GCC 3.0 to 3.3: Big files broken for C++ as a whole GCC 3.4: Big files work under Linux, broken with the mingw RC (gcc-g++-3.4.0-20040501-1.tar.gz) With the mingw RC, my program can create files larger than 4 GB, but something is still broken, I think seeking with offsets >4 GB might be the problem. The small program at the end of this mail, when compiled with the mingw RC and executed on a mounted network drive (huge 1.5 TB Windows fileserver), prints: -1 strerror: No error Note that it does not print "64" - that would have indicated that the seek offsets are taken modulo 2^32. The correct output is "63". Can you provide a fix for this problem? Cheers, Richard ---------------------------------------------------------------- #include <fstream> #include <iostream> #include <string.h> using namespace std; int main() { fstream f("testfile", ios::binary|ios::in|ios::out|ios::trunc); #ifdef __MINGW32__ unsigned long long left = 0x100001000ULL; char buf[4096]; memset(buf, 0, 4096); f.write(buf, 4096); f.write("YADA@YADA!", 10); // 64 aka '@' at 0x1004 f.write(buf, 4096 - 10); left -= 8192; while (left > 0) { f.write(buf, 4096); left -= 4096; } #else f.seekp(0x100001000ULL); #endif f.write("YADA?YADA!", 10); f.seekg(0x100001004ULL); cout << f.get() << endl; // Should print 63 for the '?' at 0x100001004 cout << "strerror: " << strerror(errno) << endl; } ---------------------------------------------------------------------- >Comment By: Danny Smith (dannysmith) Date: 2004-06-29 21:09 Message: Logged In: YES user_id=11494 Yes. I've got a fix for next RC. It will probably mean that although std stream classes will work with large files with current mingw runtime, the use of the extension class __gnu_cxx::stdio_sync_filebuf will require a newer (yet to be released) libmingwex.a Danny ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=981828&group_id=2435 |
From: SourceForge.net <no...@so...> - 2004-06-29 11:25:04
|
Bugs item #981828, was opened at 2004-06-29 04:58 Message generated for change (Comment added) made by earnie You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=981828&group_id=2435 Category: gcc Group: Known bugs Status: Open Resolution: None Priority: 5 Submitted By: RA (ra04) Assigned to: Danny Smith (dannysmith) Summary: C++ streams support for files >4GB - seek broken Initial Comment: Hello all, my program needs big file support for C++ file streams. Different GCC versions have had problems with this: GCC 2.95: Big files worked under Linux, Windows untested GCC 3.0 to 3.3: Big files broken for C++ as a whole GCC 3.4: Big files work under Linux, broken with the mingw RC (gcc-g++-3.4.0-20040501-1.tar.gz) With the mingw RC, my program can create files larger than 4 GB, but something is still broken, I think seeking with offsets >4 GB might be the problem. The small program at the end of this mail, when compiled with the mingw RC and executed on a mounted network drive (huge 1.5 TB Windows fileserver), prints: -1 strerror: No error Note that it does not print "64" - that would have indicated that the seek offsets are taken modulo 2^32. The correct output is "63". Can you provide a fix for this problem? Cheers, Richard ---------------------------------------------------------------- #include <fstream> #include <iostream> #include <string.h> using namespace std; int main() { fstream f("testfile", ios::binary|ios::in|ios::out|ios::trunc); #ifdef __MINGW32__ unsigned long long left = 0x100001000ULL; char buf[4096]; memset(buf, 0, 4096); f.write(buf, 4096); f.write("YADA@YADA!", 10); // 64 aka '@' at 0x1004 f.write(buf, 4096 - 10); left -= 8192; while (left > 0) { f.write(buf, 4096); left -= 4096; } #else f.seekp(0x100001000ULL); #endif f.write("YADA?YADA!", 10); f.seekg(0x100001004ULL); cout << f.get() << endl; // Should print 63 for the '?' at 0x100001004 cout << "strerror: " << strerror(errno) << endl; } ---------------------------------------------------------------------- >Comment By: Earnie Boyd (earnie) Date: 2004-06-29 07:25 Message: Logged In: YES user_id=15438 Let me know when you plan to release. I'll upload a new mingw-runtime release. ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2004-06-29 05:09 Message: Logged In: YES user_id=11494 Yes. I've got a fix for next RC. It will probably mean that although std stream classes will work with large files with current mingw runtime, the use of the extension class __gnu_cxx::stdio_sync_filebuf will require a newer (yet to be released) libmingwex.a Danny ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=981828&group_id=2435 |
From: SourceForge.net <no...@so...> - 2004-07-26 10:52:55
|
Bugs item #981828, was opened at 2004-06-29 20:58 Message generated for change (Settings changed) made by dannysmith You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=981828&group_id=2435 Category: gcc Group: Known bugs >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: RA (ra04) Assigned to: Danny Smith (dannysmith) Summary: C++ streams support for files >4GB - seek broken Initial Comment: Hello all, my program needs big file support for C++ file streams. Different GCC versions have had problems with this: GCC 2.95: Big files worked under Linux, Windows untested GCC 3.0 to 3.3: Big files broken for C++ as a whole GCC 3.4: Big files work under Linux, broken with the mingw RC (gcc-g++-3.4.0-20040501-1.tar.gz) With the mingw RC, my program can create files larger than 4 GB, but something is still broken, I think seeking with offsets >4 GB might be the problem. The small program at the end of this mail, when compiled with the mingw RC and executed on a mounted network drive (huge 1.5 TB Windows fileserver), prints: -1 strerror: No error Note that it does not print "64" - that would have indicated that the seek offsets are taken modulo 2^32. The correct output is "63". Can you provide a fix for this problem? Cheers, Richard ---------------------------------------------------------------- #include <fstream> #include <iostream> #include <string.h> using namespace std; int main() { fstream f("testfile", ios::binary|ios::in|ios::out|ios::trunc); #ifdef __MINGW32__ unsigned long long left = 0x100001000ULL; char buf[4096]; memset(buf, 0, 4096); f.write(buf, 4096); f.write("YADA@YADA!", 10); // 64 aka '@' at 0x1004 f.write(buf, 4096 - 10); left -= 8192; while (left > 0) { f.write(buf, 4096); left -= 4096; } #else f.seekp(0x100001000ULL); #endif f.write("YADA?YADA!", 10); f.seekg(0x100001004ULL); cout << f.get() << endl; // Should print 63 for the '?' at 0x100001004 cout << "strerror: " << strerror(errno) << endl; } ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2004-06-29 23:25 Message: Logged In: YES user_id=15438 Let me know when you plan to release. I'll upload a new mingw-runtime release. ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2004-06-29 21:09 Message: Logged In: YES user_id=11494 Yes. I've got a fix for next RC. It will probably mean that although std stream classes will work with large files with current mingw runtime, the use of the extension class __gnu_cxx::stdio_sync_filebuf will require a newer (yet to be released) libmingwex.a Danny ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=981828&group_id=2435 |