public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/113402] New: Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr
@ 2024-01-15 16:38 fw at gcc dot gnu.org
  2024-01-15 16:44 ` [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1 fw at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: fw at gcc dot gnu.org @ 2024-01-15 16:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113402
           Summary: Incorrect symbol versions for
                    __builtin_nested_func_ptr_created,
                    __builtin_nested_func_ptr
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fw at gcc dot gnu.org
  Target Milestone: ---

The symbols are about to be added to GCC 14, but they use a GCC_7.0.0 symbol
version in libgcc_s. The set of symbols associated with a version cannot be
changed after a release, otherwise dependency management based on symbol
versions does not work.

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

* [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1
  2024-01-15 16:38 [Bug libgcc/113402] New: Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr fw at gcc dot gnu.org
@ 2024-01-15 16:44 ` fw at gcc dot gnu.org
  2024-01-15 17:00 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: fw at gcc dot gnu.org @ 2024-01-15 16:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Florian Weimer <fw at gcc dot gnu.org> ---
I should say I have only tested this on x86-64, but it is likely that this
impacts other supported ABIs as well.

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

* [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1
  2024-01-15 16:38 [Bug libgcc/113402] New: Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr fw at gcc dot gnu.org
  2024-01-15 16:44 ` [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1 fw at gcc dot gnu.org
@ 2024-01-15 17:00 ` jakub at gcc dot gnu.org
  2024-01-15 20:30 ` iains at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-01-15 17:00 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-01-15
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 57087
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57087&action=edit
gcc14-pr113402.patch

Untested fix.

Though, I wonder if we also shouldn't rename those symbols, having __builtin_
prefix in the names is highly undesirable.  Weren't we contemplating disabling
support of defining or even declaring __builtin_* functions/variables
altogether several times?

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

* [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1
  2024-01-15 16:38 [Bug libgcc/113402] New: Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr fw at gcc dot gnu.org
  2024-01-15 16:44 ` [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1 fw at gcc dot gnu.org
  2024-01-15 17:00 ` jakub at gcc dot gnu.org
@ 2024-01-15 20:30 ` iains at gcc dot gnu.org
  2024-01-16  8:00 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: iains at gcc dot gnu.org @ 2024-01-15 20:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> Created attachment 57087 [details]
> gcc14-pr113402.patch
> 

> 
> Though, I wonder if we also shouldn't rename those symbols, having __builtin_
> prefix in the names is highly undesirable. 

We can easily do this now, if needed; since this is the first release it would
have least impact.

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

* [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1
  2024-01-15 16:38 [Bug libgcc/113402] New: Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr fw at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-01-15 20:30 ` iains at gcc dot gnu.org
@ 2024-01-16  8:00 ` rguenth at gcc dot gnu.org
  2024-01-28 11:00 ` cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-16  8:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
I'm OK with renaming (but then some namespace prefix would be nice, at least
two underscores, but __gcc_ might be better)

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

* [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1
  2024-01-15 16:38 [Bug libgcc/113402] New: Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr fw at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-01-16  8:00 ` rguenth at gcc dot gnu.org
@ 2024-01-28 11:00 ` cvs-commit at gcc dot gnu.org
  2024-01-31 18:33 ` danglin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-28 11:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>:

https://gcc.gnu.org/g:837827f8f2542c36ba5944b4da0a76ea6a64b08b

commit r14-8476-g837827f8f2542c36ba5944b4da0a76ea6a64b08b
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Tue Jan 16 10:21:14 2024 +0000

    Fix __builtin_nested_func_ptr_{created,deleted} symbol versions [PR113402]

    The symbols for the functions supporting heap-based trampolines were
    exported at an incorrect symbol version, the following patch fixes that.

    As requested in the PR, this also renames __builtin_nested_func_ptr* to
    __gcc_nested_func_ptr*.  In carrying our the rename, we move the builtins
    to use DEF_EXT_LIB_BUILTIN.

            PR libgcc/113402

    gcc/ChangeLog:

            * builtins.cc (expand_builtin): Handle
BUILT_IN_GCC_NESTED_PTR_CREATED
            and BUILT_IN_GCC_NESTED_PTR_DELETED.
            * builtins.def (BUILT_IN_GCC_NESTED_PTR_CREATED,
            BUILT_IN_GCC_NESTED_PTR_DELETED): Make these builtins LIB-EXT and
            rename the library fallbacks to __gcc_nested_func_ptr_created and
            __gcc_nested_func_ptr_deleted.
            * doc/invoke.texi: Rename these to __gcc_nested_func_ptr_created
            and __gcc_nested_func_ptr_deleted.
            * tree-nested.cc (finalize_nesting_tree_1): Use builtin_explicit
for
            BUILT_IN_GCC_NESTED_PTR_CREATED and
BUILT_IN_GCC_NESTED_PTR_DELETED.
            * tree.cc (build_common_builtin_nodes): Build the
            BUILT_IN_GCC_NESTED_PTR_CREATED and BUILT_IN_GCC_NESTED_PTR_DELETED
local
            builtins only for non-explicit.

    libgcc/ChangeLog:

            * config/aarch64/heap-trampoline.c: Rename
            __builtin_nested_func_ptr_created to __gcc_nested_func_ptr_created
and
            __builtin_nested_func_ptr_deleted to __gcc_nested_func_ptr_deleted.
            * config/i386/heap-trampoline.c: Likewise.
            * libgcc2.h: Likewise.
            * libgcc-std.ver.in (GCC_7.0.0): Likewise and then move
            __gcc_nested_func_ptr_created and
            __gcc_nested_func_ptr_deleted from this symbol version to ...
            (GCC_14.0.0): ... this one.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
    Co-authored-by: Jakub Jelinek  <jakub@redhat.com>

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

* [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1
  2024-01-15 16:38 [Bug libgcc/113402] New: Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr fw at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-01-28 11:00 ` cvs-commit at gcc dot gnu.org
@ 2024-01-31 18:33 ` danglin at gcc dot gnu.org
  2024-01-31 18:35 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2024-01-31 18:33 UTC (permalink / raw)
  To: gcc-bugs

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

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |danglin at gcc dot gnu.org

--- Comment #6 from John David Anglin <danglin at gcc dot gnu.org> ---
I'm now seeing:

In file included from ../../../gcc/libgcc/libgcc2.c:56:
../../../gcc/libgcc/libgcc2.h:32:13: warning: conflicting types for built-in
fun
ction '__gcc_nested_func_ptr_created'; expected 'void(void *, void *, void *)'
[
-Wbuiltin-declaration-mismatch]
   32 | extern void __gcc_nested_func_ptr_created (void *, void *, void **);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

* [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1
  2024-01-15 16:38 [Bug libgcc/113402] New: Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr fw at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-01-31 18:33 ` danglin at gcc dot gnu.org
@ 2024-01-31 18:35 ` jakub at gcc dot gnu.org
  2024-02-01 20:10 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-01-31 18:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
See https://gcc.gnu.org/pipermail/gcc-patches/2024-January/644521.html

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

* [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1
  2024-01-15 16:38 [Bug libgcc/113402] New: Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr fw at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-01-31 18:35 ` jakub at gcc dot gnu.org
@ 2024-02-01 20:10 ` cvs-commit at gcc dot gnu.org
  2024-03-17  2:47 ` iains at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-01 20:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:e9b2f15d989addc1c2ad4604f5fa5ee1bda6023b

commit r14-8712-ge9b2f15d989addc1c2ad4604f5fa5ee1bda6023b
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Feb 1 21:07:01 2024 +0100

    libgcc: Avoid warnings on __gcc_nested_func_ptr_created [PR113402]

    I'm seeing hundreds of
    In file included from ../../../libgcc/libgcc2.c:56:
    ../../../libgcc/libgcc2.h:32:13: warning: conflicting types for built-in
function â__gcc_nested_func_ptr_createdâ; expected âvoid(void *, void *,
void *)â
    +[-Wbuiltin-declaration-mismatch]
       32 | extern void __gcc_nested_func_ptr_created (void *, void *, void
**);
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    warnings.

    Either we need to add like in r14-6218
      #pragma GCC diagnostic ignored "-Wbuiltin-declaration-mismatch"
    (but in that case because of the libgcc2.h prototype (why is it there?)
    it would need to be also with #pragma GCC diagnostic push/pop around),
    or we could go with just following how the builtins are prototyped on the
    compiler side and only cast to void ** when dereferencing (which is in
    a single spot in each TU).

    2024-02-01  Jakub Jelinek  <jakub@redhat.com>

            PR libgcc/113402
            * libgcc2.h (__gcc_nested_func_ptr_created): Change type of last
            argument from void ** to void *.
            * config/i386/heap-trampoline.c (__gcc_nested_func_ptr_created):
            Change type of dst from void ** to void * and cast dst to void **
            before dereferencing it.
            * config/aarch64/heap-trampoline.c (__gcc_nested_func_ptr_created):
            Likewise.

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

* [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1
  2024-01-15 16:38 [Bug libgcc/113402] New: Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr fw at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2024-02-01 20:10 ` cvs-commit at gcc dot gnu.org
@ 2024-03-17  2:47 ` iains at gcc dot gnu.org
  2024-03-17 15:43 ` dave.anglin at bell dot net
  2024-03-27 15:49 ` egallager at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: iains at gcc dot gnu.org @ 2024-03-17  2:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Iain Sandoe <iains at gcc dot gnu.org> ---
I think this is fixed now?

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

* [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1
  2024-01-15 16:38 [Bug libgcc/113402] New: Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr fw at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2024-03-17  2:47 ` iains at gcc dot gnu.org
@ 2024-03-17 15:43 ` dave.anglin at bell dot net
  2024-03-27 15:49 ` egallager at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: dave.anglin at bell dot net @ 2024-03-17 15:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from dave.anglin at bell dot net ---
Warning is fixed on hppa.

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

* [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1
  2024-01-15 16:38 [Bug libgcc/113402] New: Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr fw at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2024-03-17 15:43 ` dave.anglin at bell dot net
@ 2024-03-27 15:49 ` egallager at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: egallager at gcc dot gnu.org @ 2024-03-27 15:49 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
                 CC|                            |egallager at gcc dot gnu.org

--- Comment #11 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to dave.anglin from comment #10)
> Warning is fixed on hppa.

OK, closing as FIXED, then.

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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-15 16:38 [Bug libgcc/113402] New: Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr fw at gcc dot gnu.org
2024-01-15 16:44 ` [Bug libgcc/113402] Incorrect symbol versions for __builtin_nested_func_ptr_created, __builtin_nested_func_ptr in libgcc_s.so.1 fw at gcc dot gnu.org
2024-01-15 17:00 ` jakub at gcc dot gnu.org
2024-01-15 20:30 ` iains at gcc dot gnu.org
2024-01-16  8:00 ` rguenth at gcc dot gnu.org
2024-01-28 11:00 ` cvs-commit at gcc dot gnu.org
2024-01-31 18:33 ` danglin at gcc dot gnu.org
2024-01-31 18:35 ` jakub at gcc dot gnu.org
2024-02-01 20:10 ` cvs-commit at gcc dot gnu.org
2024-03-17  2:47 ` iains at gcc dot gnu.org
2024-03-17 15:43 ` dave.anglin at bell dot net
2024-03-27 15:49 ` egallager 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).