From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/333 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?THVrYSBNYXLEjWV0acSH?= Newsgroups: gmane.linux.lib.musl.general Subject: Re: New daily reports - debugging alloc.c et al Date: Sat, 06 Aug 2011 06:40:12 +0200 Message-ID: <4E3CC5AC.3070404@gmail.com> References: <4E39C84F.8060705@gmail.com> <20110803224651.GB11437@openwall.com> <4E3A79B2.8090204@gmail.com> <4E3B331E.7050502@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050600060809080005040704" X-Trace: dough.gmane.org 1312605748 25636 80.91.229.12 (6 Aug 2011 04:42:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 6 Aug 2011 04:42:28 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-334-gllmg-musl=m.gmane.org@lists.openwall.com Sat Aug 06 06:42:24 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1QpYiO-0003OW-4L for gllmg-musl@lo.gmane.org; Sat, 06 Aug 2011 06:42:24 +0200 Original-Received: (qmail 17892 invoked by uid 550); 6 Aug 2011 04:42:23 -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 17881 invoked from network); 6 Aug 2011 04:42:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=tH7Jho8bjvNDYUiCO0BElNyWJMXiqw9sTyfVWizbjHw=; b=jrFGLXqjDds0PPilOcdLrupDLMEZ78Y+aAstMIBxliwuCrQ7VHYqILlJ7xWXOY/ixf lbuZ8c6QzCWzbKNr2eASgyve0BisPmCs/mhNZPxw/5WOmisnhYJ+L0fTu+SCLleqaGSr N/PJT1mrY4DURB4VGVPrpXyrOOEurH9ldeUQs= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Icedove/3.1.11 In-Reply-To: <4E3B331E.7050502@gmail.com> Xref: news.gmane.org gmane.linux.lib.musl.general:333 Archived-At: This is a multi-part message in MIME format. --------------050600060809080005040704 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 08/05/2011 02:02 AM, Luka Marčetić wrote: > I tried to do the above, but got pretty stuck, so I'll have to finish > it tomorrow unfortunately. > Accordingly, priorities are: > *finish pthread_eintr.c > *decide about the generator, take another task > Attached is the diff form of the above report. > > Talk to you soon. > Luka. Hello The day started with Szabolcs suggesting I use valgrind to debug alloc.c. A very good idea, one which changed my priorities. Rich explained to me how memory management works behind the scenes (an explanation I very much needed), and suggested an mmap-based method to employ to find bugs. I've been changing the prog until now (6am here), but the method of allocation that I've been recommended either fails to fulfill its promise, or I'm blind to my own bug. Here's a minimal test case: http://paste.debian.net/125242/ A quick explanation: Alloc.c needs to squat most of process' virtual memory. I employ a kind of binary search to find the greatest size that can be allocated, but then it turns out, mmap and malloc are able to continue allocating memory still. Not sure why. Priorities: * finish this test collection for good (need your replies for that) * work on pthread_eintr.c That's it for today. Luka P.S. Lost diff history, attached is repo vs local /tests diff, come commits not included --------------050600060809080005040704 Content-Type: text/plain; name="to-report" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="to-report" IGEub3V0ICAgICAgICAgICAgICAgfGJpbmFyeQogYWxsb2MgICAgICAgICAgICAgICB8Ymlu YXJ5CiBhbGxvYy5jICAgICAgICAgICAgIHwgIDE3NyArKysrKysrKysrKysrKy0tLS0tLS0t CiBhbGxvYy5jLm9sZGVyICAgICAgIHwgIDM1OCArKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrKysrKysrKysrKysrKysKIGFsbG9jLmN+ICAgICAgICAgICAgfCAgNDA2ICsrKysr KysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysKIGNvbW1v bi9jb21tb24uaCAgICAgfCAgICAxIAogY29tbW9uL2NvbW1vbi5oLmdjaCB8YmluYXJ5CiBj b21tb24vZV9uYW1lLmN+ICAgIHwgICAzMiArKysrCiBjb21tb24vdGVzdGdlbi5jICAgIHwg ICA2NiArKysrKysrKwogY29tbW9uL3Rlc3RnZW4uY34gICB8ICAgNjYgKysrKysrKysKIHB0 aHJlYWRfZWludHIuYyAgICAgfCAgMTI5ICsrKysrKysrKysrKysrKysKIDExIGZpbGVzIGNo YW5nZWQsIDExNzAgaW5zZXJ0aW9ucygrKSwgNjUgZGVsZXRpb25zKC0pCg== --------------050600060809080005040704--