Spec interpreter/implementation discrepancy - a local with an invalid type and 0 count
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- wasm
- Lĩnh vực
- compilers
Hướng nghiên cứu
Start with the linked code-section specification and the reference interpreter, then reproduce the behavior using foo.wasm and compare it with V8, SpiderMonkey, and Wasmtime. Determine whether a zero-count local's type should be validated or discarded, and document the agreed specification or implementation outcome.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
My understanding of the definition of the code section in the online specification is that if an entry in locals has n=0 count that it's discarded and not represented in the AST of a module. This means that the corresponding local's type is parsed, but not validated. The reference interpreter implements this behavior and for this input:
(module binary
"\00asm\01\00\00\00"
"\01\04\01\60\00\00" ;; Type section: 1 type
"\03\02\01\00" ;; Function section: 1 function
"\0a\07" ;; code section, 7 bytes
"\01" ;; 1 function body
"\05" ;; body size, 5 bytes
"\01" ;; 1 locals entry
"\00" ;; count: 0
"\63\01" ;; type: (ref null 1) -- not a valid type index
"\0b" ;; end
)
the spec interpreter passes. This same module (foo.wasm) does not validate in V8, SpiderMonkey, or Wasmtime, however. These engines all validate the local's type and reject the module saying that it's out-of-bounds.
I wanted to raise this as an issue to see if others have thoughts about this. I don't have a preference for how exactly to go here myself.
- Ngôn ngữ chính
- WebAssembly
- Star
- 3.5k
- Fork
- 539
- Merge trung bình
- 10 giờ 30 phút
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của WebAssembly/spec
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
WebAssembly/spec#2269 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 54/100
WebAssembly/spec#2265 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[js-api] A mutable global import allocates a const global before LinkErrorCó thể đã có người làm @chicoxyzzy đã nhận 3 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
WebAssembly/spec#2253 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[spectec] Wasm 1.0: `$instantiate` missing premisesCó thể đã có người làm @rossberg đã nhận 29 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
WebAssembly/spec#2245 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
WebAssembly/spec#2235 · 9 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của WebAssembly/spec
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
The XMIR reader wraps an `@as` index above `Int`, so `as="α18446744073709551616"` is read as `α0`Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
objectionary/phino#1769 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A `\u` in an object name breaks the Javadoc that `to-java.xsl` writes, so the class does not compileĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
objectionary/eo#9347 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
erdos-status-sync
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
google-deepmind/formal-conjectures#6920 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area-web-js web-libraries
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 4 ngày