public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/25895] New: Document fopen with pathname == NULL
@ 2020-04-29 14:52 marxin.liska at gmail dot com
  2020-04-29 15:26 ` [Bug libc/25895] " schwab@linux-m68k.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: marxin.liska at gmail dot com @ 2020-04-29 14:52 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 25895
           Summary: Document fopen with pathname == NULL
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: marxin.liska at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

It's follow up of:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94849

There are 2 questions:
- is it valid to call fopen with pathname == NULL?
- NULL argument is not mentioned at 'man fopen'

Note that Microsoft allows NULL argument:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fopen-wfopen?view=vs-2019

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

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

* [Bug libc/25895] Document fopen with pathname == NULL
  2020-04-29 14:52 [Bug libc/25895] New: Document fopen with pathname == NULL marxin.liska at gmail dot com
@ 2020-04-29 15:26 ` schwab@linux-m68k.org
  2020-04-29 16:37 ` marxin.liska at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: schwab@linux-m68k.org @ 2020-04-29 15:26 UTC (permalink / raw)
  To: glibc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
The first argument of fopen must be a string, and NULL isn't.  There is nothing
more to document, since it is covered by general undefined behviour.

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

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

* [Bug libc/25895] Document fopen with pathname == NULL
  2020-04-29 14:52 [Bug libc/25895] New: Document fopen with pathname == NULL marxin.liska at gmail dot com
  2020-04-29 15:26 ` [Bug libc/25895] " schwab@linux-m68k.org
@ 2020-04-29 16:37 ` marxin.liska at gmail dot com
  2020-05-04 18:11 ` marxin.liska at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin.liska at gmail dot com @ 2020-04-29 16:37 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from Martin Liška <marxin.liska at gmail dot com> ---
So would it be possible to decorate the function with __nonnull ((1))?

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

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

* [Bug libc/25895] Document fopen with pathname == NULL
  2020-04-29 14:52 [Bug libc/25895] New: Document fopen with pathname == NULL marxin.liska at gmail dot com
  2020-04-29 15:26 ` [Bug libc/25895] " schwab@linux-m68k.org
  2020-04-29 16:37 ` marxin.liska at gmail dot com
@ 2020-05-04 18:11 ` marxin.liska at gmail dot com
  2020-05-09  8:02 ` mliska at suse dot cz
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin.liska at gmail dot com @ 2020-05-04 18:11 UTC (permalink / raw)
  To: glibc-bugs

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

Martin Liška <marxin.liska at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |---

--- Comment #3 from Martin Liška <marxin.liska at gmail dot com> ---
.

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

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

* [Bug libc/25895] Document fopen with pathname == NULL
  2020-04-29 14:52 [Bug libc/25895] New: Document fopen with pathname == NULL marxin.liska at gmail dot com
                   ` (2 preceding siblings ...)
  2020-05-04 18:11 ` marxin.liska at gmail dot com
@ 2020-05-09  8:02 ` mliska at suse dot cz
  2024-04-18 15:52 ` [Bug libc/25895] Add __nonnull ((1)) to fopen declaration carlos at redhat dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mliska at suse dot cz @ 2020-05-09  8:02 UTC (permalink / raw)
  To: glibc-bugs

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

Martin Liska <mliska at suse dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mliska at suse dot cz

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

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

* [Bug libc/25895] Add __nonnull ((1)) to fopen declaration
  2020-04-29 14:52 [Bug libc/25895] New: Document fopen with pathname == NULL marxin.liska at gmail dot com
                   ` (3 preceding siblings ...)
  2020-05-09  8:02 ` mliska at suse dot cz
@ 2024-04-18 15:52 ` carlos at redhat dot com
  2024-04-18 15:53 ` carlos at redhat dot com
  2024-05-10  1:56 ` sam at gentoo dot org
  6 siblings, 0 replies; 8+ messages in thread
From: carlos at redhat dot com @ 2024-04-18 15:52 UTC (permalink / raw)
  To: glibc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Document fopen with         |Add __nonnull ((1)) to
                   |pathname == NULL            |fopen declaration
                 CC|                            |carlos at redhat dot com

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

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

* [Bug libc/25895] Add __nonnull ((1)) to fopen declaration
  2020-04-29 14:52 [Bug libc/25895] New: Document fopen with pathname == NULL marxin.liska at gmail dot com
                   ` (4 preceding siblings ...)
  2024-04-18 15:52 ` [Bug libc/25895] Add __nonnull ((1)) to fopen declaration carlos at redhat dot com
@ 2024-04-18 15:53 ` carlos at redhat dot com
  2024-05-10  1:56 ` sam at gentoo dot org
  6 siblings, 0 replies; 8+ messages in thread
From: carlos at redhat dot com @ 2024-04-18 15:53 UTC (permalink / raw)
  To: glibc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-04-18

--- Comment #4 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Martin Liška from comment #2)
> So would it be possible to decorate the function with __nonnull ((1))?

That would be an interesting thing to do but would require distribution testing
to make sure we don't break applications that are currently compiling.

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

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

* [Bug libc/25895] Add __nonnull ((1)) to fopen declaration
  2020-04-29 14:52 [Bug libc/25895] New: Document fopen with pathname == NULL marxin.liska at gmail dot com
                   ` (5 preceding siblings ...)
  2024-04-18 15:53 ` carlos at redhat dot com
@ 2024-05-10  1:56 ` sam at gentoo dot org
  6 siblings, 0 replies; 8+ messages in thread
From: sam at gentoo dot org @ 2024-05-10  1:56 UTC (permalink / raw)
  To: glibc-bugs

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

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org

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

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

end of thread, other threads:[~2024-05-10  1:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 14:52 [Bug libc/25895] New: Document fopen with pathname == NULL marxin.liska at gmail dot com
2020-04-29 15:26 ` [Bug libc/25895] " schwab@linux-m68k.org
2020-04-29 16:37 ` marxin.liska at gmail dot com
2020-05-04 18:11 ` marxin.liska at gmail dot com
2020-05-09  8:02 ` mliska at suse dot cz
2024-04-18 15:52 ` [Bug libc/25895] Add __nonnull ((1)) to fopen declaration carlos at redhat dot com
2024-04-18 15:53 ` carlos at redhat dot com
2024-05-10  1:56 ` sam at gentoo dot org

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