| Anonymous | Login | Signup for a new account | 2010-02-09 03:15 CET |
| All Projects | FPC | Lazarus: Packages, Patches | Lazarus CCR | Mantis | fpGUI |
| Main | My View | View Issues | Change Log | Roadmap | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0014472 | [FPC] RTL | major | always | 2009-09-01 08:08 | 2009-09-02 09:24 | ||||
| Reporter | Giorgio Tani | View Status | public | ||||||
| Assigned To | Marco van de Voort | ||||||||
| Priority | normal | Resolution | no change required | ||||||
| Status | resolved | Product Version | 2.2.2 | ||||||
| Summary | 0014472: Incorrect file size reported in .Size of TSearchRec, for files larger than 4GB (Win32) | ||||||||
| Description |
If the size of a file larger than 4GB is obtained calling FindFirst and using .Size field of TSearchRec, as in the example, it is reported incorrectly, based only on the lower 4 bytes. With filesize function (either the one using the filename, or the one using the pointer to the file) the correct filesize is reported. |
||||||||
| Additional Information | Tested on Vista SP2 32 bit | ||||||||
| Tags | No tags attached. | ||||||||
| FPCOldBugId | 0 | ||||||||
| Fixed in Revision | |||||||||
| Attached Files |
|
||||||||
|
|
|||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
(0030297) Giorgio Tani (reporter) 2009-09-01 21:08 |
Line 383 of Function FindMatch in sysutils (the version included in Lazarus 0.9.26.2) seem responsible of this problem: f.size:=F.FindData.NFileSizeLow; I don't know if the issue was resolved in subsequent SVN versions, however I've modified that line in: f.size:=(int64(F.FindData.NFileSizeHigh) shl 32)+F.FindData.NFileSizeLow; After I re-compiled the sysutils.o and sysutils.ppu, and replaced the ones in lazarus\fpc\2.2.2\units\i386-win32\rtl path, I can compile my projects and now the size reported in TSearchRec perfectly match filesize function. |
|
(0030298) Giorgio Tani (reporter) 2009-09-01 21:18 |
Sorry for the duplicate report, I was searching in the Lazarus tracker where I originally posted instead that in FPC ones, so I didn't noticed the same issue was resolved here: http://bugs.freepascal.org/view.php?id=13504 [^] Anyway I've uploaded the compiled .o and .ppu to be placed in lazarus\fpc\2.2.2\units\i386-win32\rtl path if some Lazarus users are interested in a quick fix to be applied to the IDE; my bug report IMHO can be closed. |
|
(0030310) Marco van de Voort (manager) 2009-09-02 09:24 |
Indeed a bugfix is already in svn |

