strange error building print/texinfo

Adrian Chadd adrian.chadd at gmail.com
Sat Oct 17 16:18:06 UTC 2015


...

what's it do on non-mips?


-a


On 17 October 2015 at 03:03, Eugene Grosbein <eugen at 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 at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to "freebsd-mips-unsubscribe at freebsd.org"


More information about the freebsd-mips mailing list