View Issue Details

IDProjectCategoryView StatusLast Update
0034848FPCRTLpublic2019-01-13 00:30
ReporterhellotigerAssigned ToFlorian 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformX86-64OSDebian LinuxOS Version9
Product Version3.0.4Product Build 
Target VersionFixed in Version3.3.1 
Summary0034848: ISO mode file reading error
DescriptionOpen a typed binary file and try to read its contents after seeking to a new position. It works in the default mode but fails in the ISO mode. In ISO mode, the first read() call always reads the first element of the file, ignoring the seek() operation. The second read() call gets the element at the correct position.
Steps To Reproduce1. Download the attached Pascal source file and the test data file.
2. Compile the source using the default mode. Result:

File size: 11
File position: 9
57
10

3. Compile the source with -Miso switch to use ISO mode. Result:

File size: 11
File position: 9
         48
         57
TagsNo tags attached.
Fixed in Revision40850
FPCOldBugId
FPCTarget
Attached Files

Activities

hellotiger

2019-01-11 07:27

reporter  

fpc-iso.zip (581 bytes)

Marco van de Voort

2019-01-11 10:45

manager   ~0113322

Can reproduce with FPC 3.3.1

Florian

2019-01-12 14:36

administrator   ~0113351

Is seek supposed to work in ISO mode? I would expect that its behaviour clashes with the behaviour of ISO file handling.

hellotiger

2019-01-12 17:38

reporter   ~0113354

Last edited: 2019-01-12 17:46

View 3 revisions

Thanks. What is the root cause of the problem? I need to compile code in ISO mode and deal with files. Is there an alternative way of supporting seek like functions in FPC ISO mode? In GNU Pascal, ISO mode is the default and seek can be used. GNU Pascal is obsolete now. I would like to compile it using FPC.

Florian

2019-01-13 00:30

administrator   ~0113369

Ok, I tried to mimic this behaviour in FPC's iso mode.

Issue History

Date Modified Username Field Change
2019-01-11 07:27 hellotiger New Issue
2019-01-11 07:27 hellotiger File Added: fpc-iso.zip
2019-01-11 10:45 Marco van de Voort Note Added: 0113322
2019-01-11 10:46 Marco van de Voort Status new => confirmed
2019-01-12 14:36 Florian Note Added: 0113351
2019-01-12 17:38 hellotiger Note Added: 0113354
2019-01-12 17:43 hellotiger Note Edited: 0113354 View Revisions
2019-01-12 17:46 hellotiger Note Edited: 0113354 View Revisions
2019-01-13 00:30 Florian Fixed in Revision => 40850
2019-01-13 00:30 Florian Note Added: 0113369
2019-01-13 00:30 Florian Status confirmed => resolved
2019-01-13 00:30 Florian Fixed in Version => 3.3.1
2019-01-13 00:30 Florian Resolution open => fixed
2019-01-13 00:30 Florian Assigned To => Florian