bytecodealliance / bytecodealliance/ComponentizeJS
Error: Failed to initialize the compiled Wasm binary with Wizer
- Ngôn ngữ chính
- Rust
- Star
- 391
- Fork
- 53
- Merge trung bình
- 3 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 1
Mô tả
Hi, I'm getting a wizer error when trying to use jco. This is a continuation of troubleshooting of https://github.com/bytecodealliance/StarlingMonkey/issues/15#issuecomment-2350455813. In `jco/node_modules/@bytecodealliance/componentize-js/src/componentize.js`, I turned on debugging.
```
const DEBUG_BINDINGS = true;
const DEBUG_CALLS = true;
```
I pushed the output debugging sources to https://github.com/cataggar/StarlingMonkey15/tree/main/b0c26fbad66e
```
~/ms/jco> node src/jco.js componentize /Users/cataggar/ms/StarlingMonkey15/cowsay/cowsay.js --wit /Users/cataggar/ms/StarlingMonkey15/cowsay/src/cowsay.wit -o /Users/cataggar/ms/StarlingMonkey15/cowsay.wasm
```
```
--- Wizer Env ---
{
DEBUG: '1',
SOURCE_NAME: 'cowsay.js',
IMPORT_WRAPPER_CNT: '0',
EXPORT_CNT: '1',
WASMTIME_BACKTRACE_DETAILS: '1',
EXPORT0_NAME: 'export_tsVersion',
EXPORT0_ARGS: '',
EXPORT0_RET: '*i32',
EXPORT0_RETSIZE: '8',
IMPORT_CNT: 0
}
(wizer) create the memory buffer JS object
(wizer) create the realloc JS function
(wizer) create the 0 import JS functions
(wizer) setting the binding global
(wizer) complete
Redirecting call to abort() to mozalloc_abort
Error: the `componentize.wizer` function trapped
Caused by:
0: error while executing at wasm backtrace:
0: 0x7a3ec5 - !
1: 0x7a7fee - !
2: 0x7a84e0 - !
3: 0x72c8c0 - !
4: 0x352387 - !
5: 0x6ad3b2 - !
6: 0x74ed01 - !
7: 0x36bb2f - !
8: 0x4dcd55 - !
9: 0xa91cf - !
10: 0x3424d4 - !
11: 0x66ac73 - !
12: 0x625349 - !
13: 0x422874 - !
14: 0x4225c1 - !
15: 0x2d00ad - !
16: 0x1fc7ba - !
17: 0x50ceed - !
18: 0x33853e - !
1: wasm trap: wasm `unreachable` instruction executed
(jco componentize) Error: Failed to initialize the compiled Wasm binary with Wizer:
Wizering failed to complete
Binary and sources available for debugging at /var/folders/xm/hr4sq0d567vfs0xdth9t38zc0000gn/T/b0c26fbad66e
at componentize (file:///Users/cataggar/ms/jco/node_modules/@bytecodealliance/componentize-js/src/componentize.js:261:13)
at async componentize (file:///Users/cataggar/ms/jco/src/cmd/componentize.js:11:25)
at async file:///Users/cataggar/ms/jco/src/jco.js:200:9
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Tái hiện lỗi bằng lệnh jco componentize được hiển thị cùng các đầu vào JavaScript và WIT của cowsay. Bắt đầu tại jco/node_modules/@bytecodealliance/componentize-js/src/componentize.js, ở lệnh gọi được báo cáo gần dòng 261, sau đó kiểm tra các nguồn gỡ lỗi của Wizer và backtrace để xác định tại sao quá trình khởi tạo lại gây ra trap. Công việc được xem là hoàn tất khi lệnh hoàn thành thành công hoặc báo cáo rõ ràng lỗi cơ bản bằng một bài kiểm thử hồi quy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, wasm
- Lĩnh vực
- compilers, tooling
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100