From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 4DAF33857C67; Tue, 16 Jan 2024 14:11:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4DAF33857C67 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1705414304; bh=F5iFh9wCtdCdY/qDEhu0LLcw65T+SiLPGwPPT4IWegU=; h=From:To:Subject:Date:From; b=f5vX4TmeFa5V3iODX0p5tRutOHCoCKHOr1SbnsljtJy5H79kgNg+Ce93gZEw0ZCJK QiH+BnEDVEaS+Gdh2PbImbXSl3urO/c+wWvAoFao+RfWO74HosgM/xPScf3P2SKrT3 CdaC/JP3OulmiZawIxXTKjpHd5Axn3oKWd85hano= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jon Turney To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: Disable writing core dumps by default. X-Act-Checkin: newlib-cygwin X-Git-Author: Jon Turney X-Git-Refname: refs/heads/main X-Git-Oldrev: 91457377d6c9f89a08b1b70e45cbae87ef467119 X-Git-Newrev: b7868e74103541f3271a170fe3bc2b19a00cc8cf Message-Id: <20240116141144.4DAF33857C67@sourceware.org> Date: Tue, 16 Jan 2024 14:11:44 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3Db7868e74103= 541f3271a170fe3bc2b19a00cc8cf commit b7868e74103541f3271a170fe3bc2b19a00cc8cf Author: Jon Turney Date: Tue Jan 9 14:12:31 2024 +0000 Cygwin: Disable writing core dumps by default. =20 Change the default core limit from unlimited to 0 (disabled) Diff: --- winsup/cygwin/mm/cygheap.cc | 2 +- winsup/cygwin/release/3.5.0 | 3 +++ winsup/doc/new-features.xml | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/mm/cygheap.cc b/winsup/cygwin/mm/cygheap.cc index a20ee5972..3dc0c011f 100644 --- a/winsup/cygwin/mm/cygheap.cc +++ b/winsup/cygwin/mm/cygheap.cc @@ -294,7 +294,7 @@ cygheap_init () cygheap->locale.mbtowc =3D __utf8_mbtowc; /* Set umask to a sane default. */ cygheap->umask =3D 022; - cygheap->rlim_core =3D RLIM_INFINITY; + cygheap->rlim_core =3D 0; } if (!cygheap->fdtab) cygheap->fdtab.init (); diff --git a/winsup/cygwin/release/3.5.0 b/winsup/cygwin/release/3.5.0 index 1e62316a0..5940d8054 100644 --- a/winsup/cygwin/release/3.5.0 +++ b/winsup/cygwin/release/3.5.0 @@ -64,3 +64,6 @@ What changed: - When RLIMIT_CORE is more than 1MB, a core dump file which can be loaded = by gdb is now written on a fatal error. Otherwise, if it's greater than zero, a= text format .stackdump file is written, as previously. + +- The default RLIMIT_CORE is now 0, disabling the generation of core dump = or + stackdump files. diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index f8e38f5c4..17c688f89 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -103,6 +103,12 @@ is now written on a fatal error. Otherwise, if it's gr= eater than zero, a text format .stackdump file is written, as previously. =20 + +The default RLIMIT_CORE is now 0, disabling the generation of core dump or +stackdump files. Use e.g. ulimit -c unlimited or ulimit= -c +1024 to enable them again. + + =20