1.7.25, Windows 7: dumper doesn't generate core file

Sam Liapis@constrainttec.com Sam.Liapis@constrainttec.com
Wed Mar 12 08:45:00 GMT 2014


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



More information about the Cygwin mailing list