Allow ssp_test:read to pass more reliably

It appears that the stackframe layout can be slightly different depending on
compiler and target architecture. For example, when using CHERI LLVM for RISC-V
we can actually overflow the buffer by up to 8 bytes without SSP detecting it.
Fix this by increasing the overflow to 15 bytes.

Reviewed By:	ngie, emaste
Differential Revision: https://reviews.freebsd.org/D28997
This commit is contained in:
Alex Richardson 2021-03-01 19:50:38 +00:00
parent 17cc20092c
commit c88c1f23a8

View File

@ -390,7 +390,7 @@ read_body()
if true; then
MAX_PATH=$(getconf _XOPEN_PATH_MAX) || atf_fail "getconf failed"
h_pass "$prog $MAX_PATH" "echo foo |"
h_fail "$prog $(( $MAX_PATH + 3 ))" "echo bar |"
h_fail "$prog $(( $MAX_PATH + 15 ))" "echo bar |"
else
# End FreeBSD
h_pass "$prog 1024" "echo foo |"