public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2022-06-09 21:25 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:25 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2c889bd63916fbc735090e05542050235b326e9b

commit 2c889bd63916fbc735090e05542050235b326e9b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index b429d9aa78..0ef4367f33 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is


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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2024-04-02 15:58 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 15:58 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=11ac998d06ec2d484f5d0d4766e910ee67a75b80

commit 11ac998d06ec2d484f5d0d4766e910ee67a75b80
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index 1fc4936a6c..4a769b799a 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is

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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2024-02-09 17:36 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:36 UTC (permalink / raw)
  To: glibc-cvs

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

commit cc520e75eca93e6ae33ef75c046f3c0992439f5a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index 1fc4936a6c..4a769b799a 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is

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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2024-02-07 14:12 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:12 UTC (permalink / raw)
  To: glibc-cvs

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

commit f0e73f2be934d1611c5cbe0aa75f2edcfffe086f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index 1fc4936a6c..4a769b799a 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is

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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2024-01-29 18:02 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 18:02 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3601da7517680e04153361abd5db443f437e0658

commit 3601da7517680e04153361abd5db443f437e0658
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index 1fc4936a6c..4a769b799a 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is

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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2023-12-21 18:58 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:58 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4089fe239134bd5b56ba8a5eb6a3d28ace939d3f

commit 4089fe239134bd5b56ba8a5eb6a3d28ace939d3f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index 9ca504a619..b76c3aebd2 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is

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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2023-09-28 17:57 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:57 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=30d032f72348ad06261a22429c8435a6b3b21d97

commit 30d032f72348ad06261a22429c8435a6b3b21d97
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index 9ca504a619..b76c3aebd2 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is

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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2023-08-30 12:41 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:41 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=230619c70398c7d0c886b5b48f1211c05eae5b57

commit 230619c70398c7d0c886b5b48f1211c05eae5b57
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index 9ca504a619..b76c3aebd2 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is

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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2023-02-09 19:53 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2023-02-09 19:53 UTC (permalink / raw)
  To: glibc-cvs

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

commit b4e3ef166b0db77ca9818f579156ebee93434c35
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index 9ca504a619..b76c3aebd2 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is

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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2022-10-28 17:46 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:46 UTC (permalink / raw)
  To: glibc-cvs

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

commit a954fbfdcc371d02f9e5001cbc04f76022c1d263
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index 29aa9adb89..cde8473d60 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is

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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2022-10-04 13:04 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2022-10-04 13:04 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=14c66233a01b97bb650558b4ae6e268d136a25eb

commit 14c66233a01b97bb650558b4ae6e268d136a25eb
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index 29aa9adb89..cde8473d60 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is

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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2022-06-09 13:22 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:22 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2c889bd63916fbc735090e05542050235b326e9b

commit 2c889bd63916fbc735090e05542050235b326e9b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index b429d9aa78..0ef4367f33 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is


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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2022-06-03 14:11 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:11 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=589b51719d4d760bddbdf4db4efad410d13bbbe3

commit 589b51719d4d760bddbdf4db4efad410d13bbbe3
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index b429d9aa78..0ef4367f33 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is


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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2022-05-13 14:25 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:25 UTC (permalink / raw)
  To: glibc-cvs

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

commit a907d75c6540ad135171f9aff0470bc6fe786aa7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index b429d9aa78..0ef4367f33 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is


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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2022-05-12 19:39 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:39 UTC (permalink / raw)
  To: glibc-cvs

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

commit bf2eb63ff498fd59fd60547b2c1ec785f6b51d0e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index b429d9aa78..0ef4367f33 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is


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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2022-05-10 18:29 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:29 UTC (permalink / raw)
  To: glibc-cvs

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

commit a2b37543ca325e7a346d1b19b5509c3e9fca4721
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index b429d9aa78..0ef4367f33 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is


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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2022-04-29 14:09 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:09 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=733282b0b44caf47cc05badd12f80e8fc64cdba8

commit 733282b0b44caf47cc05badd12f80e8fc64cdba8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index b429d9aa78..0ef4367f33 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is


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

* [glibc/azanella/clang] Handle abort call for -fexceptions call
@ 2022-04-04 13:00 Adhemerval Zanella
  0 siblings, 0 replies; 18+ messages in thread
From: Adhemerval Zanella @ 2022-04-04 13:00 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=956674013d483f277b3f971bef653d2d442643f7

commit 956674013d483f277b3f971bef653d2d442643f7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Apr 1 14:17:07 2022 -0300

    Handle abort call for -fexceptions call
    
    clang might generate an abort call when cleanup functions (set by
    __attribute__ ((cleanup)) calls functions not marked as nothrow.
    We can mitigate by marking some internal functions as __THROW,
    but it is not possible for functions that issue used-provided
    callbacks (for instance pthread_once).

Diff:
---
 sysdeps/generic/symbol-hacks.h | 7 +++++++
 sysdeps/nptl/lowlevellock.h    | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index b429d9aa78..0ef4367f33 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -125,9 +125,9 @@ libc_hidden_proto (__lll_lock_wait)
 #define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
 
 
-extern void __lll_lock_wake_private (int *futex);
+extern void __lll_lock_wake_private (int *futex) __THROW;
 libc_hidden_proto (__lll_lock_wake_private)
-extern void __lll_lock_wake (int *futex, int private);
+extern void __lll_lock_wake (int *futex, int private) __THROW;
 libc_hidden_proto (__lll_lock_wake)
 
 /* This is an expression rather than a statement even though its value is


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

end of thread, other threads:[~2024-04-02 15:58 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 21:25 [glibc/azanella/clang] Handle abort call for -fexceptions call Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-04-02 15:58 Adhemerval Zanella
2024-02-09 17:36 Adhemerval Zanella
2024-02-07 14:12 Adhemerval Zanella
2024-01-29 18:02 Adhemerval Zanella
2023-12-21 18:58 Adhemerval Zanella
2023-09-28 17:57 Adhemerval Zanella
2023-08-30 12:41 Adhemerval Zanella
2023-02-09 19:53 Adhemerval Zanella
2022-10-28 17:46 Adhemerval Zanella
2022-10-04 13:04 Adhemerval Zanella
2022-06-09 13:22 Adhemerval Zanella
2022-06-03 14:11 Adhemerval Zanella
2022-05-13 14:25 Adhemerval Zanella
2022-05-12 19:39 Adhemerval Zanella
2022-05-10 18:29 Adhemerval Zanella
2022-04-29 14:09 Adhemerval Zanella
2022-04-04 13:00 Adhemerval Zanella

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