From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-05.nifty.com (conssluserg-05.nifty.com [210.131.2.90]) by sourceware.org (Postfix) with ESMTPS id C07B93858D39 for ; Tue, 26 Oct 2021 16:44:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C07B93858D39 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp Received: from Express5800-S70 (z221123.dynamic.ppp.asahi-net.or.jp [110.4.221.123]) (authenticated) by conssluserg-05.nifty.com with ESMTP id 19QGiGvM017703 for ; Wed, 27 Oct 2021 01:44:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 19QGiGvM017703 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1635266657; bh=BJ6AQbvOgbUsWk9LOLq2jzQMicmhq+WUhu5VIxPUfeU=; h=Date:From:To:Subject:In-Reply-To:References:From; b=dY0P2fI1qCMQ4BIy09SSvegZLwvbSvz/DxAl5wMxb5qWJ1iZKoLHjj7xsy91bsNad 82WChwkJdLUfLfMOpaPQHUZsZexxes+daXW6uQIn1/KwSJPm3x/jA1F1nul7l2idXQ 35enHR616h036jvVisgffWpc90bAFZCLEyme+WgxSNeVs3N8d1qgHyYDCPNGBRHA6P iTr4mOT8nliQEAWUSlxxzrMxAGWsgvEq31Pf4S0yaByrpZKp+yIJFpejQAgZ4qDyOz jqQgBQ3gNB3IBlZ4LkrjMJg33rFpLHiIP88ciBSQIvdDeUmiIniYqcPvwNU4EETtKM kIQWNgdSyLFww== X-Nifty-SrcIP: [110.4.221.123] Date: Wed, 27 Oct 2021 01:44:21 +0900 From: Takashi Yano To: cygwin-developers@cygwin.com Subject: Re: malloc crash Message-Id: <20211027014421.595f7c35871ab99d3e6be45e@nifty.ne.jp> In-Reply-To: References: <6a4d6675-7e4d-bcb3-9aff-acc0788d211d@cornell.edu> <97873b16-7ec3-02d7-1861-3ec62a79c37e@cornell.edu> <4b322eb0-4941-6b8f-6f46-aa76caf5a66f@cornell.edu> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2021 16:44:38 -0000 On Tue, 26 Oct 2021 18:03:28 +0200 Corinna Vinschen wrote: > On Oct 26 10:32, Ken Brown wrote: > > On 10/26/2021 5:24 AM, Corinna Vinschen wrote: > > > Ken, is there a chance to tweak the fifo code to stop creating > > > threads from inside fixup, and to defer the thread start to the first > > > call in the process actually relying on the thread being started? > > > > I can't think of any way to do that. The thread is listening for various > > events that cause it to take action, so it has to always be running. But I > > can probably tweak the code so that the thread doesn't have to call malloc > > early on. > > > > It might take a while to get this right, and the bug has existed ever since > > I overhauled the fifo code. So I don't think you have to hold up releasing > > 3.3.0 while I work on this. > > Try the below patch instead, per Takashi's testing and subsequent discussion. Your patch works fine for me. -- Takashi Yano