From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10571 Path: news.gmane.org!.POSTED!not-for-mail From: Johannes Schindelin Newsgroups: gmane.linux.lib.musl.general,gmane.comp.version-control.git Subject: RE: Re: Regression: git no longer works with musl libc's regex impl Date: Wed, 5 Oct 2016 12:49:48 +0200 (CEST) Message-ID: References: <20161004200057.dc30d64f61e5ec441c34ffd4f788e58e.efa66ead67.wbe@email15.godaddy.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1475664609 7472 195.159.176.226 (5 Oct 2016 10:50:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Oct 2016 10:50:09 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: musl@lists.openwall.com, git@vger.kernel.org, Jeff King To: writeonce@midipix.org Original-X-From: musl-return-10584-gllmg-musl=m.gmane.org@lists.openwall.com Wed Oct 05 12:50:05 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1brjm0-0001ML-LY for gllmg-musl@m.gmane.org; Wed, 05 Oct 2016 12:50:04 +0200 Original-Received: (qmail 13692 invoked by uid 550); 5 Oct 2016 10:50:05 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 13671 invoked from network); 5 Oct 2016 10:50:04 -0000 X-X-Sender: virtualbox@virtualbox In-Reply-To: <20161004200057.dc30d64f61e5ec441c34ffd4f788e58e.efa66ead67.wbe@email15.godaddy.com> X-Provags-ID: V03:K0:c5EjhnIrtFZOI5WTEGnHVQEOoAVkMrgL5dfcxCqZqAbHGbcDk68 njTyUQzKqXCOshgJO82bMJQMEL1KlghUGssv+Q1uQL/kfoboqCqrYC+98dkfaNDyLthg/3v 718aDVG531SEnRc2OGvs5RDuAYglaoYFXG+FdAm8TSRKvAzmz8pElgtqa+iHg215myxXbim ZcPayQsEfmBEZnOC4Dl5w== X-UI-Out-Filterresults: notjunk:1;V01:K0:EYgfrucGVoE=:xu66oXZPAgFRkiZmVKmcV3 hB/RsQpzekIm8jawI4T+TX/19aYwEWRJ4II7Em/GcAIU9pQ3zTQptPbNx1a2QQfcDd0pL3Frm Axf0eNfvnexdsP5KSklbtpDWDRaO6t+CrLghKQpv9tI0ZdchB7wGbjSvusyx+lwQClPEjXGFR ZhnnK7TUo20t2YK9lAeBRQQWqht6mgXmdXtoQMNWvRb8v+WX4lnUqC5zL1J1PloVv8eDksYyl A16TlOV9IEJ376Dl23xrqUgtnN84mrsZ/QV/Z2SJ01iorbuHcOBiK2brYRC+aAUrzJxBZ5BwR 4+HFNlZaVgAfRoWvW1srGcWHRVdIAEBoSjnCONFRiu5+S/UOMwqxeHkHw5nztMZX/EbaQn64a vbmXw5LZYVh2Qr5LoFmKvRLIr63yk3uFfTzfSgLmj18nQ1k0/WAX8faPAfMzCg9Bhut9vrTwv gukWLjCPaWZ1Ej7NYSiFgiBsqa9M+TxMhkmeyJn20LvX4YUj41wqiJ0qw5S6ZLlBQQeF4+kd+ 7JJWLEldIDAqwf36cb6vEIbiJxn6CiS4EoUDbNRpH/WOw6MDIDAHF+t1fELJjBROQMRIc1TVb qJw8vMbZNfkJ5w0gkcRxUzd8xCC3oIsHB9jNb/4BEayBwyviotbO+D2G3OcdkotBWxn4C5YZU 0ZLB1aOiLxQWYU1Y+gnFXA/sXrFqd37UgTQPUFS53gSNH8helZFYfodcVNWGB6kfERgcD10yo bP7tzuJFRuvJ7chJqbG31LkjUCHt1IO0MuPvIYnqR4/7HrypOSa8geX1opXo4xd5wdl/OToE Xref: news.gmane.org gmane.linux.lib.musl.general:10571 gmane.comp.version-control.git:306180 Archived-At: Hi writeonce, On Tue, 4 Oct 2016, writeonce@midipix.org wrote: > < On Tue, 4 Oct 2016, Rich Felker wrote: > < > < > On Tue, Oct 04, 2016 at 11:27:22AM -0400, Jeff King wrote: > < > > On Tue, Oct 04, 2016 at 11:08:48AM -0400, Rich Felker wrote: > < > > > < > > > 1. is nonzero mod page size, it just works; the remainder of the > < > > > last page reads as zero bytes when mmapped. > < > > > < > > Is that a portable assumption? > < > > < > Yes. > < > < No, it is not. You quote POSIX, but the matter of the fact is that we > < use a subset of POSIX in order to be able to keep things running on > < Windows. > > As far as I can tell (and as the attached program may help demonstrate), > the above assumption has been valid on all versions of Windows since at > least Windows 2000. And since W2K is already past its end of life, it would be safe for practical considerations. However, I have to add two comments to that: - it is *not* guaranteed. The behavior is undefined, even if you see consistent behavior so far. Future Windows versions might break that assumption freely, though. - some implementations of the REG_STARTEND feature have the nice property that they can read past NUL characters. Granted, not all of them do (AFAIU one example is FreeBSD itself, the first platform to sport REG_STARTEND), but we at least reap the benefit whenever using a regex that *can* read past NUL characters. > In this context, one thing to remember is that the page-size for the mod > operation is 4096, whereas the POSIX page-size (for the purpose of mmap > and mremap) is 65536. Indeed. A colleague of mine spotted the segfault when diffing a file that was *exactly* 4,096 bytes. > Note also that in the case of file-backed mapped sections, using > kernel32.dll or msvcrt.dll or cygwin/newlib or midipix/musl is of little > significance, specifically since all invoke ZwCreateSection and > ZwMapViewOfSection under the hood. Right. It's all backed by the very same kernel functions. Ciao, Johannes