This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15473] null pointer handling in strcmp
- From: "carlos at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 16 May 2013 04:09:05 +0000
- Subject: [Bug libc/15473] null pointer handling in strcmp
- Auto-submitted: auto-generated
- References: <bug-15473-131 at http dot sourceware dot org/bugzilla/>
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.