Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 04 Oct 2016 20:00:57 -0700
From: <>
  "Jeff King" <>
Subject: RE: Re: Regression: git no longer works with musl libc's regex impl

< -------- Original Message --------
< Subject: [musl] Re: Regression: git no longer works with musl libc's
< regex impl
< From: Johannes Schindelin <>
< Date: Tue, October 04, 2016 9:08 am
< To: Rich Felker <>
< Cc: Jeff King <>,,
< Hi Rich,
< 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
< > > > 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
< a subset of POSIX in order to be able to keep things running on

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. 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. 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.


< And quite honestly, there are lots of reasons to keep things running
< Windows, and even to favor Windows support over musl support. Over
< million reasons: the Git for Windows users.
< So rather than getting into an ideological discussion about "broken"
< systems, it would be good to keep things practical, realizing that
< users make up a very real chunk of all of Git's users.
< As to making NO_REGEX conditional on REG_STARTEND: you are talking
< apples and oranges here. NO_REGEX is a Makefile flag, while
< is a C preprocessor macro.
< Unless you can convince the rest of the Git developers (you would not
< convince me) to simulate autoconf by compiling an executable every
< `make` is run, to determine whether REG_STARTEND is defined, this is a
< no-go.
< However, you *can* use autoconf directly, and come up with a patch to
< that detects the absence of REG_STARTEND and sets
< Alternatively, you can set NO_REGEX=1 in your config.mak.
< Or, if you use one of the auto-detected cases in config.mak.uname, you
< could patch it to set NO_REGEX=1.
< And lastly, the best alternative would be to teach musl about
< REG_STARTEND, as it is rather useful a feature.
< Ciao,
< Johannes

View attachment "mmap_file.c" of type "text/x-c" (1487 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.