public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ports/14250] New: ia64 makecontext.c writes to stderr and it should not.
@ 2012-06-15 14:49 carlos_odonell at mentor dot com
  2012-06-16  3:56 ` [Bug ports/14250] " vapier at gentoo dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: carlos_odonell at mentor dot com @ 2012-06-15 14:49 UTC (permalink / raw)
  To: glibc-bugs

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

             Bug #: 14250
           Summary: ia64 makecontext.c writes to stderr and it should not.
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ports
        AssignedTo: unassigned@sourceware.org
        ReportedBy: carlos_odonell@mentor.com
                CC: carlos@systemhalted.org, roland@gnu.org,
                    vapier@gentoo.org
    Classification: Unclassified
              Host: ia64-linux-gnu
            Target: ia64-linux-gnu
             Build: ia64-linux-gnu


The implementation of makecontext() for ia64
(ports/sysdeps/unix/sysv/linux/ia64/makecontext.c) writes to stderr if there
are more than 8 arguments.

The function should not write to stderr, see bug #13983 for some background.
Instead the function should set errno and return.

Unfortunately POSIX doesn't seem to dictate any errno for makecontext(), almost
as if it should never fail. This is IMO an oversight, we should return EINVAL
when > 8 arguments. At least IBM's XL C runtime returns EINVAL with invalid
argc.

We must strive for a high QoI and avoid arbitrarily writing to stderr.

-- 
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] 9+ messages in thread

* [Bug ports/14250] ia64 makecontext.c writes to stderr and it should not.
  2012-06-15 14:49 [Bug ports/14250] New: ia64 makecontext.c writes to stderr and it should not carlos_odonell at mentor dot com
@ 2012-06-16  3:56 ` vapier at gentoo dot org
  2012-06-18 14:19 ` carlos_odonell at mentor dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vapier at gentoo dot org @ 2012-06-16  3:56 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from Mike Frysinger <vapier at gentoo dot org> 2012-06-16 03:56:17 UTC ---
i did see this failure, but was trying to figure out how to make it work.  i'm
not really worried about the stderr write ... the fact that it calls exit()
seems like a much worse violation.

i could have it setup the context in such a way that when it calls setcontext,
that function would return an error ...

-- 
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] 9+ messages in thread

* [Bug ports/14250] ia64 makecontext.c writes to stderr and it should not.
  2012-06-15 14:49 [Bug ports/14250] New: ia64 makecontext.c writes to stderr and it should not carlos_odonell at mentor dot com
  2012-06-16  3:56 ` [Bug ports/14250] " vapier at gentoo dot org
@ 2012-06-18 14:19 ` carlos_odonell at mentor dot com
  2012-06-18 21:42 ` bugdal at aerifal dot cx
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: carlos_odonell at mentor dot com @ 2012-06-18 14:19 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from Carlos O'Donell <carlos_odonell at mentor dot com> 2012-06-18 14:19:07 UTC ---
Mike,

I didn't notice the call to exit(). Calling exit() is definitely the wrong
thing to do in this context. 

Returning EINVAL when argc > 8 would fix both of these problems.

I wonder if you couldn't somehow macro-ize this to fail at build time if argc
was greater than 8?

-- 
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] 9+ messages in thread

* [Bug ports/14250] ia64 makecontext.c writes to stderr and it should not.
  2012-06-15 14:49 [Bug ports/14250] New: ia64 makecontext.c writes to stderr and it should not carlos_odonell at mentor dot com
  2012-06-16  3:56 ` [Bug ports/14250] " vapier at gentoo dot org
  2012-06-18 14:19 ` carlos_odonell at mentor dot com
@ 2012-06-18 21:42 ` bugdal at aerifal dot cx
  2014-02-17 18:17 ` [Bug libc/14250] [ia64] " jsm28 at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugdal at aerifal dot cx @ 2012-06-18 21:42 UTC (permalink / raw)
  To: glibc-bugs

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

Rich Felker <bugdal at aerifal dot cx> changed:

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

--- Comment #3 from Rich Felker <bugdal at aerifal dot cx> 2012-06-18 21:41:54 UTC ---
It's possible to make it fail at compile-time using macros if the function is
called directly, but this won't catch all cases, such as calls to makecontext
via a function pointer or when the caller prototypes the function without
including the header. The test at runtime is really necessary.

-- 
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] 9+ messages in thread

* [Bug libc/14250] [ia64] ia64 makecontext.c writes to stderr and it should not.
  2012-06-15 14:49 [Bug ports/14250] New: ia64 makecontext.c writes to stderr and it should not carlos_odonell at mentor dot com
                   ` (2 preceding siblings ...)
  2012-06-18 21:42 ` bugdal at aerifal dot cx
@ 2014-02-17 18:17 ` jsm28 at gcc dot gnu.org
  2014-06-25 10:54 ` fweimer at redhat dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2014-02-17 18:17 UTC (permalink / raw)
  To: glibc-bugs

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

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |drepper.fsp at gmail dot com
          Component|ports                       |libc
            Summary|ia64 makecontext.c writes   |[ia64] ia64 makecontext.c
                   |to stderr and it should     |writes to stderr and it
                   |not.                        |should not.

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


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

* [Bug libc/14250] [ia64] ia64 makecontext.c writes to stderr and it should not.
  2012-06-15 14:49 [Bug ports/14250] New: ia64 makecontext.c writes to stderr and it should not carlos_odonell at mentor dot com
                   ` (3 preceding siblings ...)
  2014-02-17 18:17 ` [Bug libc/14250] [ia64] " jsm28 at gcc dot gnu.org
@ 2014-06-25 10:54 ` fweimer at redhat dot com
  2024-01-08 20:09 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: fweimer at redhat dot com @ 2014-06-25 10:54 UTC (permalink / raw)
  To: glibc-bugs

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

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] 9+ messages in thread

* [Bug libc/14250] [ia64] ia64 makecontext.c writes to stderr and it should not.
  2012-06-15 14:49 [Bug ports/14250] New: ia64 makecontext.c writes to stderr and it should not carlos_odonell at mentor dot com
                   ` (4 preceding siblings ...)
  2014-06-25 10:54 ` fweimer at redhat dot com
@ 2024-01-08 20:09 ` cvs-commit at gcc dot gnu.org
  2024-01-09  2:47 ` adhemerval.zanella at linaro dot org
  2024-01-09  2:52 ` adhemerval.zanella at linaro dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-08 20:09 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #4 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Adhemerval Zanella
<azanella@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=460860f457e2a889785c506e8c77d4a7dff24d3e

commit 460860f457e2a889785c506e8c77d4a7dff24d3e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Jan 8 10:21:17 2024 -0300

    Remove ia64-linux-gnu

    Linux 6.7 removed ia64 from the official tree [1], following the general
    principle that a glibc port needs upstream support for the architecture
    in all the components it depends on (binutils, GCC, and the Linux
    kernel).

    Apart from the removal of sysdeps/ia64 and sysdeps/unix/sysv/linux/ia64,
    there are updates to various comments referencing ia64 for which removal
    of those references seemed appropriate. The configuration is removed
    from README and build-many-glibcs.py.

    The CONTRIBUTED-BY, elf/elf.h, manual/contrib.texi (the porting
    mention), *.po files, config.guess, and longlong.h are not changed.

    For Linux it allows cleanup some clone2 support on multiple files.

    The following bug can be closed as WONTFIX: BZ 22634 [2], BZ 14250 [3],
    BZ 21634 [4], BZ 10163 [5], BZ 16401 [6], and BZ 11585 [7].

    [1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=43ff221426d33db909f7159fdf620c3b052e2d1c
    [2] https://sourceware.org/bugzilla/show_bug.cgi?id=22634
    [3] https://sourceware.org/bugzilla/show_bug.cgi?id=14250
    [4] https://sourceware.org/bugzilla/show_bug.cgi?id=21634
    [5] https://sourceware.org/bugzilla/show_bug.cgi?id=10163
    [6] https://sourceware.org/bugzilla/show_bug.cgi?id=16401
    [7] https://sourceware.org/bugzilla/show_bug.cgi?id=11585
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>

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

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

* [Bug libc/14250] [ia64] ia64 makecontext.c writes to stderr and it should not.
  2012-06-15 14:49 [Bug ports/14250] New: ia64 makecontext.c writes to stderr and it should not carlos_odonell at mentor dot com
                   ` (5 preceding siblings ...)
  2024-01-08 20:09 ` cvs-commit at gcc dot gnu.org
@ 2024-01-09  2:47 ` adhemerval.zanella at linaro dot org
  2024-01-09  2:52 ` adhemerval.zanella at linaro dot org
  7 siblings, 0 replies; 9+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2024-01-09  2:47 UTC (permalink / raw)
  To: glibc-bugs

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

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg
         Resolution|---                         |WONTFIX

--- Comment #5 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Per last comment.

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

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

* [Bug libc/14250] [ia64] ia64 makecontext.c writes to stderr and it should not.
  2012-06-15 14:49 [Bug ports/14250] New: ia64 makecontext.c writes to stderr and it should not carlos_odonell at mentor dot com
                   ` (6 preceding siblings ...)
  2024-01-09  2:47 ` adhemerval.zanella at linaro dot org
@ 2024-01-09  2:52 ` adhemerval.zanella at linaro dot org
  7 siblings, 0 replies; 9+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2024-01-09  2:52 UTC (permalink / raw)
  To: glibc-bugs

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

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.39

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

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

end of thread, other threads:[~2024-01-09  2:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-15 14:49 [Bug ports/14250] New: ia64 makecontext.c writes to stderr and it should not carlos_odonell at mentor dot com
2012-06-16  3:56 ` [Bug ports/14250] " vapier at gentoo dot org
2012-06-18 14:19 ` carlos_odonell at mentor dot com
2012-06-18 21:42 ` bugdal at aerifal dot cx
2014-02-17 18:17 ` [Bug libc/14250] [ia64] " jsm28 at gcc dot gnu.org
2014-06-25 10:54 ` fweimer at redhat dot com
2024-01-08 20:09 ` cvs-commit at gcc dot gnu.org
2024-01-09  2:47 ` adhemerval.zanella at linaro dot org
2024-01-09  2:52 ` adhemerval.zanella at linaro 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).