RESOLVED FIXED 285496
Missing Trailing Code Validation in end Instruction
https://bugs.webkit.org/show_bug.cgi?id=285496
Summary Missing Trailing Code Validation in end Instruction
tombox1337
Reported 2025-01-07 00:02:27 PST
Created attachment 473820 [details] program.js ### Description WebKit does not enforce the requirement for validating the presence of trailing code after the end instruction in WebAssembly functions. This behavior allows the execution of WebAssembly modules with trailing code without raising errors, violating the expected behavior where an error should occur for trailing code after the function end. ### Environment - OS: Ubuntu 20.04 - CPU: amd64 - WebKit Version: 146fa28a329d220785d2972c1d691555141e6406 (The latest) - Commands: ```bash ./JSCOnly/Debug/bin/jsc ./program.js ``` ### Test Case program.js ### Current State ```plaintext ./JSCOnly/Debug/bin/jsc ./program.js 0 ``` ### Expected Behavior The WebAssembly module should fail validation and report an error similar to: - Like gecko-dev: ```plaintext function body length mismatch ``` - Like v8: ```plaintext trailing code after function end ```
Attachments
program.js (428 bytes, application/x-javascript)
2025-01-07 00:02 PST, tombox1337
no flags
Radar WebKit Bug Importer
Comment 1 2025-01-14 00:03:15 PST
Yijia Huang
Comment 2 2025-01-14 17:15:10 PST
EWS
Comment 3 2025-01-16 01:33:31 PST
Committed 288996@main (5c94b688c7a1): <https://commits.webkit.org/288996@main> Reviewed commits have been landed. Closing PR #39043 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.