From nobody Mon Dec 20 05:29:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 391CC1907EF7; Mon, 20 Dec 2021 05:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JHSn86pzPz4qRv; Mon, 20 Dec 2021 05:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9E9910AA7; Mon, 20 Dec 2021 05:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BK5T0iT047359; Mon, 20 Dec 2021 05:29:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BK5T0np047358; Mon, 20 Dec 2021 05:29:00 GMT (envelope-from git) Date: Mon, 20 Dec 2021 05:29:00 GMT Message-Id: <202112200529.1BK5T0np047358@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 4f741801d860 - main - t_setrlimit: Adjust resource limit to 20M List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f741801d86089a1c5d631ba1e0f1421cdcf7a7e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639978141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ws3soYnDzMNAw49AIP/WDhjPn7zutNRhKrRwHAW6mAI=; b=l8C2BWbkufWXiunwzkyCpOOAKIwhLFChPAl1NA49EVhTsTsqhpyYyBRS19uqHVSj/4kMTA pMEmPvypPRZL0uVGXbdMjZ+9MB3HYbxTuOTu6G9wH6BOJkaLhEh6jtuiK5Ibl/3M5RIweW wUDGotpMXEnwcYBKLNOsvqql6Ud9HotMRL7DiaJaWifuYU/AbeYEWvwl3Zzrjng61KxsdA UJMj8k9B6s9TyycBZaliC1eeAdT5+Fg4EF+oGYxwcUFbx883D3f8cWKD1GuDd+Cd3hMugp wvI8tgOKq2/GkExZninYsRcgE1hXoJrD0f89XbL00w4lfTNm8XugUUCFeFJDtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639978141; a=rsa-sha256; cv=none; b=M3UTzXpqnhfreuxqbGgupXn4BLwnV2L4+Kj0UmEJh41frknJsFFJCyTtoCm+OgyaXF5A6Z mbu6UAR7lNkB9gBYaJGX85Q/d8unYdbaeGZdLcAv8Ba1f0x79+Co2650g/psaqve5C18uG mH6JUgpNfLfj1xDuMh7V0zO8LIIvoCQc+g+jZeHQkZAEwVWC9rLiBm9qj+VYvQl+vPkCni 4KpLO6etZhI9T5+T7KaHQbLRMOBz/rMDHOgn7QV7kEJylQxsRKblGxKScv6uGAgL/0f+qB 7ihP6KfH4cyFVgCo/f26hR2SjbFKUv+4rEmeMhhm/sC9jfae9j8EeeFZWi3zTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=4f741801d86089a1c5d631ba1e0f1421cdcf7a7e commit 4f741801d86089a1c5d631ba1e0f1421cdcf7a7e Author: Dawid Gorecki AuthorDate: 2021-12-20 05:27:12 +0000 Commit: Wojciech Macek CommitDate: 2021-12-20 05:28:20 +0000 t_setrlimit: Adjust resource limit to 20M With ASLR enabled by default, RLIMIT_STACK test fails due to the fact that default stack gap can be as big as 15M. Because of that the resource limit of 4M results in test program receiving SIGSEGV immediately after exiting the setrlimit syscall. Since the idea of this test is to check if rlim_cur does not extend past rlim_max, adjusting the resource limit to 20M should not invalidate the test results. Obtained from: Semihalf Sponsored by: Alstom Group Differential revision: https://reviews.freebsd.org/D33116 --- contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c b/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c index d5c50155e6dd..e7e294cb5df3 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c @@ -554,7 +554,11 @@ ATF_TC_BODY(setrlimit_stack, tc) atf_tc_skip("https://bugs.freebsd.org/259969"); /* Ensure soft limit is not bigger than hard limit */ +#ifdef __FreeBSD__ + res.rlim_cur = res.rlim_max = 20971520; +#else res.rlim_cur = res.rlim_max = 4192256; +#endif ATF_REQUIRE(setrlimit(RLIMIT_STACK, &res) == 0); ATF_REQUIRE(getrlimit(RLIMIT_STACK, &res) == 0); ATF_CHECK(res.rlim_cur <= res.rlim_max);