[fpc-pascal] Error: Local variables size exceeds supported limit

Yuriy Sydorov jura at cp-lab.com
Sun Mar 10 10:40:59 CET 2019


On 09.03.2019 14:06, Fabio Luis Girardi wrote:
> The datatype that throws this error is this (cef3types.pas:2416):
> 
> TCefCompositionUnderlineArray = array[0..(High(Integer) div SizeOf(TCefCompositionUnderline)) - 1] of 
> TCefCompositionUnderline;
> 
> The TCefCompositionUnderline is a record with 20 bytes of size (5x32 bits fields/vars into this record). So only this 
> var exceeds this limit on 32 bits systems.
> 
> The error is throw on this procedure, in cef3ref.pas:1574
> 
> procedure TCefBrowserHostRef.ImeSetComposition(const text: ustring; underlinesCount: TSize;
>    underlines: TCefCompositionUnderlineArray; const replacementRange, selectionRange: TCefRange);
> 
> I think that 2GB on 64 bits a very conservative limit.

Passing a 2GB array _by value_ as the "underlines" parameter for the procedure "ImeSetComposition" is totally wrong.
A pointer to an array of "underlinesCount" size should be passed here.

You should file a bug report for this library.

Yuriy.



More information about the fpc-pascal mailing list