Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2003-07

Some bugs in FCL in 1.0.x and 1.1 found and corrected

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michał Kamburelis

Hi

I was just playing with fcl examples and I found one bug in inc/streams.inc and A LOT of bugs in win32/fileinfo.pp. Bug in inc/streams.inc concerned the TStringStream class (I guess noone is using this class for anything so this bug was not noticed). And unit fileinfo.pp was totally unusable since these bugs prevented it from returning ANY version information info.

I corrected these bugs. Sorry, I'm unable to generate diffs so I will simply give here instructions on how to correct the bug in streams.inc and I'm attaching corrected version of fileinfo.pp. I found these bugs while compiling programs with FPC 1.0.10, FPC 1.1 is totally unstable on my win32 and linux so I wasn't able to actually _see_ these bugs in FPC 1.1. But I see that streams.inc and fileinfo.pp sources are exactly the same for FPC 1.0.10 and 1.1 so I'm pretty sure that these things should be corrected in FPC 1.1 in the same way.

Here is how to correct streams.inc bug: line 713 in inc/streams.inc ("ReadString:='';") should be REMOVED (this line is pure nonsense, it prevents method TStringStream.ReadString from returning correct result).

There were so many bugs and memory leaks in fileinfo.pp that I'm simply attaching to this letter corrected version of the file. I put some comments at the beginning of this file describing what I changed/added.

I hope these corrections will be applied to fpc 1.1. And anyone of you that is using stable version, 1.0.10 and wants to use TStringStream or TFileVersionInfo classes from FCL should probably apply these corrections to his FPC 1.0.10 too.

Regards,

Reply by email

Unknown author
to Michał Kamburelis
Show quoted text 8 lines
Hi I was just playing with fcl examples and I found one bug in inc/streams.inc and A LOT of bugs in win32/fileinfo.pp. Bug in inc/streams.inc concerned the TStringStream class (I guess noone is using this class for anything so this bug was not noticed). And unit fileinfo.pp was totally unusable since these bugs prevented it from returning ANY version information info.

Strange, I tested that code and it worked fine for me.

Show quoted text 22 lines
I corrected these bugs. Sorry, I'm unable to generate diffs so I will simply give here instructions on how to correct the bug in streams.inc and I'm attaching corrected version of fileinfo.pp. I found these bugs while compiling programs with FPC 1.0.10, FPC 1.1 is totally unstable on my win32 and linux so I wasn't able to actually _see_ these bugs in FPC 1.1. But I see that streams.inc and fileinfo.pp sources are exactly the same for FPC 1.0.10 and 1.1 so I'm pretty sure that these things should be corrected in FPC 1.1 in the same way. Here is how to correct streams.inc bug: line 713 in inc/streams.inc ("ReadString:='';") should be REMOVED (this line is pure nonsense, it prevents method TStringStream.ReadString from returning correct result). There were so many bugs and memory leaks in fileinfo.pp that I'm simply attaching to this letter corrected version of the file. I put some comments at the beginning of this file describing what I changed/added. I hope these corrections will be applied to fpc 1.1. And anyone of you that is using stable version, 1.0.10 and wants to use TStringStream or TFileVersionInfo classes from FCL should probably apply these corrections to his FPC 1.0.10 too.

The FCL is shared between 1.1 and 1.0. We will be making ready-to-use installation packages for it, with fixes such as these.

Thanks for these fixes, I will apply them later today.

Michael.

Reply by email