Date: Sun, 25 Oct 2015 10:07:50 +1100 From: George Abdelmalik <gabdelmalik@uniridge.com.au> To: David Chisnall <theraven@FreeBSD.org> Cc: Ian Lepore <ian@FreeBSD.org>, freebsd-current@freebsd.org Subject: Re: dtc(1): reproducible segmentation fault Message-ID: <20151024230750.GB5266@barney.uniridge.com.au> In-Reply-To: <DC171BE3-F6BF-4103-BFB6-F08E8FE4A055@FreeBSD.org> References: <562A3FE5.8020809@uniridge.com.au> <F6FF4D7B-C380-4410-8A4D-6E376DF76C7D@gmail.com> <1445618437.91534.13.camel@freebsd.org> <2D772151-85F9-4D80-8074-58CD11FFF778@FreeBSD.org> <DC171BE3-F6BF-4103-BFB6-F08E8FE4A055@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Oct 24, 2015 at 02:11:36PM +0100, David Chisnall wrote: > On 24 Oct 2015, at 11:07, David Chisnall <theraven@FreeBSD.org> wrote: > > > > On 23 Oct 2015, at 17:40, Ian Lepore <ian@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151024230750.GB5266>