From 64d884c8fcb7850f1c71ad3fdb9c4108726ff6e6 Mon Sep 17 00:00:00 2001 From: kre Date: Wed, 30 May 2018 05:09:11 +0000 Subject: [PATCH] The bytes_transfer_piod_read_auxv test uses 4096 for the size param to bytes_transfer() which asserted that the size is < the size of 512 AuxInfo structs. On a 32 bit system, an AuxInfo is 8 bytes, and 512 AuxInfo structs is thus 4096 bytes, and 4096 is not < 4096, so the assertion failed. It would probably work as a <= assert, but I am not confident enough with this test case to make that call, so instead increase the array size to be 513 instead, 4096 is < 513*8 so happiness should return and all should be right with the world. At least for this one test. (There was no problem on 64 bit systems as AuxInfo is bigger there.) --- tests/lib/libc/sys/t_ptrace_wait.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/lib/libc/sys/t_ptrace_wait.c b/tests/lib/libc/sys/t_ptrace_wait.c index e1f30fd7ec4f..a24c5c328fa5 100644 --- a/tests/lib/libc/sys/t_ptrace_wait.c +++ b/tests/lib/libc/sys/t_ptrace_wait.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.c,v 1.59 2018/05/29 10:40:54 kamil Exp $ */ +/* $NetBSD: t_ptrace_wait.c,v 1.60 2018/05/30 05:09:11 kre Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: t_ptrace_wait.c,v 1.59 2018/05/29 10:40:54 kamil Exp $"); +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.60 2018/05/30 05:09:11 kre Exp $"); #include #include @@ -2021,8 +2021,8 @@ bytes_transfer(int operation, size_t size, enum bytes_transfer_type type) #if defined(TWAIT_HAVE_STATUS) int status; #endif - /* 512 is more than enough, for the purposes of ATF it's good enough */ - AuxInfo ai[512], *aip; + /* 513 is just enough, for the purposes of ATF it's good enough */ + AuxInfo ai[513], *aip; ATF_REQUIRE(size < sizeof(ai));