From owner-svn-src-head@FreeBSD.ORG Sat Nov 1 21:00:41 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56161507; Sat, 1 Nov 2014 21:00:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41F44612; Sat, 1 Nov 2014 21:00:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sA1L0fTT043138; Sat, 1 Nov 2014 21:00:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sA1L0fU0043137; Sat, 1 Nov 2014 21:00:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411012100.sA1L0fU0043137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 1 Nov 2014 21:00:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273947 - head/contrib/netbsd-tests/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2014 21:00:41 -0000 Author: ngie Date: Sat Nov 1 21:00:40 2014 New Revision: 273947 URL: https://svnweb.freebsd.org/changeset/base/273947 Log: Expect :snprintf_posarg_error to blow up with a SIGSEGV on !NetBSD OSes Modified: head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Modified: head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Sat Nov 1 20:50:39 2014 (r273946) +++ head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Sat Nov 1 21:00:40 2014 (r273947) @@ -36,6 +36,10 @@ #include #include +#ifndef __NetBSD__ +#include +#endif + ATF_TC(snprintf_c99); ATF_TC_HEAD(snprintf_c99, tc) { @@ -116,6 +120,12 @@ ATF_TC_BODY(snprintf_posarg_error, tc) { char s[16], fmt[32]; +#ifndef __NetBSD__ + atf_tc_expect_signal(SIGSEGV, + "some non-NetBSD platforms including FreeBSD don't validate " + "negative size; testcase blows up with SIGSEGV"); +#endif + snprintf(fmt, sizeof(fmt), "%%%zu$d", SIZE_MAX / sizeof(size_t)); ATF_CHECK(snprintf(s, sizeof(s), fmt, -23) == -1);