This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.15-1-g2ba9274


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  2ba92745c36eb3c3f3af0ce1b0aebd255c63a13b (commit)
      from  c0da14cdda1fa552262ce3624156194eef43e973 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2ba92745c36eb3c3f3af0ce1b0aebd255c63a13b

commit 2ba92745c36eb3c3f3af0ce1b0aebd255c63a13b
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Dec 30 17:13:56 2011 -0500

    Fix up regcomp/regexec
    
    The problem is that parse_bracket_symbol is miscompiled, and it turns
    out it is because of an incorrect attribute on re_string_fetch_byte_case.
    Unlike re_string_peek_byte_case, this one is really not pure, it modifies memory
    (increments pstr->cur_idx), and with the pure attribute GCC assumed it doesn't
    and it cached the presumed value of regexp->cur_idx in a variable across the
     for (;; ++i)
       {
         if (i >= BRACKET_NAME_BUF_SIZE)
           return REG_EBRACK;
         if (token->type == OP_OPEN_CHAR_CLASS)
           ch = re_string_fetch_byte_case (regexp);
         else
           ch = re_string_fetch_byte (regexp);
         if (re_string_eoi(regexp))
           return REG_EBRACK;
         if (ch == delim && re_string_peek_byte (regexp, 0) == ']')
           break;
         elem->opr.name[i] = ch;
       }

diff --git a/ChangeLog b/ChangeLog
index e81ffc1..7a534b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-30  Jakub Jelinek  <jakub@redhat.com>
+
+	* posix/regex_internal.c (re_string_fetch_byte_case): Remove
+	pure attribute.
+
 2011-12-23  Ulrich Drepper  <drepper@gmail.com>
 
 	* version.h (RELEASE): Bump for 2.15 release.
diff --git a/posix/regex_internal.c b/posix/regex_internal.c
index bc19243..124f8cc 100644
--- a/posix/regex_internal.c
+++ b/posix/regex_internal.c
@@ -868,7 +868,7 @@ re_string_peek_byte_case (const re_string_t *pstr, int idx)
 }
 
 static unsigned char
-internal_function __attribute ((pure))
+internal_function
 re_string_fetch_byte_case (re_string_t *pstr)
 {
   if (BE (!pstr->mbs_allocated, 1))

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |    5 +++++
 posix/regex_internal.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]