This is the mail archive of the glibc-bugs@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]

[Bug libc/15473] null pointer handling in strcmp


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.


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