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

Florian Klaempfl florian at freepascal.org
Thu Jun 23 14:29:41 CEST 2005


Vincent Snijders wrote:

> 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?

This was forgotten to change :( Sending a patch is ok ;)




More information about the fpc-devel mailing list