From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) by sourceware.org (Postfix) with ESMTPS id 046C83858005 for ; Tue, 26 Oct 2021 09:31:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 046C83858005 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MD9jV-1mWGGe3Crp-0098fl for ; Tue, 26 Oct 2021 11:31:53 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 654ABA80DAB; Tue, 26 Oct 2021 11:31:53 +0200 (CEST) Date: Tue, 26 Oct 2021 11:31:53 +0200 From: Corinna Vinschen To: cygwin-developers@cygwin.com Subject: Re: malloc crash Message-ID: Reply-To: cygwin-developers@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com References: <4b322eb0-4941-6b8f-6f46-aa76caf5a66f@cornell.edu> <2819d0db-3c5c-2d31-2b21-91efafb7f8f4@maxrnd.com> <20211026091855.7aaf2de97d10174121cbc8f9@nifty.ne.jp> <20211026175229.1eda36caab1b03314a8cf165@nifty.ne.jp> <20211026182639.92f6f9de086ec35f41deef88@nifty.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211026182639.92f6f9de086ec35f41deef88@nifty.ne.jp> X-Provags-ID: V03:K1:U4zSm6Er4eXveKdnRQGjGpadKBFMy2ctGX4k2VqJBIhErUgsyyA ScQt87A0LLfiiV9QaZUjayvZmscMzPE8/Xg/xGaIq168D3AJPPcvFqIdRhSIYbn5xx2AqqZ q8q3ElGmvNbrGEyN8E3mqzX5OzPwsAbIi1Ks9TYREfEOtjt+Xv5FTEEGEqxi7Bw0f8RQEL9 GN4QMgRUo91ObIgcAE/1Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:4IQRFINPLtM=:Jlupybba8/ThfLNjJDu0nC GGA4/d6B/X4Ri1h6apw5j0RSwKK4OpcQHUoxF1mSHya2m1NGMs1bHtMxciKyqQv0y1JTf/3MF G+lmL+KYRXHLhnij5xIWLgcc2DL+C3cIZOKxH2uKp9sQie6kWEID2hI7WhTiwFCe1CZ056yeD aQLZbGWpiCG+JJyvuGs875AQxnme70+Qu06JNf5+09C9CRJQsgxUjUfGTTcwu/Hg7WLDk2Ll7 mqh5s/zFQ4Hl3wXa4CQTHH+WhfC/Y7MWql1T/91Ivfeo9FWX3IGCseIlHFWbaDk19ynN3t5Fo /m7nHkM5EnfgOABcBWIN9R+nHPuPf0WRR68hez9a4Kb3IM5vcm8hCBWAOSBthvMtEg9uwM5wj LJC5SPZ15EKi6u/jnqg92V4964KhqZbkSL+4D8uj7QJXVz0cdpZ+HAolTlMojEa7iCsWXf24J MWZrtB2IDe1+KtwYNWc77+abGN0rShhxL0kNlg9JvBoJc3Y+hBibm3eJSbEHZnUgmKvyJSQnw Vvzopzi0uUmH/faNgtIw10Do3ghRyNdXue1jMqSAYeNTj6KT47iWyzMKv/3KNhnKbxGTBYvVi akI9FBgPnHDkNSGObEiKCIDfModmv/gtZYCL1F7XXSNYFa9J9ubR9S2oz7+BygIo4n1tojY+Q 2tG9RFVUFNjrtBt8a+XVPfpgA80Ccg+eo1ISmd1zi22jXEt6OBxcMMTYRdSXvXWknELSHe5w2 iFro8zb0asJyIzFC X-Spam-Status: No, score=-99.6 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NEUTRAL, 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 09:31:59 -0000 On Oct 26 18:26, Takashi Yano wrote: > On Tue, 26 Oct 2021 01:59:36 -0700 > Mark Geisert wrote: > > See above. Try moving your new lines above the call to do_global_ctors(). Also > > note the comment just above the original location of those lines.. you're now > > ignoring what the comment warns about. > > I have just tried moving malloc_init() before do_global_ctors(), > however, I do not encountered any problems. > > I do not understand what "user's program may have overridden malloc" > means... Check out the malloc_init code. You have to assume that an application comes with it's own malloc implementation. One of the scenarios discussed at the time was an app including dmalloc, a malloc lib for debugging memory allocation. Corinna