From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6530 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Possible bug: MINSIGSTKSZ values Date: Sun, 16 Nov 2014 22:20:42 -0500 Message-ID: <20141117032042.GB22465@brightrain.aerifal.cx> References: <20141115031843.GA3679@brightrain.aerifal.cx> <54694CD4.5070501@i-soft.com.cn> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1416194464 15098 80.91.229.3 (17 Nov 2014 03:21:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Nov 2014 03:21:04 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6543-gllmg-musl=m.gmane.org@lists.openwall.com Mon Nov 17 04:20:58 2014 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XqCs5-0003ck-DQ for gllmg-musl@m.gmane.org; Mon, 17 Nov 2014 04:20:57 +0100 Original-Received: (qmail 17935 invoked by uid 550); 17 Nov 2014 03:20:56 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 17920 invoked from network); 17 Nov 2014 03:20:55 -0000 Content-Disposition: inline In-Reply-To: <54694CD4.5070501@i-soft.com.cn> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:6530 Archived-At: On Mon, Nov 17, 2014 at 09:18:12AM +0800, 黄建忠 wrote: > Hi, Rich, > > If that means some opensource projects need to be modified to fit > Musl, would you consider to add a "__MUSL__" macro? > > I think such a special macro will make upstream patch easy to be accepted. I've never seen code that explicitly makes such a small thread stack; it's not something you'd do without a specific need to, and probably something you'd only do in an application where you control the deployment and what libc etc. is in use rather than as source distributed for use on different kinds of systems. Most code uses the default thread-stack size or an explicit size based on its own stack usage plus some margin of safety. Also, as mentioned in my follow-up, the minimum thread stack size really needs to include enough room for a signal frame since cancellation is implemented with a signal handler and thus needs a signal frame. So we probably need to bump up the minimum thread size on some archs anyway. :( Rich