@ai-ecoverse/slicc-kernel 1.53.2 → 1.53.3
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.
|
@@ -8655,7 +8655,14 @@ var init_dylink = __esm({
|
|
|
8655
8655
|
});
|
|
8656
8656
|
|
|
8657
8657
|
// src/process/wasi/wasi-module.ts
|
|
8658
|
-
|
|
8658
|
+
function libcVersion(module) {
|
|
8659
|
+
for (const section2 of WebAssembly.Module.customSections(module, "slicc.libc")) {
|
|
8660
|
+
const found = LIBC_MARK.exec(new TextDecoder().decode(section2));
|
|
8661
|
+
if (found) return Number(found[1]);
|
|
8662
|
+
}
|
|
8663
|
+
return void 0;
|
|
8664
|
+
}
|
|
8665
|
+
var RESERVED_NAMESPACES, LIBC_MARK;
|
|
8659
8666
|
var init_wasi_module = __esm({
|
|
8660
8667
|
"src/process/wasi/wasi-module.ts"() {
|
|
8661
8668
|
"use strict";
|
|
@@ -8665,6 +8672,7 @@ var init_wasi_module = __esm({
|
|
|
8665
8672
|
"wasi",
|
|
8666
8673
|
"env"
|
|
8667
8674
|
]);
|
|
8675
|
+
LIBC_MARK = /^wasix-sysroot \d{4}\.\d+\.\d+-(\d+)/;
|
|
8668
8676
|
}
|
|
8669
8677
|
});
|
|
8670
8678
|
|
|
@@ -10290,13 +10298,14 @@ function posixSignal(sig) {
|
|
|
10290
10298
|
function nsToMs(ns) {
|
|
10291
10299
|
return Math.ceil(Number(ns) / 1e6);
|
|
10292
10300
|
}
|
|
10293
|
-
var FDFLAGSEXT_CLOEXEC, SPAWN_OP_SIZE, SPAWN_OPS, RIGHTS_FD_WRITE, ICANON2, ECHO2, FUTEX_SLICE_MS, MAIN_HANDLE, WasixHost;
|
|
10301
|
+
var FDFLAGSEXT_CLOEXEC, SPAWN_OP_SIZE, SPAWN_OPS, RIGHTS_FD_WRITE, ICANON2, ECHO2, FUTEX_SLICE_MS, EINTR_LIBC, MAIN_HANDLE, WasixHost;
|
|
10294
10302
|
var init_wasix_host = __esm({
|
|
10295
10303
|
"src/process/wasi/wasix-host.ts"() {
|
|
10296
10304
|
"use strict";
|
|
10297
10305
|
init_wasi_abi();
|
|
10298
10306
|
init_wasi_files();
|
|
10299
10307
|
init_wasi_host();
|
|
10308
|
+
init_wasi_module();
|
|
10300
10309
|
init_wasi_threads();
|
|
10301
10310
|
init_wasix_ffi();
|
|
10302
10311
|
init_wasix_linker();
|
|
@@ -10311,6 +10320,7 @@ var init_wasix_host = __esm({
|
|
|
10311
10320
|
ICANON2 = 2;
|
|
10312
10321
|
ECHO2 = 8;
|
|
10313
10322
|
FUTEX_SLICE_MS = 50;
|
|
10323
|
+
EINTR_LIBC = 22;
|
|
10314
10324
|
MAIN_HANDLE = 2147483647;
|
|
10315
10325
|
WasixHost = class _WasixHost {
|
|
10316
10326
|
process;
|
|
@@ -10331,7 +10341,7 @@ var init_wasix_host = __esm({
|
|
|
10331
10341
|
);
|
|
10332
10342
|
if (module && !WebAssembly.Module.imports(module).some((i) => i.name === "fd_fdflags_set")) {
|
|
10333
10343
|
host.fds.implicitCloexec = true;
|
|
10334
|
-
host.interruptWakes =
|
|
10344
|
+
host.interruptWakes = (libcVersion(module) ?? 0) < EINTR_LIBC;
|
|
10335
10345
|
}
|
|
10336
10346
|
}
|
|
10337
10347
|
get mem() {
|