[fpc-pascal] CMem issue?
Michael Van Canneyt
michael at freepascal.org
Sat Mar 12 10:39:56 CET 2016
On Fri, 11 Mar 2016, dinmil wrote:
> program project1;
>
> {$mode delphi}
>
> uses
> cmem,
> Classes, SysUtils;
> var
> VBuffer: TBytes;
> VStream: TStream;
> begin
> VStream := TBytesStream.Create;
> try
> VBuffer := TEncoding.UTF8.GetBytes('abc');
> VStream.WriteBuffer(VBuffer[0], Length(VBuffer));
> finally
> VStream.Free;
> end;
> writeln('Press any key to finish...');
> readln;
> end.
>
> I tried this with CT540 - it is OK
> CT570 with newer compiler gets access violation when in debug.
> If you try application from command prompt then it is OK.
This points to an error in CodeTyphon, not Free Pascal.
What are the options used to compile the program ? Does it include -gh ?
If so, then that is almost certainly the problem.
Michael.
More information about the fpc-pascal
mailing list