[fpc-devel] Record types with unbounded trailing data

Martin Frb lazarus at mfriebe.de
Mon Jun 24 11:06:16 CEST 2019


On 24/06/2019 06:41, Michael Van Canneyt wrote:
>
> If you want to get rid of warnings, define it as
> LOGPALETTE = record
>    palVersion : WORD;
>    palNumEntries : WORD;
>    palPalEntry : array[0..(MAXINT div sizeof(PALETTEENTRY)] of 
> PALETTEENTRY;
> end;

Which of course can prevent debugging to work.

Older gdb will crash (out of mem).
Newer ones have a mem limit, and will simply give an error.

Gdb even has issues to get individual fields of such large structures.


More information about the fpc-devel mailing list