From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10564 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.comp.version-control.git,gmane.linux.lib.musl.general Subject: Re: [musl] Re: Regression: git no longer works with musl libc's regex impl Date: Tue, 4 Oct 2016 13:39:26 -0400 Message-ID: <20161004173926.GA19318@brightrain.aerifal.cx> References: <20161004150848.GA7949@brightrain.aerifal.cx> <20161004152722.ex2nox43oj5ak4yi@sigill.intra.peff.net> <20161004154045.GT19318@brightrain.aerifal.cx> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1475602793 25259 195.159.176.226 (4 Oct 2016 17:39:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 4 Oct 2016 17:39:53 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Jeff King , git@vger.kernel.org, musl@lists.openwall.com To: Johannes Schindelin Original-X-From: git-owner@vger.kernel.org Tue Oct 04 19:39:48 2016 Return-path: Envelope-to: gcvg-git-2@m.gmane.org Original-Received: from vger.kernel.org ([209.132.180.67]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brTgo-0004vW-Cp for gcvg-git-2@m.gmane.org; Tue, 04 Oct 2016 19:39:38 +0200 Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752123AbcJDRjh (ORCPT ); Tue, 4 Oct 2016 13:39:37 -0400 Original-Received: from 216-12-86-13.cv.mvl.ntelos.net ([216.12.86.13]:55454 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752017AbcJDRjg (ORCPT ); Tue, 4 Oct 2016 13:39:36 -0400 Original-Received: from dalias by brightrain.aerifal.cx with local (Exim 3.15 #2) id 1brTgc-0002oM-00; Tue, 04 Oct 2016 17:39:26 +0000 Content-Disposition: inline In-Reply-To: Original-Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Xref: news.gmane.org gmane.comp.version-control.git:306100 gmane.linux.lib.musl.general:10564 Archived-At: On Tue, Oct 04, 2016 at 06:08:33PM +0200, Johannes Schindelin wrote: > 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 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. > > And quite honestly, there are lots of reasons to keep things running on > Windows, and even to favor Windows support over musl support. Over four > 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 those > 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 about > apples and oranges here. NO_REGEX is a Makefile flag, while REG_STARTEND > is a C preprocessor macro. It seems like you could just always compile the source file, and just have it all inside #if defined(NO_REGEX) || !defined(REG_STARTEND) or similar. > And lastly, the best alternative would be to teach musl about > REG_STARTEND, as it is rather useful a feature. Maybe, but it seems fundamentally costly to support -- it's extra state in the inner loops that imposes costly spill/reload on archs with too few registers (x86). I'll look at doing this when we overhaul/replace the regex implementation, and I'm happy to do some performance-regression tests for adding it now if someone has a simple patch (as was mentioned on the musl list). Rich