git: 79e6ffb6951b - main - netbsd-tests: libc: fix strvis(3) overflow tests
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 20 Aug 2023 05:36:58 UTC
The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=79e6ffb6951bd75a92326fabadd48e87ee0aed96 commit 79e6ffb6951bd75a92326fabadd48e87ee0aed96 Author: Kyle Evans <kevans@FreeBSD.org> AuthorDate: 2023-08-20 05:28:08 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> CommitDate: 2023-08-20 05:36:23 +0000 netbsd-tests: libc: fix strvis(3) overflow tests These tests weren't run on x86 until CI grabbed them. It turns out, there's a sign extension bug that surfaces on x86 with char being a signed type. NetBSD unearthed this when they took and improved the patch, so just grab their solution until we get to merging in the latest version of the test. Reported by: CI (via ngie) Fixes: 2f489a509e61 ("libc: fix some overflow scenarios in vis(3)") --- contrib/netbsd-tests/lib/libc/gen/t_vis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/lib/libc/gen/t_vis.c b/contrib/netbsd-tests/lib/libc/gen/t_vis.c index 80800bf8b31f..8d0e7a50b329 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_vis.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_vis.c @@ -176,7 +176,7 @@ ATF_TC_BODY(strvis_locale, tc) #endif /* VIS_NOLOCALE */ #ifdef __FreeBSD__ -#define STRVIS_OVERFLOW_MARKER 0xff /* Arbitrary */ +#define STRVIS_OVERFLOW_MARKER ((char)0xff) /* Arbitrary */ ATF_TC(strvis_overflow_mb); ATF_TC_HEAD(strvis_overflow_mb, tc)