public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/113728] New: libasan uses incorrect prctl prototype
@ 2024-02-02 21:27 fw at gcc dot gnu.org
  2024-02-02 21:28 ` [Bug sanitizer/113728] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: fw at gcc dot gnu.org @ 2024-02-02 21:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113728

            Bug ID: 113728
           Summary: libasan uses incorrect prctl prototype
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fw at gcc dot gnu.org
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---
            Target: powerpc64le-linux-gnu

The prctl function in glibc is variadic, but the internal prototype used by
libasan has a fixed argument list.

This causes crashes on powerpc64le-linux-gnu with current glibc because the
glibc implementation is variadic as well, it uses <stdarg.h>. Older glibc uses
an assembler implementation which does not bother with variadic arguments. For
variadic function calls, it's the caller's responsibility to set up the
parameter save area, but that does not happen if function prototype is
incorrect and non-variadic.

I'll try to get this worked around in glibc, but I couldn't get my ABI
regression fix applied the first time I posted it. The libasan library isn't
the first application impacted by the prctl ABI change.

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

* [Bug sanitizer/113728] libasan uses incorrect prctl prototype
  2024-02-02 21:27 [Bug sanitizer/113728] New: libasan uses incorrect prctl prototype fw at gcc dot gnu.org
@ 2024-02-02 21:28 ` pinskia at gcc dot gnu.org
  2024-02-17 12:16 ` fw at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02 21:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113728

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you file this upstream to LLVM too?

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

* [Bug sanitizer/113728] libasan uses incorrect prctl prototype
  2024-02-02 21:27 [Bug sanitizer/113728] New: libasan uses incorrect prctl prototype fw at gcc dot gnu.org
  2024-02-02 21:28 ` [Bug sanitizer/113728] " pinskia at gcc dot gnu.org
@ 2024-02-17 12:16 ` fw at gcc dot gnu.org
  2024-02-27  3:53 ` bergner at gcc dot gnu.org
  2024-02-27  6:03 ` fw at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: fw at gcc dot gnu.org @ 2024-02-17 12:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113728

--- Comment #2 from Florian Weimer <fw at gcc dot gnu.org> ---
This has been worked around in glibc. Should we close this issue?

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

* [Bug sanitizer/113728] libasan uses incorrect prctl prototype
  2024-02-02 21:27 [Bug sanitizer/113728] New: libasan uses incorrect prctl prototype fw at gcc dot gnu.org
  2024-02-02 21:28 ` [Bug sanitizer/113728] " pinskia at gcc dot gnu.org
  2024-02-17 12:16 ` fw at gcc dot gnu.org
@ 2024-02-27  3:53 ` bergner at gcc dot gnu.org
  2024-02-27  6:03 ` fw at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: bergner at gcc dot gnu.org @ 2024-02-27  3:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113728

--- Comment #3 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Florian Weimer from comment #2)
> This has been worked around in glibc. Should we close this issue?

As the bug reporter and given glibc now has a workaround, I think you're fine
to close this if you think there's nothing to be done in GCC.

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

* [Bug sanitizer/113728] libasan uses incorrect prctl prototype
  2024-02-02 21:27 [Bug sanitizer/113728] New: libasan uses incorrect prctl prototype fw at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-02-27  3:53 ` bergner at gcc dot gnu.org
@ 2024-02-27  6:03 ` fw at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: fw at gcc dot gnu.org @ 2024-02-27  6:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113728

Florian Weimer <fw at gcc dot gnu.org> changed:

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

--- Comment #4 from Florian Weimer <fw at gcc dot gnu.org> ---
Then let's close it. We'll get the fix from LLVM if it ever gets implemented.

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

end of thread, other threads:[~2024-02-27  6:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-02 21:27 [Bug sanitizer/113728] New: libasan uses incorrect prctl prototype fw at gcc dot gnu.org
2024-02-02 21:28 ` [Bug sanitizer/113728] " pinskia at gcc dot gnu.org
2024-02-17 12:16 ` fw at gcc dot gnu.org
2024-02-27  3:53 ` bergner at gcc dot gnu.org
2024-02-27  6:03 ` fw at gcc dot gnu.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).