Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions expected/wasm32-wasip1-threads/predefined-macros.txt
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@
#define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff)
#define IN6_IS_ADDR_SITELOCAL(a) ((((uint8_t *) (a))[0]) == 0xfe && (((uint8_t *) (a))[1] & 0xc0) == 0xc0)
#define IN6_IS_ADDR_UNSPECIFIED(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && ((uint32_t *) (a))[3] == 0)
#define IN6_IS_ADDR_V4COMPAT(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && ((uint8_t *) (a))[15] > 1)
#define IN6_IS_ADDR_V4COMPAT(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && !IN6_IS_ADDR_UNSPECIFIED(a) && !IN6_IS_ADDR_LOOPBACK(a))
#define IN6_IS_ADDR_V4MAPPED(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint8_t *) (a))[8] == 0 && ((uint8_t *) (a))[9] == 0 && ((uint8_t *) (a))[10] == 0xff && ((uint8_t *) (a))[11] == 0xff)
#define INADDRSZ NS_INADDRSZ
#define INADDR_ALLHOSTS_GROUP ((in_addr_t) 0xe0000001)
Expand Down Expand Up @@ -657,8 +657,8 @@
#define INTMAX_MIN INT64_MIN
#define INTPTR_MAX INT32_MAX
#define INTPTR_MIN INT32_MIN
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST16_MIN INT16_MIN
#define INT_FAST16_MAX INT32_MAX
#define INT_FAST16_MIN INT32_MIN
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST64_MAX INT64_MAX
Expand Down Expand Up @@ -1521,6 +1521,9 @@
#define REG_NOTBOL 1
#define REG_NOTEOL 2
#define REG_OK 0
#define RENAME_EXCHANGE (1 << 1)
#define RENAME_NOREPLACE (1 << 0)
#define RENAME_WHITEOUT (1 << 2)
#define RE_DUP_MAX 255
#define RMSGD 0x0001
#define RMSGN 0x0002
Expand Down Expand Up @@ -2050,7 +2053,7 @@
#define UINTMAX_C(c) c ## ULL
#define UINTMAX_MAX UINT64_MAX
#define UINTPTR_MAX UINT32_MAX
#define UINT_FAST16_MAX UINT16_MAX
#define UINT_FAST16_MAX UINT32_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
#define UINT_FAST8_MAX UINT8_MAX
Expand Down Expand Up @@ -2271,8 +2274,8 @@
#define _POSIX_TRACE_USER_EVENT_MAX 32
#define _POSIX_TTY_NAME_MAX 9
#define _POSIX_TZNAME_MAX 6
#define _POSIX_V6_ILP32_OFFBIG (1)
#define _POSIX_V7_ILP32_OFFBIG (1)
#define _POSIX_V6_ILP32_OFFBIG 1
#define _POSIX_V7_ILP32_OFFBIG 1
#define _POSIX_VDISABLE 0
#define _POSIX_VERSION 200809L
#define _PTHREAD_H
Expand Down Expand Up @@ -3105,7 +3108,7 @@
#define __WINT_MAX__ 2147483647
#define __WINT_TYPE__ int
#define __WINT_WIDTH__ 32
#define __WORDSIZE 64
#define __WORDSIZE 32
#define __alignas_is_defined 1
#define __alignof_is_defined 1
#define __bitop(x,i,o) ((x)[(i)/8] o (1<<(i)%8))
Expand Down
17 changes: 10 additions & 7 deletions expected/wasm32-wasip1/predefined-macros.txt
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@
#define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff)
#define IN6_IS_ADDR_SITELOCAL(a) ((((uint8_t *) (a))[0]) == 0xfe && (((uint8_t *) (a))[1] & 0xc0) == 0xc0)
#define IN6_IS_ADDR_UNSPECIFIED(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && ((uint32_t *) (a))[3] == 0)
#define IN6_IS_ADDR_V4COMPAT(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && ((uint8_t *) (a))[15] > 1)
#define IN6_IS_ADDR_V4COMPAT(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && !IN6_IS_ADDR_UNSPECIFIED(a) && !IN6_IS_ADDR_LOOPBACK(a))
#define IN6_IS_ADDR_V4MAPPED(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint8_t *) (a))[8] == 0 && ((uint8_t *) (a))[9] == 0 && ((uint8_t *) (a))[10] == 0xff && ((uint8_t *) (a))[11] == 0xff)
#define INADDRSZ NS_INADDRSZ
#define INADDR_ALLHOSTS_GROUP ((in_addr_t) 0xe0000001)
Expand Down Expand Up @@ -657,8 +657,8 @@
#define INTMAX_MIN INT64_MIN
#define INTPTR_MAX INT32_MAX
#define INTPTR_MIN INT32_MIN
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST16_MIN INT16_MIN
#define INT_FAST16_MAX INT32_MAX
#define INT_FAST16_MIN INT32_MIN
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST64_MAX INT64_MAX
Expand Down Expand Up @@ -1521,6 +1521,9 @@
#define REG_NOTBOL 1
#define REG_NOTEOL 2
#define REG_OK 0
#define RENAME_EXCHANGE (1 << 1)
#define RENAME_NOREPLACE (1 << 0)
#define RENAME_WHITEOUT (1 << 2)
#define RE_DUP_MAX 255
#define RMSGD 0x0001
#define RMSGN 0x0002
Expand Down Expand Up @@ -2048,7 +2051,7 @@
#define UINTMAX_C(c) c ## ULL
#define UINTMAX_MAX UINT64_MAX
#define UINTPTR_MAX UINT32_MAX
#define UINT_FAST16_MAX UINT16_MAX
#define UINT_FAST16_MAX UINT32_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
#define UINT_FAST8_MAX UINT8_MAX
Expand Down Expand Up @@ -2269,8 +2272,8 @@
#define _POSIX_TRACE_USER_EVENT_MAX 32
#define _POSIX_TTY_NAME_MAX 9
#define _POSIX_TZNAME_MAX 6
#define _POSIX_V6_ILP32_OFFBIG (1)
#define _POSIX_V7_ILP32_OFFBIG (1)
#define _POSIX_V6_ILP32_OFFBIG 1
#define _POSIX_V7_ILP32_OFFBIG 1
#define _POSIX_VDISABLE 0
#define _POSIX_VERSION 200809L
#define _PTHREAD_H
Expand Down Expand Up @@ -3102,7 +3105,7 @@
#define __WINT_MAX__ 2147483647
#define __WINT_TYPE__ int
#define __WINT_WIDTH__ 32
#define __WORDSIZE 64
#define __WORDSIZE 32
#define __alignas_is_defined 1
#define __alignof_is_defined 1
#define __bitop(x,i,o) ((x)[(i)/8] o (1<<(i)%8))
Expand Down
2 changes: 1 addition & 1 deletion expected/wasm32-wasip2/defined-symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1570,4 +1570,4 @@ y0f
y1
y1f
yn
ynf
ynf
17 changes: 10 additions & 7 deletions expected/wasm32-wasip2/predefined-macros.txt
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@
#define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff)
#define IN6_IS_ADDR_SITELOCAL(a) ((((uint8_t *) (a))[0]) == 0xfe && (((uint8_t *) (a))[1] & 0xc0) == 0xc0)
#define IN6_IS_ADDR_UNSPECIFIED(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && ((uint32_t *) (a))[3] == 0)
#define IN6_IS_ADDR_V4COMPAT(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && ((uint8_t *) (a))[15] > 1)
#define IN6_IS_ADDR_V4COMPAT(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && !IN6_IS_ADDR_UNSPECIFIED(a) && !IN6_IS_ADDR_LOOPBACK(a))
#define IN6_IS_ADDR_V4MAPPED(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint8_t *) (a))[8] == 0 && ((uint8_t *) (a))[9] == 0 && ((uint8_t *) (a))[10] == 0xff && ((uint8_t *) (a))[11] == 0xff)
#define INADDRSZ NS_INADDRSZ
#define INADDR_ALLHOSTS_GROUP ((in_addr_t) 0xe0000001)
Expand Down Expand Up @@ -748,8 +748,8 @@
#define INTMAX_MIN INT64_MIN
#define INTPTR_MAX INT32_MAX
#define INTPTR_MIN INT32_MIN
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST16_MIN INT16_MIN
#define INT_FAST16_MAX INT32_MAX
#define INT_FAST16_MIN INT32_MIN
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST64_MAX INT64_MAX
Expand Down Expand Up @@ -1652,6 +1652,9 @@
#define REG_NOTBOL 1
#define REG_NOTEOL 2
#define REG_OK 0
#define RENAME_EXCHANGE (1 << 1)
#define RENAME_NOREPLACE (1 << 0)
#define RENAME_WHITEOUT (1 << 2)
#define RE_DUP_MAX 255
#define RMSGD 0x0001
#define RMSGN 0x0002
Expand Down Expand Up @@ -2198,7 +2201,7 @@
#define UINTMAX_C(c) c ## ULL
#define UINTMAX_MAX UINT64_MAX
#define UINTPTR_MAX UINT32_MAX
#define UINT_FAST16_MAX UINT16_MAX
#define UINT_FAST16_MAX UINT32_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
#define UINT_FAST8_MAX UINT8_MAX
Expand Down Expand Up @@ -2420,8 +2423,8 @@
#define _POSIX_TRACE_USER_EVENT_MAX 32
#define _POSIX_TTY_NAME_MAX 9
#define _POSIX_TZNAME_MAX 6
#define _POSIX_V6_ILP32_OFFBIG (1)
#define _POSIX_V7_ILP32_OFFBIG (1)
#define _POSIX_V6_ILP32_OFFBIG 1
#define _POSIX_V7_ILP32_OFFBIG 1
#define _POSIX_VDISABLE 0
#define _POSIX_VERSION 200809L
#define _PTHREAD_H
Expand Down Expand Up @@ -3100,7 +3103,7 @@
#define __WINT_MAX__ 2147483647
#define __WINT_TYPE__ int
#define __WINT_WIDTH__ 32
#define __WORDSIZE 64
#define __WORDSIZE 32
#define __alignas_is_defined 1
#define __alignof_is_defined 1
#define __bitop(x,i,o) ((x)[(i)/8] o (1<<(i)%8))
Expand Down
2 changes: 1 addition & 1 deletion expected/wasm32-wasip3/defined-symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1603,4 +1603,4 @@ y0f
y1
y1f
yn
ynf
ynf
17 changes: 10 additions & 7 deletions expected/wasm32-wasip3/predefined-macros.txt
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@
#define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff)
#define IN6_IS_ADDR_SITELOCAL(a) ((((uint8_t *) (a))[0]) == 0xfe && (((uint8_t *) (a))[1] & 0xc0) == 0xc0)
#define IN6_IS_ADDR_UNSPECIFIED(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && ((uint32_t *) (a))[3] == 0)
#define IN6_IS_ADDR_V4COMPAT(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && ((uint8_t *) (a))[15] > 1)
#define IN6_IS_ADDR_V4COMPAT(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && !IN6_IS_ADDR_UNSPECIFIED(a) && !IN6_IS_ADDR_LOOPBACK(a))
#define IN6_IS_ADDR_V4MAPPED(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint8_t *) (a))[8] == 0 && ((uint8_t *) (a))[9] == 0 && ((uint8_t *) (a))[10] == 0xff && ((uint8_t *) (a))[11] == 0xff)
#define INADDRSZ NS_INADDRSZ
#define INADDR_ALLHOSTS_GROUP ((in_addr_t) 0xe0000001)
Expand Down Expand Up @@ -748,8 +748,8 @@
#define INTMAX_MIN INT64_MIN
#define INTPTR_MAX INT32_MAX
#define INTPTR_MIN INT32_MIN
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST16_MIN INT16_MIN
#define INT_FAST16_MAX INT32_MAX
#define INT_FAST16_MIN INT32_MIN
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST64_MAX INT64_MAX
Expand Down Expand Up @@ -1631,6 +1631,9 @@
#define REG_NOTBOL 1
#define REG_NOTEOL 2
#define REG_OK 0
#define RENAME_EXCHANGE (1 << 1)
#define RENAME_NOREPLACE (1 << 0)
#define RENAME_WHITEOUT (1 << 2)
#define RE_DUP_MAX 255
#define RMSGD 0x0001
#define RMSGN 0x0002
Expand Down Expand Up @@ -2193,7 +2196,7 @@
#define UINTMAX_C(c) c ## ULL
#define UINTMAX_MAX UINT64_MAX
#define UINTPTR_MAX UINT32_MAX
#define UINT_FAST16_MAX UINT16_MAX
#define UINT_FAST16_MAX UINT32_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
#define UINT_FAST8_MAX UINT8_MAX
Expand Down Expand Up @@ -2426,8 +2429,8 @@
#define _POSIX_TRACE_USER_EVENT_MAX 32
#define _POSIX_TTY_NAME_MAX 9
#define _POSIX_TZNAME_MAX 6
#define _POSIX_V6_ILP32_OFFBIG (1)
#define _POSIX_V7_ILP32_OFFBIG (1)
#define _POSIX_V6_ILP32_OFFBIG 1
#define _POSIX_V7_ILP32_OFFBIG 1
#define _POSIX_VDISABLE 0
#define _POSIX_VERSION 200809L
#define _PTHREAD_H
Expand Down Expand Up @@ -3106,7 +3109,7 @@
#define __WINT_MAX__ 2147483647
#define __WINT_TYPE__ int
#define __WINT_WIDTH__ 32
#define __WORDSIZE 64
#define __WORDSIZE 32
#define __alignas_is_defined 1
#define __alignof_is_defined 1
#define __bitop(x,i,o) ((x)[(i)/8] o (1<<(i)%8))
Expand Down
1 change: 1 addition & 0 deletions libc-top-half/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ set(top_half_sources
musl/src/time/__secs_to_tm.c
musl/src/time/__tm_to_secs.c
musl/src/time/__tz.c
musl/src/time/__utc.c
musl/src/time/__year_to_secs.c
musl/src/time/asctime.c
musl/src/time/asctime_r.c
Expand Down
15 changes: 15 additions & 0 deletions libc-top-half/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,18 @@ Some major known missing areas include:
- non-builtin locales
- TIOCGWINSZ (because cloudabi lacks it; affects isatty, line buffering for stdout)
- O\_CLOEXEC, O\_NOCTTY (because cloudabi lacks them)

## Updating Musl

The `libc-top-half/musl` directory is a `git subtree` for the upstream musl
repository. Updating it can be done with:

```
git subtree pull \
--prefix libc-top-half/musl \
https://git.musl-libc.org/git/musl v1.2.6 \
--squash
```

Resolve all conflicts and such that come about from the merge. Track deleted and
updated files and update `libc-top-half/CMakeLists.txt` as appropriate.
4 changes: 2 additions & 2 deletions libc-top-half/musl/COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Kylie McClain
Leah Neukirchen
Luca Barbato
Luka Perkov
Lynn Ochs
M Farkas-Dyck (Strake)
Mahesh Bodapati
Markus Wichmann
Expand Down Expand Up @@ -103,7 +104,6 @@ Stefan O'Rear
Szabolcs Nagy
Timo Teräs
Trutz Behn
Valentin Ochs
Will Dietz
William Haddon
William Pitcock
Expand Down Expand Up @@ -143,7 +143,7 @@ domain. The code also comes with a fallback permissive license for use
in jurisdictions that may not recognize the public domain.

The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011
Valentin Ochs and is licensed under an MIT-style license.
Lynn Ochs and is licensed under an MIT-style license.

The x86_64 port was written by Nicholas J. Kain and is licensed under
the standard MIT terms.
Expand Down
2 changes: 1 addition & 1 deletion libc-top-half/musl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ obj/src/internal/version.o obj/src/internal/version.lo: obj/src/internal/version

obj/crt/rcrt1.o obj/ldso/dlstart.lo obj/ldso/dynlink.lo: $(srcdir)/src/internal/dynlink.h $(srcdir)/arch/$(ARCH)/reloc.h

obj/crt/crt1.o obj/crt/scrt1.o obj/crt/rcrt1.o obj/ldso/dlstart.lo: $(srcdir)/arch/$(ARCH)/crt_arch.h
obj/crt/crt1.o obj/crt/Scrt1.o obj/crt/rcrt1.o obj/ldso/dlstart.lo: $(srcdir)/arch/$(ARCH)/crt_arch.h

obj/crt/rcrt1.o: $(srcdir)/ldso/dlstart.c

Expand Down
2 changes: 1 addition & 1 deletion libc-top-half/musl/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.5
1.2.6
53 changes: 53 additions & 0 deletions libc-top-half/musl/WHATSNEW
Original file line number Diff line number Diff line change
Expand Up @@ -2438,3 +2438,56 @@ arch-specific bugs fixed:
- riscv64 icache flush operation was non-functional
- sh sigsetjmp failed to properly restore call-saved register r8 on return
- sh dlsym RTLD_NEXT did not identify calling module correctly



1.2.6 release notes

new features:
- posix_getdents interface (new in POSIX-2024)
- renameat2 interface (linux extension)
- iconv support for CP858
- vdso clock_gettime for riscv{32,64}, powerpc{,64}, and s390x
- loongarch64 TLSDESC support
- exposed __getauxval for compiler runtime use detecting cpu features

compatibility:
- initgroups no longer artificially limits number of supplementary groups
- getusershell now skips blank lines and comments
- exit is now explicitly thread-safe (possible future requirement)
- atexit now fails rather than deadlocking if called from late dtor
- strerror now has error strings for EUCLEAN and ENAVAIL
- isatty no longer collapses errors to ENOTTY
- sched.h namespace pollution with _GNU_SOURCE is reduced
- hasmntopt now matches only whole options, not arbitrary substrings
- shadow.h no longer declares an unimplemented sgetspent interface
- vdso with missing sysv hash table (only gnu hash) is now supported

conformance:
- pwrite now handles O_APPEND correctly, reports error if it can't
- mbnrtowcs now conforms to new POSIX-2024 requirement for partial character
- iconv GBK now properly includes euro symbol
- strptime now accepts conversion specifiers added in POSIX-2024
- inet_ntop IPv6 "zero compression" now conforms to RFC 5952

bugs fixed:
- iconv euc-kr decoder could do oob writes on invalid inputs (CVE-2025-26519)
- iconv shift_jis decoder could produce wrong outputs for some invalid inputs
- printf did not honor hex float precision correctly in some cases
- lost or delayed wakes in sem_post under race condition
- termios input speed handling was wrong
- strcasestr failed to match zero-length needle
- fma handled corner case with negative zero wrongly
- syslog LOG_MAKEPRI macro was incorrect
- timer_create is no longer affected by known pthread_barrier bugs
- sysconf(_SC_MINSIGSTKSZ) computed min size incorrectly
- statx emulation left some fields uninitialized
- mntent wrongly included final newline in parsed field output
- SIGEV_THREAD timers could abort process if SIGTIMER became unblocked
- bind_textdomain_codeset returned wrong value

arch-specific bugs fixed:
- early dynamic linker handled page size wrong on dynamic pagesize archs
- arm and aarch64 crti/n files had wrong alignment
- m68k POLLWRNORM and POLLWRBAND values were incorrect
- x32 mq ABI was mismatched
2 changes: 0 additions & 2 deletions libc-top-half/musl/arch/aarch64/bits/posix.h

This file was deleted.

2 changes: 0 additions & 2 deletions libc-top-half/musl/arch/aarch64/bits/reg.h

This file was deleted.

18 changes: 0 additions & 18 deletions libc-top-half/musl/arch/aarch64/bits/stat.h

This file was deleted.

Loading