public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/18681] New: regexp.h is obsolete and buggy, and should be desupported
@ 2015-07-15 13:13 zackw at panix dot com
  2015-07-15 13:57 ` [Bug libc/18681] " zackw at panix dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zackw at panix dot com @ 2015-07-15 13:13 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18681

            Bug ID: 18681
           Summary: regexp.h is obsolete and buggy, and should be
                    desupported
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: zackw at panix dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

<regexp.h> (not to be confused with <regex.h>) is an obsolete and
frankly horrible regular expression-matching API.  It was part of SVID
but was withdrawn in Issue 5 (for reference, we're on Issue 7 now).
It doesn't do anything you can't do with <regex.h>, and using it
involves defining a bunch of macros before including the header.
Moreover, the code in regexp.h that uses those macros has been buggy
since its creation (in 1996) and no one has noticed, which indicates
to me that there are no users.  There are two bugs:

(1) It often invokes RETURN in error situations.  For example, it
    maps REG_EBRACE to RETURN(44).  That should be ERROR(44)
    instead.

(2) If it succeeds, it invokes RETURN with a pointer that points
    outside the buffer provided by the caller.  It should have
    placed the compiled regexp object at the beginning of the
    buffer and given to RETURN a pointer just beyond the end of
    the object.  This means the caller cannot deallocate the
    compiled regular expression.

(1) would be easy to fix, but (2) would require nontrivial surgery on the core
regular expression compiler.  Therefore I think that this API should just be
removed.

[ I discovered this independently, but it was reported to Debian in 2009 as
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=517625 and I have borrowed
some of this text from there.]

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/18681] regexp.h is obsolete and buggy, and should be desupported
  2015-07-15 13:13 [Bug libc/18681] New: regexp.h is obsolete and buggy, and should be desupported zackw at panix dot com
@ 2015-07-15 13:57 ` zackw at panix dot com
  2015-07-15 13:58 ` zackw at panix dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: zackw at panix dot com @ 2015-07-15 13:57 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18681

Zack Weinberg <zackw at panix dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |zackw at panix dot com

--- Comment #1 from Zack Weinberg <zackw at panix dot com> ---
Created attachment 8440
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8440&action=edit
proposed patch for 2.22

In 2.22, per discussion on the mailing list, we should only add #warnings.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/18681] regexp.h is obsolete and buggy, and should be desupported
  2015-07-15 13:13 [Bug libc/18681] New: regexp.h is obsolete and buggy, and should be desupported zackw at panix dot com
  2015-07-15 13:57 ` [Bug libc/18681] " zackw at panix dot com
  2015-07-15 13:58 ` zackw at panix dot com
@ 2015-07-15 13:58 ` zackw at panix dot com
  2015-08-16 15:37 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: zackw at panix dot com @ 2015-07-15 13:58 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18681

--- Comment #2 from Zack Weinberg <zackw at panix dot com> ---
Created attachment 8441
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8441&action=edit
proposed patch for 2.23

In 2.23 we could then apply this patch which removes the header (leaving a
stub) and demotes the code in regexp.c to compat symbols.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/18681] regexp.h is obsolete and buggy, and should be desupported
  2015-07-15 13:13 [Bug libc/18681] New: regexp.h is obsolete and buggy, and should be desupported zackw at panix dot com
  2015-07-15 13:57 ` [Bug libc/18681] " zackw at panix dot com
@ 2015-07-15 13:58 ` zackw at panix dot com
  2015-07-15 13:58 ` zackw at panix dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: zackw at panix dot com @ 2015-07-15 13:58 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18681

Zack Weinberg <zackw at panix dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/18681] regexp.h is obsolete and buggy, and should be desupported
  2015-07-15 13:13 [Bug libc/18681] New: regexp.h is obsolete and buggy, and should be desupported zackw at panix dot com
                   ` (2 preceding siblings ...)
  2015-07-15 13:58 ` zackw at panix dot com
@ 2015-08-16 15:37 ` cvs-commit at gcc dot gnu.org
  2015-08-18 13:29 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-08-16 15:37 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18681

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
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  1c70b6f1551fdb4b9fcdd34761dbe8505e97f60e (commit)
      from  d5dff793af80b6534e9fb2e4f0301993bd209a4f (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 -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1c70b6f1551fdb4b9fcdd34761dbe8505e97f60e

commit 1c70b6f1551fdb4b9fcdd34761dbe8505e97f60e
Author: Zack Weinberg <zackw@panix.com>
Date:   Sun Jul 12 15:27:34 2015 -0400

    Desupport regexp.h (bug 18681)

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

Summary of changes:
 ChangeLog     |    8 ++
 NEWS          |    6 +-
 misc/regexp.c |   29 ++++++--
 misc/regexp.h |  203 +--------------------------------------------------------
 4 files changed, 37 insertions(+), 209 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/18681] regexp.h is obsolete and buggy, and should be desupported
  2015-07-15 13:13 [Bug libc/18681] New: regexp.h is obsolete and buggy, and should be desupported zackw at panix dot com
                   ` (3 preceding siblings ...)
  2015-08-16 15:37 ` cvs-commit at gcc dot gnu.org
@ 2015-08-18 13:29 ` cvs-commit at gcc dot gnu.org
  2015-08-18 13:29 ` vapier at gentoo dot org
  2015-10-29 16:37 ` jsm28 at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-08-18 13:29 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18681

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
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  c9295fd40b5e43a34a9b416be37c27c263d9a661 (commit)
      from  41aff137cb095470fb7596ba013d9135478abedf (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 -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c9295fd40b5e43a34a9b416be37c27c263d9a661

commit c9295fd40b5e43a34a9b416be37c27c263d9a661
Author: Zack Weinberg <zackw@panix.com>
Date:   Mon Aug 17 11:28:46 2015 -0400

    regexp.h: update Versions to match file usage [BZ #18681]

    Since the new regexp.c code uses the GLIBC_2.23 symbol, make sure we
    declare it to avoid warnings/errors.

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

Summary of changes:
 ChangeLog     |    4 ++++
 misc/Versions |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/18681] regexp.h is obsolete and buggy, and should be desupported
  2015-07-15 13:13 [Bug libc/18681] New: regexp.h is obsolete and buggy, and should be desupported zackw at panix dot com
                   ` (4 preceding siblings ...)
  2015-08-18 13:29 ` cvs-commit at gcc dot gnu.org
@ 2015-08-18 13:29 ` vapier at gentoo dot org
  2015-10-29 16:37 ` jsm28 at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: vapier at gentoo dot org @ 2015-08-18 13:29 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18681

Mike Frysinger <vapier at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |vapier at gentoo dot org
            Version|unspecified                 |2.23
         Resolution|---                         |FIXED

--- Comment #4 from Mike Frysinger <vapier at gentoo dot org> ---
should be all set in master

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/18681] regexp.h is obsolete and buggy, and should be desupported
  2015-07-15 13:13 [Bug libc/18681] New: regexp.h is obsolete and buggy, and should be desupported zackw at panix dot com
                   ` (5 preceding siblings ...)
  2015-08-18 13:29 ` vapier at gentoo dot org
@ 2015-10-29 16:37 ` jsm28 at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-10-29 16:37 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18681

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.23

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-10-29 16:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-15 13:13 [Bug libc/18681] New: regexp.h is obsolete and buggy, and should be desupported zackw at panix dot com
2015-07-15 13:57 ` [Bug libc/18681] " zackw at panix dot com
2015-07-15 13:58 ` zackw at panix dot com
2015-07-15 13:58 ` zackw at panix dot com
2015-08-16 15:37 ` cvs-commit at gcc dot gnu.org
2015-08-18 13:29 ` cvs-commit at gcc dot gnu.org
2015-08-18 13:29 ` vapier at gentoo dot org
2015-10-29 16:37 ` jsm28 at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).