public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/15473] New: null pointer handling in strcmp
@ 2013-05-16  3:53 htpcucxo at yahoo dot co.jp
  2013-05-16  3:55 ` [Bug libc/15473] " htpcucxo at yahoo dot co.jp
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: htpcucxo at yahoo dot co.jp @ 2013-05-16  3:53 UTC (permalink / raw)
  To: glibc-bugs

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

             Bug #: 15473
           Summary: null pointer handling in strcmp
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: htpcucxo@yahoo.co.jp
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


When we use strcmp(p, NULL) with Unix machine, It returns zero.
  But on Linux(glibc) it results into crash.

  I know in this case, the behavior of strcmp is "undefined".
  So it's not bug, but since it's useful for the user to port to Linux 
  from other Unix, it would be nice to select the option etc.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug libc/15473] null pointer handling in strcmp
  2013-05-16  3:53 [Bug libc/15473] New: null pointer handling in strcmp htpcucxo at yahoo dot co.jp
@ 2013-05-16  3:55 ` htpcucxo at yahoo dot co.jp
  2013-05-16  3:59 ` bugdal at aerifal dot cx
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: htpcucxo at yahoo dot co.jp @ 2013-05-16  3:55 UTC (permalink / raw)
  To: glibc-bugs

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

htpcucxo at yahoo dot co.jp changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug libc/15473] null pointer handling in strcmp
  2013-05-16  3:53 [Bug libc/15473] New: null pointer handling in strcmp htpcucxo at yahoo dot co.jp
  2013-05-16  3:55 ` [Bug libc/15473] " htpcucxo at yahoo dot co.jp
@ 2013-05-16  3:59 ` bugdal at aerifal dot cx
  2013-05-16  4:09 ` carlos at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bugdal at aerifal dot cx @ 2013-05-16  3:59 UTC (permalink / raw)
  To: glibc-bugs

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

Rich Felker <bugdal at aerifal dot cx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugdal at aerifal dot cx

--- Comment #1 from Rich Felker <bugdal at aerifal dot cx> 2013-05-16 03:58:56 UTC ---
All this change would do is hide application bugs and reduce performance. I'm
strongly against it.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug libc/15473] null pointer handling in strcmp
  2013-05-16  3:53 [Bug libc/15473] New: null pointer handling in strcmp htpcucxo at yahoo dot co.jp
  2013-05-16  3:55 ` [Bug libc/15473] " htpcucxo at yahoo dot co.jp
  2013-05-16  3:59 ` bugdal at aerifal dot cx
@ 2013-05-16  4:09 ` carlos at redhat dot com
  2013-05-16  7:20 ` schwab@linux-m68k.org
  2014-06-13 17:45 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: carlos at redhat dot com @ 2013-05-16  4:09 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |carlos at redhat dot com
         Resolution|                            |WONTFIX

--- Comment #2 from Carlos O'Donell <carlos at redhat dot com> 2013-05-16 04:09:05 UTC ---
(In reply to comment #0)
> When we use strcmp(p, NULL) with Unix machine, It returns zero.
>   But on Linux(glibc) it results into crash.
> 
>   I know in this case, the behavior of strcmp is "undefined".
>   So it's not bug, but since it's useful for the user to port to Linux 
>   from other Unix, it would be nice to select the option etc.

This hides real bugs.

It also appears to incorrectly imply that NULL is equal to every string.

If you really want this kind of change then you need to talk to the standards
authors in the Austin Group (POSIX) and at your local ISO national body for
SC22/WG14.

Until then marking as resolved wontfix.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug libc/15473] null pointer handling in strcmp
  2013-05-16  3:53 [Bug libc/15473] New: null pointer handling in strcmp htpcucxo at yahoo dot co.jp
                   ` (2 preceding siblings ...)
  2013-05-16  4:09 ` carlos at redhat dot com
@ 2013-05-16  7:20 ` schwab@linux-m68k.org
  2014-06-13 17:45 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: schwab@linux-m68k.org @ 2013-05-16  7:20 UTC (permalink / raw)
  To: glibc-bugs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WONTFIX                     |INVALID

--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> 2013-05-16 07:20:08 UTC ---
There is nothing to fix here.  NULL cannot sensibly be ordered with non-NULL
values, so it is impossible to define a return value.  Talking to ISO would be
a waste of time.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug libc/15473] null pointer handling in strcmp
  2013-05-16  3:53 [Bug libc/15473] New: null pointer handling in strcmp htpcucxo at yahoo dot co.jp
                   ` (3 preceding siblings ...)
  2013-05-16  7:20 ` schwab@linux-m68k.org
@ 2014-06-13 17:45 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 17:45 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
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:[~2014-06-13 17:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-16  3:53 [Bug libc/15473] New: null pointer handling in strcmp htpcucxo at yahoo dot co.jp
2013-05-16  3:55 ` [Bug libc/15473] " htpcucxo at yahoo dot co.jp
2013-05-16  3:59 ` bugdal at aerifal dot cx
2013-05-16  4:09 ` carlos at redhat dot com
2013-05-16  7:20 ` schwab@linux-m68k.org
2014-06-13 17:45 ` 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).