mirror of
https://github.com/fluencelabs/musl
synced 2025-07-31 14:21:57 +00:00
fix crashes in x32 __tls_get_addr
x32 has another gratuitous difference to all other archs: it passes an array of 64bit values to __tls_get_addr(). usually it is an array of size_t.
This commit is contained in:
@@ -97,6 +97,10 @@ struct __timer {
|
||||
#define DTP_OFFSET 0
|
||||
#endif
|
||||
|
||||
#ifndef tls_mod_off_t
|
||||
#define tls_mod_off_t size_t
|
||||
#endif
|
||||
|
||||
#define SIGTIMER 32
|
||||
#define SIGCANCEL 33
|
||||
#define SIGSYNCCALL 34
|
||||
|
@@ -3,9 +3,9 @@
|
||||
#include "libc.h"
|
||||
|
||||
__attribute__((__visibility__("hidden")))
|
||||
void *__tls_get_new(size_t *);
|
||||
void *__tls_get_new(tls_mod_off_t *);
|
||||
|
||||
void *__tls_get_addr(size_t *v)
|
||||
void *__tls_get_addr(tls_mod_off_t *v)
|
||||
{
|
||||
pthread_t self = __pthread_self();
|
||||
if (v[0]<=(size_t)self->dtv[0])
|
||||
|
Reference in New Issue
Block a user