From owner-freebsd-mips@freebsd.org Sat Oct 17 16:18:06 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96D0FA17E10 for ; Sat, 17 Oct 2015 16:18:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64C451F15; Sat, 17 Oct 2015 16:18:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbdj2 with SMTP id dj2so32615022igb.1; Sat, 17 Oct 2015 09:18:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=OPCEq98pL7mZ9uo/x0KJKiWiIM9PNbLfDpdqKTCt+HQ=; b=1Ag4DKQLq6x2m+ghJn09QdV902TC8qDM9PpA/lTAjKjIvj9vEx04U2qCLXnwn7dvyX EiX1NKnIDgFa4fkJuiBnGYrJ0/k8D8NAavhgjYG+2OVdCbUzCV6WzzvCyTI86wUN/boQ gWKMumI9hS/wOJqXTUE7t/hNYD6cBEI99T1d6P7Ex51neg2RHvj0CYcIuL+I4JVVvZAV RFYNXq+cRrlHwbtPT7BjsX21W0Qj2WDL0u1G9NJg0B+wSvGDEVZCBlOQ1SBu7Glu5aew 8WzRTZ9Xpqh/uFNPc5DpjzMDj5ztXyd5z0xZUCLk5qsUdPibfRbUBK1J11IPGE1wRgtR 85OA== MIME-Version: 1.0 X-Received: by 10.50.61.137 with SMTP id p9mr11866990igr.37.1445098685775; Sat, 17 Oct 2015 09:18:05 -0700 (PDT) Received: by 10.36.46.66 with HTTP; Sat, 17 Oct 2015 09:18:05 -0700 (PDT) In-Reply-To: <56221CFD.2070204@grosbein.net> References: <56212F5F.3020603@rdtc.ru> <56217396.1050509@freebsd.org> <56221B6C.1060406@grosbein.net> <56221CFD.2070204@grosbein.net> Date: Sat, 17 Oct 2015 09:18:05 -0700 Message-ID: Subject: Re: strange error building print/texinfo From: Adrian Chadd To: Eugene Grosbein Cc: Sean Bruno , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 16:18:06 -0000 ... what's it do on non-mips? -a On 17 October 2015 at 03:03, Eugene Grosbein 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"