Date: Sat, 17 Oct 2015 09:18:05 -0700 From: Adrian Chadd <adrian.chadd@gmail.com> To: Eugene Grosbein <eugen@grosbein.net> Cc: Sean Bruno <sbruno@freebsd.org>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: strange error building print/texinfo Message-ID: <CAJ-Vmo=4c038TW7P=OXVdX4OV%2BkREo8jF4yEiuHvYHB2sVCUPA@mail.gmail.com> In-Reply-To: <56221CFD.2070204@grosbein.net> References: <56212F5F.3020603@rdtc.ru> <56217396.1050509@freebsd.org> <56221B6C.1060406@grosbein.net> <56221CFD.2070204@grosbein.net>
next in thread | previous in thread | raw e-mail | index | archive | help
... what's it do on non-mips? -a On 17 October 2015 at 03:03, Eugene Grosbein <eugen@grosbein.net> wrote: > On 17.10.2015 16:57, Eugene Grosbein wrote: >> On 17.10.2015 05:00, Sean Bruno wrote: >> >>> I just built print/texinfo with the lastes qemu-user-static without an >>> issue: >>> http://tasty.ysv.freebsd.org/build.html?mastername=11mips-default&build= >>> 2015-10-16_18h26m15s >> >> I've digged it: install(1) calls mmap() inside its copy() function: >> >> /* >> * Mmap and write if less than 8M (the limit is so we don't totally >> * trash memory on big files. This is really a minor hack, but it >> * wins some CPU back. >> */ >> done_copy = 0; >> if (size <= 8 * 1048576 && trymmap(from_fd) && >> (p = mmap(NULL, (size_t)size, PROT_READ, MAP_SHARED, >> from_fd, (off_t)0)) != MAP_FAILED) { >> nw = write(to_fd, p, size); >> >> >> mmap() returns NULL in my case, not MAP_FAILD. >> There is no check for NULL and write() returns EFAULT for attempt to write to NULL. > > Source file is zero bytes length. It seems, mmap returns NULL in such case only. > > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=4c038TW7P=OXVdX4OV%2BkREo8jF4yEiuHvYHB2sVCUPA>