From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D87FA3857021; Mon, 15 Mar 2021 21:45:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D87FA3857021 From: "carlos at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/27581] Threaded program crashes under ulimit -s unlimited Date: Mon, 15 Mar 2021 21:45:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.33 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carlos at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2021 21:45:16 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27581 Carlos O'Donell changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |carlos at redhat dot com --- Comment #2 from Carlos O'Donell --- (In reply to Florian Weimer from comment #1) > Once you have multiple threads, there is really no such thing as an > unlimited stack anymore for conceptual reasons, so glibc just picks a 2 M= iB > default and applies it to all the created stacks. Right the relevant code is in nptl/nptl-init.c (__pthread_initialize_minimal_internal). Users still see these values of conceptually muddled, and it's hard to expl= ain the distinction between executable stack and the relation to thread stack because there appears to be one but there isn't, there are just defaults be= ing adjusted to be heuristic matches. In the case you need more control we provide pthread_setattr_default_np() t= hat allows you to set a larger default stack size for all threads by default. T= his way you can independently control the stack size of all threads and the sta= ck size of the main program. --=20 You are receiving this mail because: You are on the CC list for the bug.=