Samuel Thibault
6afece738c
htl: move __pthread_get_cleanup_stack to libc
...
This fixes the cleanup call from __qsort_r
2025-07-06 19:56:15 +00:00
Samuel Thibault
b80f108b55
htl: Drop ptr_pthread_once from pthread_functions
...
It is unused since ccdb68e829
("htl: move pthread_once into libc")
2025-07-06 10:02:17 +00:00
gfleury
27360ab9ea
htl: move pthread_key_*, pthread_get/setspecific
...
Signed-off-by: gfleury <gfleury@disroot.org >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Message-ID: <20250613184440.1660335-1-gfleury@disroot.org >
2025-06-15 21:21:12 +02:00
Adhemerval Zanella
c8e73a1492
stdlib: Fix qsort memory leak if callback throws (BZ 32058)
...
If the input buffer exceeds the stack auxiliary buffer, qsort will
malloc a temporary one to call mergesort. Since C++ standard does
allow the callback comparison function to throw [1], the glibc
implementation can potentially leak memory.
The fixes uses a pthread_cleanup_combined_push and
pthread_cleanup_combined_pop, so it can work with and without
exception enables. The qsort code path that calls malloc now
requires some extra setup and a call to __pthread_cleanup_push
anmd __pthread_cleanup_pop (which should be ok since they just
setup some buffer state).
Checked on x86_64-linux-gnu.
[1] https://timsong-cpp.github.io/cppwp/n4950/alg.c.library#4
Reviewed-by: DJ Delorie <dj@redhat.com >
2025-04-02 18:01:55 +00:00
Samuel Thibault
bfb2f2f481
htl: Make pthread_setcanceltype / state a cancellation point
...
as expected by tst-cancel32.
2025-03-15 19:45:55 +00:00
Samuel Thibault
ccdb68e829
htl: move pthread_once into libc
2025-03-02 15:37:33 +01:00
gfleury
4afbc1aa2e
htl: don't export __pthread_default_rwlockattr anymore.
...
since now all symbloy that use it are in libc
Message-ID: <20250216145434.7089-11-gfleury@disroot.org >
2025-02-16 23:43:04 +01:00
gfleury
6f6732c1c4
htl: move pthread_rwlock_init into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20250216145434.7089-10-gfleury@disroot.org >
2025-02-16 23:43:03 +01:00
gfleury
d3ef1b56aa
htl: move pthread_rwlock_destroy into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20250216145434.7089-9-gfleury@disroot.org >
2025-02-16 23:42:38 +01:00
gfleury
25650ef6b9
htl: move pthread_rwlock_{rdlock, timedrdlock, timedwrlock, wrlock, clockrdlock, clockwrlock} into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20250216145434.7089-8-gfleury@disroot.org >
2025-02-16 23:08:54 +01:00
gfleury
119798a7b1
htl: move pthread_rwlock_unlock into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20250216145434.7089-7-gfleury@disroot.org >
2025-02-16 23:08:54 +01:00
gfleury
18accc19b9
htl: move pthread_rwlock_tryrdlock, pthread_rwlock_trywrlock into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20250216145434.7089-6-gfleury@disroot.org >
2025-02-16 22:59:34 +01:00
gfleury
4b25413df5
htl: move pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20250216145434.7089-5-gfleury@disroot.org >
2025-02-16 22:59:25 +01:00
gfleury
cd2d31ed58
htl: move pthread_rwlockattr_destroy into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20250216145434.7089-4-gfleury@disroot.org >
2025-02-16 22:59:16 +01:00
gfleury
e618b671cd
htl: move pthread_rwlockattr_init into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20250216145434.7089-3-gfleury@disroot.org >
2025-02-16 22:59:07 +01:00
gfleury
8f842ce13e
htl: move __pthread_default_rwlockattr into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20250216145434.7089-2-gfleury@disroot.org >
2025-02-16 22:59:00 +01:00
gfleury
6bcd7bf100
htl: stop exporting __pthread_default_barrierattr.
...
since all symbol that use it are now in libc
Message-ID: <20250209200108.865599-9-gfleury@disroot.org >
2025-02-10 01:39:17 +01:00
gfleury
710bbc9659
htl: move pthread_barrier_wait into libc.
...
Message-ID: <20250209200108.865599-8-gfleury@disroot.org >
2025-02-10 01:39:17 +01:00
gfleury
2789003489
htl: move pthread_barrier_init into libc.
...
Message-ID: <20250209200108.865599-7-gfleury@disroot.org >
2025-02-10 01:39:17 +01:00
gfleury
735c9b73d6
htl: move pthread_barrier_destroy into libc.
...
Message-ID: <20250209200108.865599-6-gfleury@disroot.org >
2025-02-10 01:39:17 +01:00
gfleury
ccf19a68ab
htl: move pthread_barrierattr_getpshared, pthread_barrierattr_setpshared into libc.
...
Message-ID: <20250209200108.865599-5-gfleury@disroot.org >
2025-02-10 01:39:17 +01:00
gfleury
ca2a95ee67
htl: move pthread_barrierattr_init into libc.
...
Message-ID: <20250209200108.865599-4-gfleury@disroot.org >
2025-02-10 01:18:56 +01:00
gfleury
40cbd3c361
htl: move pthread_barrierattr_destroy into libc.
...
Message-ID: <20250209200108.865599-3-gfleury@disroot.org >
2025-02-10 01:18:17 +01:00
gfleury
7d799d85e8
htl: move __pthread_default_barrierattr into libc.
...
Message-ID: <20250209200108.865599-2-gfleury@disroot.org >
2025-02-10 01:17:50 +01:00
gfleury
cf51d18b9d
htl: move pthread_setcancelstate into libc.
...
sysdeps/pthread/sem_open.c: call pthread_setcancelstate directely
since forward declaration is gone on hurd too
Message-ID: <20250201080202.494671-1-gfleury@disroot.org >
2025-02-01 11:24:14 +01:00
gfleury
9a31eb64db
htl: move pthread_setcanceltype into libc.
...
Message-ID: <20250103103750.870897-7-gfleury@disroot.org >
2025-01-29 02:32:36 +01:00
gfleury
265c5991af
htl: move pthread_mutex_consistent, pthread_mutex_consistent_np into libc.
...
Message-ID: <20250103103750.870897-6-gfleury@disroot.org >
2025-01-29 02:32:36 +01:00
gfleury
8bfabe7a92
htl: move pthread_mutex_destroy into libc.
...
Message-ID: <20250103103750.870897-5-gfleury@disroot.org >
2025-01-29 02:32:36 +01:00
gfleury
be9f0e7681
htl: move pthread_mutex_getprioceiling, pthread_mutex_setprioceiling into libc
...
Message-ID: <20250103103750.870897-4-gfleury@disroot.org >
2025-01-29 02:32:36 +01:00
gfleury
2ebc2d8e24
htl: move pthread_mutex_{lock, unlock, trylock, timedlock, clocklock}
...
I haven't exposed _pthread_mutex_lock, _pthread_mutex_trylock and
_pthread_mutex_unlock in GLIBC_PRIVATE since there aren't used in any
code in libpthread
Message-ID: <20250103103750.870897-3-gfleury@disroot.org >
2025-01-29 02:32:36 +01:00
gfleury
e892a93073
htl: move pthread_mutex_init into libc.
...
Message-ID: <20250103103750.870897-2-gfleury@disroot.org >
2025-01-29 02:32:36 +01:00
gfleury
56b25bfd60
htl: remove leftover for pthread_mutexattr_settype
...
from b386295727
2025-01-29 02:32:36 +01:00
gfleury
396048fa5a
htl: move pthread_mutexattr_setprioceiling, pthread_mutexattr_getprioceiling into libc.
...
Message-ID: <20241231134909.1166440-9-gfleury@disroot.org >
2025-01-02 01:20:21 +01:00
gfleury
4371b11c86
htl: move pthread_mutexattr_{setrobust, setrobust_np}, pthread_mutexattr_{getrobust, getrobust_np} into libc.
...
Message-ID: <20241231134909.1166440-8-gfleury@disroot.org >
2025-01-02 01:20:20 +01:00
gfleury
1e5b39a5e0
htl: move pthread_mutexattr_setpshared, pthread_mutexattr_getpshared into libc.
...
Message-ID: <20241231134909.1166440-7-gfleury@disroot.org >
2025-01-02 01:19:29 +01:00
gfleury
b386295727
htl: move pthread_mutexattr_settype, pthread_mutexattr_gettype into libc.
...
Message-ID: <20241231134909.1166440-6-gfleury@disroot.org >
2025-01-02 00:51:35 +01:00
Samuel Thibault
3cd1cf5fe0
htl: move pthread_mutexattr_setprotocol into libc.
...
Message-ID: <20241231134909.1166440-5-gfleury@disroot.org >
2025-01-02 00:51:17 +01:00
gfleury
15686aa188
htl: move pthread_mutexattr_getprotocol into libc.
...
Message-ID: <20241231134909.1166440-4-gfleury@disroot.org >
2025-01-02 00:51:05 +01:00
gfleury
beabc5dff5
htl: move pthread_mutexattr_destroy into libc.
...
Message-ID: <20241231134909.1166440-3-gfleury@disroot.org >
2025-01-01 23:46:19 +01:00
gfleury
826b1bbcca
htl: move pthread_mutexattr_init into libc.
...
Message-ID: <20241231134909.1166440-2-gfleury@disroot.org >
2025-01-01 23:44:32 +01:00
Paul Eggert
2642002380
Update copyright dates with scripts/update-copyrights
2025-01-01 11:22:09 -08:00
gfleury
f646be6ff6
htl: move pthread_cond_timedwait, pthread_cond_clockwait, pthread_cond_wait into libc.
...
Message-ID: <20241219203727.669825-9-gfleury@disroot.org >
2024-12-22 23:37:30 +01:00
gfleury
f57a277c16
htl: move pthread_cond_signal into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20241219203727.669825-6-gfleury@disroot.org >
2024-12-22 23:34:28 +01:00
gfleury
3089d23517
htl: move pthread_cond_broadcast into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20241219203727.669825-5-gfleury@disroot.org >
2024-12-22 23:34:27 +01:00
gfleury
917a131ab9
htl: move pthread_cond_destroy into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20241219203727.669825-4-gfleury@disroot.org >
2024-12-22 23:34:27 +01:00
gfleury
8735ea79ab
htl: move pthread_cond_init into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20241219203727.669825-2-gfleury@disroot.org >
2024-12-22 23:34:27 +01:00
gfleury
2716bd6b12
htl: move pthread_sigmask into libc.
...
Message-ID: <20241212220612.782313-3-gfleury@disroot.org >
2024-12-14 23:13:14 +01:00
gfleury
a4b4b9a96b
htl: move pthread_condattr_setpshared into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20241126205329.2215295-8-gfleury@disroot.org >
2024-12-09 02:03:18 +01:00
gfleury
5ccb28e65d
htl: move pthread_condattr_setclock into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20241126205329.2215295-7-gfleury@disroot.org >
2024-12-09 02:03:18 +01:00
gfleury
ebd85cdc4a
htl: move pthread_condattr_init into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20241126205329.2215295-6-gfleury@disroot.org >
2024-12-09 02:03:18 +01:00