From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1214 Path: news.gmane.org!not-for-mail From: Jim Meyering Newsgroups: gmane.linux.lib.musl.general,gmane.comp.lib.gnulib.bugs Subject: Re: musl, printf out-of-memory test Date: Wed, 20 Jun 2012 13:00:30 +0200 Message-ID: <87lijiw8mp.fsf@rho.meyering.net> References: <20120609230541.47eac2de@newbook> <4210755.aMrNX6YhFs@linuix> <20120620015249.GT163@brightrain.aerifal.cx> <2880353.4bDTyI3WGR@linuix> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1340190044 12113 80.91.229.3 (20 Jun 2012 11:00:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 20 Jun 2012 11:00:44 +0000 (UTC) Cc: Rich Felker , musl@lists.openwall.com, bug-gnulib@gnu.org To: Bruno Haible Original-X-From: musl-return-1215-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jun 20 13:00:43 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ShIeQ-0006Zd-SJ for gllmg-musl@plane.gmane.org; Wed, 20 Jun 2012 13:00:43 +0200 Original-Received: (qmail 25784 invoked by uid 550); 20 Jun 2012 11:00:42 -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 25776 invoked from network); 20 Jun 2012 11:00:42 -0000 In-Reply-To: <2880353.4bDTyI3WGR@linuix> (Bruno Haible's message of "Wed, 20 Jun 2012 11:35:28 +0200") Original-Lines: 13 Xref: news.gmane.org gmane.linux.lib.musl.general:1214 gmane.comp.lib.gnulib.bugs:31075 Archived-At: Bruno Haible wrote: > Rich Felker wrote: >> The problem was an obscure pointer-arithmetic overflow ... >> where the stack pointer is near the 4GB boundary. > > This explains also why it occurred only with a certain probability > outside gdb, but with 100% probability from within gdb: Apparently gdb > runs the program without address space layout randomization. That is correct. It is a feature of gdb-7.0 and newer. You can inspect (watch/break-at/etc.) the same address and expect it to refer to the same memory location in multiple invocations. This makes gdb's command-line history even more useful.