patches/glibc/2.9/150-regex-BZ697.patch
author Johannes Stezenbach <js@sig21.net>
Thu Jul 29 19:30:37 2010 +0200 (2010-07-29)
branch1.7
changeset 2047 ace1d90c9b15
parent 1201 c9967a6e3b25
permissions -rw-r--r--
scripts: remove . from $PATH

Add CT_SanitizePath function which removes entries referring to ., /tmp
and non-existing directories from $PATH, and call it early in the
build script.

If . is in PATH, gcc-4.4.4 build breaks:

[ALL ] checking what assembler to use...
/tmp/build/targets/arm-unknown-linux-uclibcgnueabi/build/gcc-core-static/arm-unknown-linux-uclibcgnueabi/bin/as
...
[ALL ] config.status: creating as

i.e. "as" is supposed to be the arm-unknown-linux-uclibcgnueabi cross assembler,
but config.status creates a local "as" script which is calling the
host assembler.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
[Yann E. MORIN: style fixes + explanations]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 20dd8cef1c8adff0aa3e78ae6d7acfbc45ed5a83)
yann@1201
     1
Original patch from: gentoo/src/patchsets/glibc/2.9/0053_all_glibc-2.9-regex-BZ697.patch
yann@1201
     2
yann@1201
     3
-= BEGIN original header =-
yann@1201
     4
http://sourceware.org/ml/libc-alpha/2009-01/msg00006.html
yann@1201
     5
yann@1201
     6
From 37bdc055ceeb6b1144c07448a7210d9ab3fbb2f5 Mon Sep 17 00:00:00 2001
yann@1201
     7
From: Ulrich Drepper <drepper@redhat.com>
yann@1201
     8
Date: Thu, 8 Jan 2009 00:47:05 +0000
yann@1201
     9
Subject: [PATCH] (prune_impossible_nodes): Handle sifted_states[0] being NULL also if
yann@1201
    10
 there are no backreferences.
yann@1201
    11
yann@1201
    12
-= END original header =-
yann@1201
    13
yann@1201
    14
diff -durN glibc-2_9.orig/posix/regexec.c glibc-2_9/posix/regexec.c
yann@1201
    15
--- glibc-2_9.orig/posix/regexec.c	2007-10-12 19:47:13.000000000 +0200
yann@1201
    16
+++ glibc-2_9/posix/regexec.c	2009-02-02 22:00:43.000000000 +0100
yann@1201
    17
@@ -1004,6 +1004,11 @@
yann@1201
    18
       re_node_set_free (&sctx.limits);
yann@1201
    19
       if (BE (ret != REG_NOERROR, 0))
yann@1201
    20
 	goto free_return;
yann@1201
    21
+      if (sifted_states[0] == NULL)
yann@1201
    22
+	{
yann@1201
    23
+	  ret = REG_NOMATCH;
yann@1201
    24
+	  goto free_return;
yann@1201
    25
+	}
yann@1201
    26
     }
yann@1201
    27
   re_free (mctx->state_log);
yann@1201
    28
   mctx->state_log = sifted_states;