X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=H9K /gpprmrqnD3Ru1ULoXEnGW6TrQ4/jzuHOCHUImUD2umuUoCTfUpOOq6MzWNaxarK CbD0XEj2LbrQko/zY5uIF38yVb+7aNqFgaoHxRc3yfgg5F8ULpnMrtAg2hoJ4tZa K6VW3t+Nw1rtol2D7otM3d/AP26zW0D9SK7wrdGA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=tkj4WCXsb 2JNpgCQv98xUT9yM5g=; b=Mm/+hyMtANRKaiKO46xW/kD7glNzBUJxaN3k1/mXn amNL/v9q5eBk8fnqZYMVwxRZ67+QSYR4NTNDhgX8vBr2o7c6jEd90AyoG4sZjPRN v2RO8uH5bvm7jmUa1+rosN+l/vnmK9ckOhtz1qmeJgZLS2T+/QuAG7+pUClOtYyb xk= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RDNS_NONE,SPF_HELO_PASS,SPF_PASS,TW_EG,TW_NX,TW_YG autolearn=no version=3.3.1 To: cygwin AT cygwin DOT com From: Mark Levedahl Subject: regex library fails git tests Date: Sat, 20 Jul 2013 15:52:02 -0400 Lines: 50 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 Current git fails two sets of tests on cygwin due apparently to problems in the regex library. One set of tests does language based word-matching, and has a common failure during regex compilation. The suffix clause ("|[^[:space:]]|[\xc0-\xff][\x80-\xbf]+") is common to all of these, removing that clause eliminates the regcomp failure. A test case extracted from the git sources is below - this works correctly on Fedora 18, fails on Cygwin: $ gcc test-regex.c $ ./a.out failed regcomp() for pattern '[^<>= ]+|[^[:space:]]|[▒-▒][▒-▒]+' The failure disappears when the suffix clause is removed from pat_html. This is happening on a current installation: $ uname -a CYGWIN_NT-5.1 virt-winxp 1.7.21(0.267/5/3) 2013-07-15 12:17 i686 Cygwin $ cygcheck -c gcc-core gcc-g++ Cygwin Package Information Package Version Status gcc-core 4.7.3-1 OK gcc-g++ 4.7.3-1 OK ------------ #include #include int main(int argc, char **argv) { char *pat_html = "[^<>= \t]+" "|[^[:space:]]|[\xc0-\xff][\x80-\xbf]+"; char *str = "={}\nfred"; regex_t r; regmatch_t m[1]; if (regcomp(&r, pat_html, REG_EXTENDED | REG_NEWLINE)) { printf("failed regcomp() for pattern '%s'\n", pat_html); return 1; } if (regexec(&r, str, 1, m, 0)) { printf("no match of pattern '%s' to string '%s'\n", pat_html, str); return 1; } return 0; } Mark -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple