mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 05:59:27 +02:00
* do not crash in case of too many $push directives, resolves #39652
This commit is contained in:
parent
92a0640bcc
commit
54dccaaad1
@ -1204,8 +1204,9 @@ unit scandir;
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
if switchesstatestackpos < 1 then
|
if switchesstatestackpos < 1 then
|
||||||
Message(scan_e_too_many_pop);
|
Message(scan_e_too_many_pop)
|
||||||
|
else
|
||||||
|
begin
|
||||||
Dec(switchesstatestackpos);
|
Dec(switchesstatestackpos);
|
||||||
recordpendinglocalfullswitch(switchesstatestack[switchesstatestackpos].localsw);
|
recordpendinglocalfullswitch(switchesstatestack[switchesstatestackpos].localsw);
|
||||||
recordpendingverbosityfullswitch(switchesstatestack[switchesstatestackpos].verbosity);
|
recordpendingverbosityfullswitch(switchesstatestack[switchesstatestackpos].verbosity);
|
||||||
@ -1223,6 +1224,7 @@ unit scandir;
|
|||||||
out by using $Q- after a $push PM 2012-08-29 }
|
out by using $Q- after a $push PM 2012-08-29 }
|
||||||
// flushpendingswitchesstate;
|
// flushpendingswitchesstate;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure dir_pointermath;
|
procedure dir_pointermath;
|
||||||
begin
|
begin
|
||||||
|
7
tests/webtbf/tw39652.pp
Normal file
7
tests/webtbf/tw39652.pp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ %fail }
|
||||||
|
program onepoptoomanycrash;
|
||||||
|
{$PUSH}
|
||||||
|
{$POP}
|
||||||
|
{$POP}
|
||||||
|
begin
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user