Use only sig & 63 when checking SA_ONSTACK.

This commit is contained in:
4lDO2
2024-08-05 16:09:36 +02:00
parent fed49a29af
commit 79e1550215
+5 -2
View File
@@ -240,9 +240,12 @@ asmfunction!(__relibc_internal_sigentry: ["
// skip the sigaltstack logic.
lea rdx, [rip + {pctl} + {pctl_off_actions}]
mov ecx, eax
and ecx, 63
// LEA doesn't support 16x, so just do two x8s.
lea rdx, [rdx + 8 * rax]
lea rdx, [rdx + 8 * rax]
lea rdx, [rdx + 8 * rcx]
lea rdx, [rdx + 8 * rcx]
bt qword ptr [rdx], {SA_ONSTACK_BIT}
jnc 4f