X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=mfN0il+tokJwhTf++PVFnc56J6l8WCex6q+OKW7iKIE wiRNSF5EGrvshINnPfLNiXkvzggQB4m/YTHW0CXqknsp3mMRFZDKc9BVWw738l+/ 5ES82StDkczuZ1noZbGfdo8+GCQwJ+988Zw/qzOzphpulMr5tGkps1eVzGgdCK6g = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=lmiVt07qi8QSKZtB58OrwQzKh5M=; b=MS/HVE4YvKgSU6YWF f98bmX87HU4tZK4hSOowjk+sQy0D7sl51ShjlmVcbX8GN0cXLbrgRlv9Oz2/InVe /bVcmqJ+nqRC2Mj8n3Zz7bMQRHmXQDghfsPrrh0jsza3m8AFElNNBMbFf5UpFOOG GwVtBdxmu5Zu7ImDaw6qrR2gsY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: red.contecint.com.au Message-ID: <531FDCA8.1040709@constrainttec.com> Date: Wed, 12 Mar 2014 15:03:52 +1100 From: "Sam Liapis AT constrainttec DOT com" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: 1.7.25, Windows 7: dumper doesn't generate core file References: <531FD728 DOT 2000600 AT constrainttec DOT com> In-Reply-To: <531FD728.2000600@constrainttec.com> X-Forwarded-Message-Id: <531FD728 DOT 2000600 AT constrainttec DOT com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Thanks Corinna I appreciate the response. >>Question 2: IS THE CODE MODIFICATION AN ACCEPTABLE SOLUTION TO THE PROBLEM? > Maybe, but first it would be helpful if somebody could explain why > sections should be able to overlap at all. That's puzzling me. > > As for patches, did you seehttp://cygwin.com/contrib.html > For small, obvious patches, we don't need the copyright assignment. > Rule of thumb is < 10 lines. I'm happy to submit minor patches on both points covered in the original post. However as you noted I'll wait for someone to first explain if/why sections overlap. Thanks, Sam On 11/03/14 22:02, Corinna Vinschen wrote: > Hi Sam, > > On Mar 11 10:35, Sam Liapis wrote: >> >As a disclaimer I'm new to Cygwin and memory mapping that's alluded to in this post. >> > >> >My brief was to investigate and resolve an issue with dumper not producing a core. >> > >> >With that I'll proceed with outlining the journey including my findings so far. >> > >> >I'll begin with the error message given by dumper when run in verbose mode: >> >(Note: I modified debug output to provide base address of excluded memory) >> >[,..] >> >Code analysis reveals a few shortcomings leading up to this failure. Firstly the process of >> >identifying sections to exclude, includes sorting and checking that regions do not overlap. >> >Upon closer inspection the function in question at ...winsup/utils/parse_pe.cc appears to >> >have a couple of problems. >> > >> > a) "if (q == p + 1)" at line 60 always resolves true bypassing subsequent loop code. >> > >> > b) The 'size' parameter at line 63 is a global instead of p->size. The test expression >> > should be if (p->base + p->size > q->base) in order to test for overlapping regions. > This looks very wrong indeed. > >> >[...] >> >Even if sort_and_check () worked correctly it wouldn't prevent dumper failure it just raises an alert. >> > >> >Secondly when dumper builds a list of memory regions to dump into a core file it has no logic to cater >> >for overlapping sections to exclude. Here in lies my first question regarding this issue: >> > >> > >> >Question 1: SHOULD MEMORY REGIONS IDENTIFIED FOR EXCLUSION EVER OVERLAP? > I can't really answer this question safely, but AFAIK, the answer is > no. The sections and memory layout in a pe/coff file are so that the > sections have unique VMAs, including debug sections. An overlap of > sections should never occur, otherwise the Windows loader would have > refused to load the executable into memory anyway. Unless I'm missing > something... > >> >Question 2: IS THE CODE MODIFICATION AN ACCEPTABLE SOLUTION TO THE PROBLEM? > Maybe, but first it would be helpful if somebody could explain why > sections should be able to overlap at all. That's puzzeling me. > > As for patches, did you seehttp://cygwin.com/contrib.html > For small, obvious patches, we don't need the copyright assignment. > Rule of thumb is < 10 lines. > > > Thanks, > Corinna > > -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin > Maintainer cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple