public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/17746] New: tilegx32: strstr can miss the end of the string
@ 2014-12-22 19:49 cmetcalf at ezchip dot com
  2014-12-22 19:53 ` [Bug libc/17746] " cvs-commit at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: cmetcalf at ezchip dot com @ 2014-12-22 19:49 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 17746
           Summary: tilegx32: strstr can miss the end of the string
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: cmetcalf at ezchip dot com
                CC: drepper.fsp at gmail dot com

The code uses a __builtin_expect() test on a raw uint64_t value to see if it is
zero.  Unfortunately __builtin_expect() takes a long, so we lose the high 32
bits in ILP32 mode.  This can mean we don't see the final NUL on the string.

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


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

end of thread, other threads:[~2015-01-29 14:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-22 19:49 [Bug libc/17746] New: tilegx32: strstr can miss the end of the string cmetcalf at ezchip dot com
2014-12-22 19:53 ` [Bug libc/17746] " cvs-commit at gcc dot gnu.org
2014-12-22 19:54 ` cmetcalf at ezchip dot com
2015-01-29 13:22 ` fweimer at redhat dot com
2015-01-29 14:37 ` cmetcalf at ezchip dot com
2015-01-29 14:44 ` fweimer 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).