public inbox for glibc-bugs-regex@sourceware.org
help / color / mirror / Atom feed
* [Bug regex/1227] New: regexec portability bug: code assumes reg_errcode_t is signed
@ 2005-08-21  4:58 eggert at gnu dot org
  2005-08-21  4:59 ` [Bug regex/1227] " eggert at gnu dot org
  2005-09-06 19:35 ` drepper at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: eggert at gnu dot org @ 2005-08-21  4:58 UTC (permalink / raw)
  To: glibc-bugs-regex

There's a portability bug in sift_states_bkref.  The code assumes that
reg_errcode_t is a signed type that can represent -1, but this is not
necessarily true if _XOPEN_SOURCE is not defined, because in that case
reg_errcode_t is an enumerated type containing only nonnegative values,
and the C standard allows such types to be unsigned.

This problem was reported by Sam Steingold in
<http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.

I'll attach a patch.

-- 
           Summary: regexec portability bug: code assumes reg_errcode_t is
                    signed
           Product: glibc
           Version: 2.3.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: regex
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: eggert at gnu dot org
                CC: glibc-bugs-regex at sources dot redhat dot com,glibc-
                    bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=1227

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug regex/1227] regexec portability bug: code assumes reg_errcode_t is signed
  2005-08-21  4:58 [Bug regex/1227] New: regexec portability bug: code assumes reg_errcode_t is signed eggert at gnu dot org
@ 2005-08-21  4:59 ` eggert at gnu dot org
  2005-09-06 19:35 ` drepper at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: eggert at gnu dot org @ 2005-08-21  4:59 UTC (permalink / raw)
  To: glibc-bugs-regex


------- Additional Comments From eggert at gnu dot org  2005-08-21 04:59 -------
Created an attachment (id=605)
 --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=605&action=view)
fixed bug with assigning int to reg_errcode_t


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=1227

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug regex/1227] regexec portability bug: code assumes reg_errcode_t is signed
  2005-08-21  4:58 [Bug regex/1227] New: regexec portability bug: code assumes reg_errcode_t is signed eggert at gnu dot org
  2005-08-21  4:59 ` [Bug regex/1227] " eggert at gnu dot org
@ 2005-09-06 19:35 ` drepper at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: drepper at redhat dot com @ 2005-09-06 19:35 UTC (permalink / raw)
  To: glibc-bugs-regex


------- Additional Comments From drepper at redhat dot com  2005-09-06 19:35 -------
The justification and changelog is wrong.  The return value of
re_node_set_insert is simply not of that type.  Fixed in trunk.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=1227

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2005-09-06 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-21  4:58 [Bug regex/1227] New: regexec portability bug: code assumes reg_errcode_t is signed eggert at gnu dot org
2005-08-21  4:59 ` [Bug regex/1227] " eggert at gnu dot org
2005-09-06 19:35 ` drepper at redhat dot com

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).