mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 06:29:32 +02:00
Set STACK_MARGIN_MAX to four times of pagesize on LoongArch64
It fixed a test named tstack. Actually, Linux user get the stacktop is incorrect in current. The value of stack pointer when enter the procedure is thought as it is in the highest stack page. But if the parameters is enough large, lager than 16k, most of arch will also fail this test. Since the LoongArch default pagesize is 16k, it fail often because stack-layout-randomization causes the stackpointer underflow to next page. I had tried fixed it in rtl/linux/[arch]/si_*. But because the codes is unworthy and hardly the parameters is enough large, just expand STACK_MARGIN_MAX for simplicity.
This commit is contained in:
parent
f202dda5c5
commit
6ef31c643a
@ -48,6 +48,8 @@ const
|
||||
STACK_MARGIN_MAX = 64; { Stack size margin for stack checking }
|
||||
{$elseif defined(CPUZ80)}
|
||||
STACK_MARGIN_MAX = 64; { Stack size margin for stack checking }
|
||||
{$elseif defined(CPULOONGARCH64)}
|
||||
STACK_MARGIN_MAX = 65536; { Stack size margin for stack checking }
|
||||
{$else}
|
||||
STACK_MARGIN_MAX = 16384; { Stack size margin for stack checking }
|
||||
{$endif}
|
||||
|
Loading…
Reference in New Issue
Block a user