@ai-ecoverse/wasix-sysroot 2025.9.30-38 → 2025.9.30-40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -41,6 +41,14 @@ Since 2025.9.30-18:
41
41
  `sleep` early with the seconds left.
42
42
  - `raise()` and `pthread_kill(pthread_self())` reach the handler.
43
43
 
44
+ Since 2025.9.30-40:
45
+ - **malloc uses the initial memory** (homescoop#1287). wasix-libc had turned off dlmalloc's `try_init_allocator`, so the pages between `__heap_base` and the initial memory size went unused and every allocation grew the memory, however large `--initial-memory` was. It's back: a static program gets the pages up to wasm-ld's `__heap_end`, and a PIE dynamic main (python) the pages from the loader's `__heap_base` to the memory size at the first malloc. A program linked with `--initial-memory` that stays under it never calls `memory.grow`.
46
+ - **`sigsetjmp(env, save)` evaluates `env` once** in the EH trees (homescoop#1120), as glibc's does.
47
+ - **`poll(POLLIN)`** on a pipe write end whose reader is gone gives `POLLERR`, and on an `O_WRONLY` regular file `POLLIN`, as on Linux (homescoop#1119).
48
+ - **`readdir()` reports `DT_FIFO`** for a FIFO (homescoop#1124): when WASI says "unknown", libc asks `fstatat`.
49
+
50
+ Since 2025.9.30-39: **malloc refreshes the thread's view of a grown shared memory** (homescoop#1287, slicc-kernel#1172). In threaded programs V8 updates another thread's memory length lazily, so a `memset`/`memcpy` (bulk `memory.fill`/`memory.copy`) into a block from pages another thread's `sbrk` just grew could trap with `memory access out of bounds`. `malloc`, `calloc`, `realloc`, `posix_memalign` and `aligned_alloc` now call `memory.grow(0)` before they return a block that ends above this thread's `memory.size`. calloc's zeroing and realloc's copy run after that check. The common case costs one `memory.size` (`patches/dlmalloc-memory-view.patch`; the same file applies to wasi-libc).
51
+
44
52
  Since 2025.9.30-38: `poll(POLLIN)` on an empty pipe read end whose writers are gone gives `POLLHUP` alone, as on Linux, on slicc-kernel ≥ 1.125.0 (homescoop#1133). A socket at EOF still gives `POLLIN`.
45
53
 
46
54
  Since 2025.9.30-37:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/wasix-sysroot",
3
- "version": "2025.9.30-38",
3
+ "version": "2025.9.30-40",
4
4
  "description": "WASIX sysroots: st_uid/st_gid, chown and access() through slicc-kernel file owners (getuid()/getgid() on older kernels), file modes via slicc_fs, F_SETFD CLOEXEC fix, select exceptfds, physical chdir, POSIX TZ, socketpair flags, sigaction_set, alarm/setitimer/getitimer, EINTR sleeps, raise/pthread_kill, process credentials from slicc-kernel (no fixed uid 1000), per-fd termios/winsize from slicc-kernel (Linux and WASIX ioctl numbers), fork in the PIC variants, signal masks, poll/ppoll with events 0, epoll_ctl with Linux op numbers, named semaphores through slicc-kernel, flock, mkfifo, sa_mask, Linux S_IF* bits, wasip1; libc++/libc++abi/libunwind from LLVM 20.1 (legacy EH in sysroot-eh/ehpic, exnref in sysroot-exnref-*)",
5
5
  "license": "Apache-2.0 WITH LLVM-exception",
6
6
  "repository": {
Binary file
Binary file
@@ -53,7 +53,8 @@ _Noreturn void _longjmp (jmp_buf, int);
53
53
  /* homescoop (#1059): LLVM's wasm sjlj lowering rewrites only setjmp call
54
54
  * sites, so sigsetjmp records the mask and then is setjmp at the call site. */
55
55
  int __homescoop_sigsetjmp_save(sigjmp_buf, int);
56
- #define sigsetjmp(env, save) (__homescoop_sigsetjmp_save((env), (save)) + setjmp(env))
56
+ /* -40 (#1120): env once, as glibc's sigsetjmp evaluates it. */
57
+ #define sigsetjmp(env, save) __extension__ ({ __typeof__(&(env)[0]) __hs_env = (env); __homescoop_sigsetjmp_save(__hs_env, (save)) + setjmp(__hs_env); })
57
58
  #endif
58
59
 
59
60
  #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
Binary file
Binary file
@@ -53,7 +53,8 @@ _Noreturn void _longjmp (jmp_buf, int);
53
53
  /* homescoop (#1059): LLVM's wasm sjlj lowering rewrites only setjmp call
54
54
  * sites, so sigsetjmp records the mask and then is setjmp at the call site. */
55
55
  int __homescoop_sigsetjmp_save(sigjmp_buf, int);
56
- #define sigsetjmp(env, save) (__homescoop_sigsetjmp_save((env), (save)) + setjmp(env))
56
+ /* -40 (#1120): env once, as glibc's sigsetjmp evaluates it. */
57
+ #define sigsetjmp(env, save) __extension__ ({ __typeof__(&(env)[0]) __hs_env = (env); __homescoop_sigsetjmp_save(__hs_env, (save)) + setjmp(__hs_env); })
57
58
  #endif
58
59
 
59
60
  #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
@@ -53,7 +53,8 @@ _Noreturn void _longjmp (jmp_buf, int);
53
53
  /* homescoop (#1059): LLVM's wasm sjlj lowering rewrites only setjmp call
54
54
  * sites, so sigsetjmp records the mask and then is setjmp at the call site. */
55
55
  int __homescoop_sigsetjmp_save(sigjmp_buf, int);
56
- #define sigsetjmp(env, save) (__homescoop_sigsetjmp_save((env), (save)) + setjmp(env))
56
+ /* -40 (#1120): env once, as glibc's sigsetjmp evaluates it. */
57
+ #define sigsetjmp(env, save) __extension__ ({ __typeof__(&(env)[0]) __hs_env = (env); __homescoop_sigsetjmp_save(__hs_env, (save)) + setjmp(__hs_env); })
57
58
  #endif
58
59
 
59
60
  #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
@@ -53,7 +53,8 @@ _Noreturn void _longjmp (jmp_buf, int);
53
53
  /* homescoop (#1059): LLVM's wasm sjlj lowering rewrites only setjmp call
54
54
  * sites, so sigsetjmp records the mask and then is setjmp at the call site. */
55
55
  int __homescoop_sigsetjmp_save(sigjmp_buf, int);
56
- #define sigsetjmp(env, save) (__homescoop_sigsetjmp_save((env), (save)) + setjmp(env))
56
+ /* -40 (#1120): env once, as glibc's sigsetjmp evaluates it. */
57
+ #define sigsetjmp(env, save) __extension__ ({ __typeof__(&(env)[0]) __hs_env = (env); __homescoop_sigsetjmp_save(__hs_env, (save)) + setjmp(__hs_env); })
57
58
  #endif
58
59
 
59
60
  #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)