Skip to content

Commit 5516876

Browse files
committed
keeping upto date with upstream.
2 parents 4328309 + 54807d4 commit 5516876

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+875
-374
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ AOBJS = $(LIBC_OBJS)
3535
LOBJS = $(LIBC_OBJS:.o=.lo)
3636
GENH = obj/include/bits/alltypes.h obj/include/bits/syscall.h
3737
GENH_INT = obj/src/internal/version.h
38-
IMPH = $(addprefix $(srcdir)/, src/internal/stdio_impl.h src/internal/pthread_impl.h src/internal/libc.h)
38+
IMPH = $(addprefix $(srcdir)/, src/internal/stdio_impl.h src/internal/pthread_impl.h src/internal/locale_impl.h src/internal/libc.h)
3939

4040
LDFLAGS =
4141
LDFLAGS_AUTO =

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.15
1+
1.1.16

WHATSNEW

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,3 +1730,49 @@ arch-specific bugs fixed:
17301730
- broken posix_fadvise on arm and powerpc (32-bit)
17311731
- thread structure/dtv corruption on powerpc at thread startup
17321732
- various wrong mips and powerpc ioctl and termios constant values
1733+
1734+
1735+
1736+
1.1.16 release notes
1737+
1738+
new features:
1739+
- s390x (64-bit S/390) port
1740+
- pthread_setname_np extension function
1741+
- limited pthread_setattr_default_np function to set stack size defaults
1742+
- header-level support for linux 4.7, 4.8, and 4.9 features
1743+
- confstr _CS_V6_ENV and _CS_V7_ENV items
1744+
1745+
compatibility:
1746+
- public prototypes for abi-compat *_unlocked symbols, etc.
1747+
- fflush_unlocked(NULL) now works
1748+
- resolv.h __RES version macro now matches supported APIs
1749+
- workaround for gdb bugs backtracing across signals on x86_64
1750+
- anchors ^ and $ are now accepted in BRE subexpressions
1751+
- building for thumb2-only arm isa levels is now possible
1752+
1753+
bugs fixed:
1754+
- integer overflows in regexec buffer allocation (CVE-2016-8859)
1755+
- failure of regexec to report matches at offsets past INT_MAX
1756+
- static-pie executables with initialized thread-local storage crashed
1757+
- printf failed to catch EOVERFLOW in some cases, wrongly produced it in others
1758+
- printf produced wrong output, result for float with precision near INT_MAX
1759+
- printf produced wrong results with alt-form octal, zero flag, & field width
1760+
- printf float rounding was wrong for some midpoint cases
1761+
- swprintf printed junk after internal (256-byte) buffer filled up
1762+
- strtod family rounded incorrectly in several corner cases
1763+
- getmntent failed to handle long records
1764+
- getopt_long_only wrongly treated "--" as an option
1765+
- asctime output wrongly varied by locale
1766+
- strftime %y specifier produced wrong output for negative tm_year
1767+
- time zone names quoted with <> were misparsed
1768+
- corner case integer overflow in tm_year for some date conversions
1769+
- failure to load shared libs whose names were prefixes of standard lib names
1770+
- wrong error codes for several failure cases in various functions
1771+
- various asymptomatic undefined behavior
1772+
- various minor namespace issues in headers
1773+
1774+
arch-specific bugs fixed:
1775+
- tcsetattr regression on mips (completely non-working)
1776+
- wrong pread/pwrite syscall calling convention on sh
1777+
- wrong preadv2/pwritev2 syscall numbers on x32
1778+
- mrand48/jrand48 produced wrong-signedness results on 64-bit archs

arch/aarch64/bits/syscall.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,4 +271,7 @@
271271
#define __NR_copy_file_range 285
272272
#define __NR_preadv2 286
273273
#define __NR_pwritev2 287
274+
#define __NR_pkey_mprotect 288
275+
#define __NR_pkey_alloc 289
276+
#define __NR_pkey_free 290
274277

arch/arm/atomic_arch.h

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
__attribute__((__visibility__("hidden")))
2-
extern const void *__arm_atomics[3]; /* gettp, cas, barrier */
1+
#if __ARM_ARCH_4__ || __ARM_ARCH_4T__ || __ARM_ARCH == 4
2+
#define BLX "mov lr,pc\n\tbx"
3+
#else
4+
#define BLX "blx"
5+
#endif
6+
7+
extern uintptr_t __attribute__((__visibility__("hidden")))
8+
__a_cas_ptr, __a_barrier_ptr;
39

410
#if ((__ARM_ARCH_6__ || __ARM_ARCH_6K__ || __ARM_ARCH_6ZK__) && !__thumb__) \
511
|| __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7
@@ -42,11 +48,12 @@ static inline int a_cas(volatile int *p, int t, int s)
4248
register int r0 __asm__("r0") = t;
4349
register int r1 __asm__("r1") = s;
4450
register volatile int *r2 __asm__("r2") = p;
51+
register uintptr_t r3 __asm__("r3") = __a_cas_ptr;
4552
int old;
4653
__asm__ __volatile__ (
47-
"bl __a_cas"
48-
: "+r"(r0) : "r"(r1), "r"(r2)
49-
: "memory", "r3", "lr", "ip", "cc" );
54+
BLX " r3"
55+
: "+r"(r0), "+r"(r3) : "r"(r1), "r"(r2)
56+
: "memory", "lr", "ip", "cc" );
5057
if (!r0) return t;
5158
if ((old=*p)!=t) return old;
5259
}
@@ -58,8 +65,8 @@ static inline int a_cas(volatile int *p, int t, int s)
5865
#define a_barrier a_barrier
5966
static inline void a_barrier()
6067
{
61-
__asm__ __volatile__("bl __a_barrier"
62-
: : : "memory", "cc", "ip", "lr" );
68+
register uintptr_t ip __asm__("ip") = __a_barrier_ptr;
69+
__asm__ __volatile__( BLX " ip" : "+r"(ip) : : "memory", "cc", "lr" );
6370
}
6471
#endif
6572

arch/arm/bits/limits.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
22
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3-
#define PAGE_SIZE 4096
43
#define LONG_BIT 32
54
#endif
65

arch/arm/bits/syscall.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,9 @@
347347
#define __NR_copy_file_range 391
348348
#define __NR_preadv2 392
349349
#define __NR_pwritev2 393
350+
#define __NR_pkey_mprotect 394
351+
#define __NR_pkey_alloc 395
352+
#define __NR_pkey_free 396
350353

351354
#define __ARM_NR_breakpoint 0x0f0001
352355
#define __ARM_NR_cacheflush 0x0f0002

arch/arm/pthread_arch.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ static inline pthread_t __pthread_self()
1010

1111
#else
1212

13-
static inline pthread_t __pthread_self()
14-
{
15-
#ifdef __clang__
16-
char *p;
17-
__asm__ __volatile__ ( "bl __a_gettp\n\tmov %0,r0" : "=r"(p) : : "cc", "r0", "lr" );
13+
#if __ARM_ARCH_4__ || __ARM_ARCH_4T__ || __ARM_ARCH == 4
14+
#define BLX "mov lr,pc\n\tbx"
1815
#else
19-
register char *p __asm__("r0");
20-
__asm__ __volatile__ ( "bl __a_gettp" : "=r"(p) : : "cc", "lr" );
16+
#define BLX "blx"
2117
#endif
18+
19+
static inline pthread_t __pthread_self()
20+
{
21+
extern uintptr_t __attribute__((__visibility__("hidden"))) __a_gettp_ptr;
22+
register uintptr_t p __asm__("r0");
23+
__asm__ __volatile__ ( BLX " %1" : "=r"(p) : "r"(__a_gettp_ptr) : "cc", "lr" );
2224
return (void *)(p+8-sizeof(struct pthread));
2325
}
2426

arch/generic/bits/stdarg.h

Lines changed: 0 additions & 4 deletions
This file was deleted.

arch/i386/bits/signal.h

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,44 @@
77
#endif
88

99
#ifdef _GNU_SOURCE
10-
#define REG_GS 0
11-
#define REG_FS 1
12-
#define REG_ES 2
13-
#define REG_DS 3
14-
#define REG_EDI 4
15-
#define REG_ESI 5
16-
#define REG_EBP 6
17-
#define REG_ESP 7
18-
#define REG_EBX 8
19-
#define REG_EDX 9
20-
#define REG_ECX 10
21-
#define REG_EAX 11
22-
#define REG_TRAPNO 12
23-
#define REG_ERR 13
24-
#define REG_EIP 14
25-
#define REG_CS 15
26-
#define REG_EFL 16
27-
#define REG_UESP 17
28-
#define REG_SS 18
10+
enum { REG_GS = 0 };
11+
#define REG_GS REG_GS
12+
enum { REG_FS = 1 };
13+
#define REG_FS REG_FS
14+
enum { REG_ES = 2 };
15+
#define REG_ES REG_ES
16+
enum { REG_DS = 3 };
17+
#define REG_DS REG_DS
18+
enum { REG_EDI = 4 };
19+
#define REG_EDI REG_EDI
20+
enum { REG_ESI = 5 };
21+
#define REG_ESI REG_ESI
22+
enum { REG_EBP = 6 };
23+
#define REG_EBP REG_EBP
24+
enum { REG_ESP = 7 };
25+
#define REG_ESP REG_ESP
26+
enum { REG_EBX = 8 };
27+
#define REG_EBX REG_EBX
28+
enum { REG_EDX = 9 };
29+
#define REG_EDX REG_EDX
30+
enum { REG_ECX = 10 };
31+
#define REG_ECX REG_ECX
32+
enum { REG_EAX = 11 };
33+
#define REG_EAX REG_EAX
34+
enum { REG_TRAPNO = 12 };
35+
#define REG_TRAPNO REG_TRAPNO
36+
enum { REG_ERR = 13 };
37+
#define REG_ERR REG_ERR
38+
enum { REG_EIP = 14 };
39+
#define REG_EIP REG_EIP
40+
enum { REG_CS = 15 };
41+
#define REG_CS REG_CS
42+
enum { REG_EFL = 16 };
43+
#define REG_EFL REG_EFL
44+
enum { REG_UESP = 17 };
45+
#define REG_UESP REG_UESP
46+
enum { REG_SS = 18 };
47+
#define REG_SS REG_SS
2948
#endif
3049

3150
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)

0 commit comments

Comments
 (0)