@ai-ecoverse/wasix-sysroot 2025.9.30-39 → 2025.9.30-41

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-41: **relative paths go through the cwd descriptor** (homescoop#1305, slicc-kernel#1164). A relative path, and every `*at(AT_FDCWD, …)` call, is resolved by the host against fd 3 (the `.` preopen, which slicc-kernel keeps as the process's cwd), not joined to a cached cwd string and sent to the `/` preopen. In a cwd that was removed and replaced by a directory of the same name, relative lookups (`.` included) are ENOENT, as on Linux, instead of opening the replacement; `chdir(".")` is ENOENT and leaves the cwd where it is, and `chdir("..")` or `chdir("./..")` still works there, since a relative `chdir` that `realpath` can't resolve goes to the host's `chdir` as is. `getcwd` always asks the host; slicc-kernel answers ENOENT in a removed cwd for programs whose `slicc.libc` marker is `wasix-sysroot 2025.9.30-41` or later (slicc-kernel#1227). The removed-cwd behaviour needs slicc-kernel ≥ 1.135.6; on older kernels relative lookups there still reach the replacement. A host without a `.` preopen at fd 3 gets the old string join.
45
+
46
+ Since 2025.9.30-40:
47
+ - **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`.
48
+ - **`sigsetjmp(env, save)` evaluates `env` once** in the EH trees (homescoop#1120), as glibc's does.
49
+ - **`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).
50
+ - **`readdir()` reports `DT_FIFO`** for a FIFO (homescoop#1124): when WASI says "unknown", libc asks `fstatat`.
51
+
44
52
  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).
45
53
 
46
54
  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`.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/wasix-sysroot",
3
- "version": "2025.9.30-39",
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-*)",
3
+ "version": "2025.9.30-41",
4
+ "description": "C and C++ system libraries for building WASIX programs that run on slicc.",
5
5
  "license": "Apache-2.0 WITH LLVM-exception",
6
6
  "repository": {
7
7
  "type": "git",
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)