payload: {"action":"created","issue":{"url":"https://api.github.com/repos/WebAssembly/spec/issues/1040","repository_url":"https://api.github.com/repos/WebAssembly/spec","labels_url":"https://api.github.com/repos/WebAssembly/spec/issues/1040/labels{/name}","comments_url":"https://api.github.com/repos/WebAssembly/spec/issues/1040/comments","events_url":"https://api.github.com/repos/WebAssembly/spec/issues/1040/events","html_url":"https://github.com/WebAssembly/spec/issues/1040","id":462807835,"node_id":"MDU6SXNzdWU0NjI4MDc4MzU=","number":1040,"title":"Malformed vs invalid test assertions","user":{"login":"AndrewScheidecker","id":2691804,"node_id":"MDQ6VXNlcjI2OTE4MDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2691804?v=4","gravatar_id":"","url":"https://api.github.com/users/AndrewScheidecker","html_url":"https://github.com/AndrewScheidecker","followers_url":"https://api.github.com/users/AndrewScheidecker/followers","following_url":"https://api.github.com/users/AndrewScheidecker/following{/other_user}","gists_url":"https://api.github.com/users/AndrewScheidecker/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewScheidecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewScheidecker/subscriptions","organizations_url":"https://api.github.com/users/AndrewScheidecker/orgs","repos_url":"https://api.github.com/users/AndrewScheidecker/repos","events_url":"https://api.github.com/users/AndrewScheidecker/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewScheidecker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2019-07-01T16:33:52Z","updated_at":"2019-07-03T11:15:50Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Some spec tests rely on implementations precisely distinguishing malformed vs invalid modules, but use modules that are both malformed and invalid. As an example: https://github.com/WebAssembly/spec/blob/master/test/core/if.wast#L894\r\n\r\nIn this case, the `if`/`end` labels don't match, but the `if` instruction also doesn't validate because the stack is empty.\r\n\r\nThis means that conforming implementations must strictly observe the error priority of the reference interpreter: it must parse the whole module and find any malformed syntax, even if it realizes that the module is invalid before it encounters malformed syntax.\r\n\r\nIs it valuable to require implementations to find the syntax error instead of the validation error? I don't think it is: what matters is that the module is rejected. It simplifies the spec to factor parsing and validation into separate stages, but I imagine most implementations will be doing them simultaneously.\r\n\r\nNote that the code to convert the tests to JavaScript currently doesn't distinguish between `assert_invalid` and `assert_malformed`: https://github.com/WebAssembly/spec/blob/master/interpreter/script/js.ml#L76\r\n\r\nIMO the test scripts should just use the equivalent of `assert_malformed_or_invalid`."},"comment":{"url":"https://api.github.com/repos/WebAssembly/spec/issues/comments/508050633","html_url":"https://github.com/WebAssembly/spec/issues/1040#issuecomment-508050633","issue_url":"https://api.github.com/repos/WebAssembly/spec/issues/1040","id":508050633,"node_id":"MDEyOklzc3VlQ29tbWVudDUwODA1MDYzMw==","user":{"login":"AndrewScheidecker","id":2691804,"node_id":"MDQ6VXNlcjI2OTE4MDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2691804?v=4","gravatar_id":"","url":"https://api.github.com/users/AndrewScheidecker","html_url":"https://github.com/AndrewScheidecker","followers_url":"https://api.github.com/users/AndrewScheidecker/followers","following_url":"https://api.github.com/users/AndrewScheidecker/following{/other_user}","gists_url":"https://api.github.com/users/AndrewScheidecker/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewScheidecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewScheidecker/subscriptions","organizations_url":"https://api.github.com/users/AndrewScheidecker/orgs","repos_url":"https://api.github.com/users/AndrewScheidecker/repos","events_url":"https://api.github.com/users/AndrewScheidecker/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewScheidecker/received_events","type":"User","site_admin":false},"created_at":"2019-07-03T11:15:50Z","updated_at":"2019-07-03T11:15:50Z","author_association":"CONTRIBUTOR","body":"I  suppose that I *can* ignore the distinction, but it feels like a personal failure when the spec test says `assert_invalid`, and WAVM says \"it was malformed, but good enough!\""}}
other: {"actor":{"display_login":"AndrewScheidecker"}}