Re: dtc(1): reproducible segmentation fault

From: George Abdelmalik <gabdelmalik_at_uniridge.com.au>
Date: Sun, 25 Oct 2015 10:07:50 +1100
On Sat, Oct 24, 2015 at 02:11:36PM +0100, David Chisnall wrote:
> On 24 Oct 2015, at 11:07, David Chisnall <theraven_at_FreeBSD.org> wrote:
> > 
> > On 23 Oct 2015, at 17:40, Ian Lepore <ian_at_FreeBSD.org> wrote:
> >> 
> >> Don't cc me.  I looked at the in-tree dtc code once and decided it's
> >> too flawed to try to maintain, and it supports only a subset of the
> >> full dts syntax.  That's why we switched back to using the gnu dtc for
> >> buildkernel.  But I just discovered that for some reason gnu is not the
> >> copy of dtc that gets installed, it's just the one that gets used
> >> during a buildkernel.
> > 
> > Please assign the bug to me.
> 
> Actually, it looks as if this is one of the (many) bugs in dtc that I fixed in a bunch of changes that I made (and didn?t get around to committing) last Christmas (https://github.com/davidchisnall/dtc).  Patrick Wildt tested the version that I was working on with a load of things from the GPL dtc test suite and they all passed.  I?m now running a make universe with the new version, and I?ll commit if there are no problems.
> 
> David
> 

Hi David,

You've beaten me to it with the fix before I could lodge the bug report :)

In your repo I've seen that the mmap(2) call now takes the MAP_PRIVATE flag. I
applied that change locally to my source tree and that has fixed the problem.
I've since re-read the mmap(2) man page to find out how that change could
be influential...

     [EINVAL]           None of MAP_ANON, MAP_PRIVATE, MAP_SHARED, or
                        MAP_STACK was specified.  At least one of these flags
                        must be included.

Although obvious to me now, I missed it on my previous reads.

Thanks for your assistance. I look forward to your coming set of changes. In
my view DTC is an important tool and I would be willing contribute effort to
making it feature parity with the GPL version if that is lacking.

Keep up the valuable work,
George.
Received on Sat Oct 24 2015 - 21:07:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:00 UTC