[fpc-devel] Lazarus instability on windows caused by widestrings?

Vincent Snijders vsnijders at quicknet.nl
Thu Jun 23 14:22:42 CEST 2005


Hi,

I am investigating some instabilities of lazarus and stumbled on the 
following (from UTF8Decode).

var
   hs: widestring;
begin
   SetLength(hs,20);
   SetLength(hs,8);
end;

In fpc_WideStr_SetLength first a string is allocated with NewWideString, 
which calls SysAllocStringLen on windows.

For the second SetLength, a plain reallocmem is used, where I would have 
expected a call to SysReAllocStringLen.

What do you think?

Vincent.






More information about the fpc-devel mailing list