WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
166416
WebAssembly: Make the spec-tests/start.wast.js test pass
https://bugs.webkit.org/show_bug.cgi?id=166416
Summary
WebAssembly: Make the spec-tests/start.wast.js test pass
Saam Barati
Reported
2016-12-22 00:13:16 PST
Two things are needed: 1. Our start functions are borked if the thing is an import (the current code assumes all imports are exports, which is wrong) 2. Unreachable should throw an exception, not crash.
Attachments
patch
(7.67 KB, patch)
2016-12-22 00:32 PST
,
Saam Barati
ysuzuki
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-12-22 00:20:40 PST
<
rdar://problem/29784532
>
Saam Barati
Comment 2
2016-12-22 00:32:54 PST
Created
attachment 297648
[details]
patch
Yusuke Suzuki
Comment 3
2016-12-22 01:20:56 PST
Comment on
attachment 297648
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=297648&action=review
r=me
> Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp:185 > if (!m_startFunction.get()) {
I think this is always true, right? If so, let's drop this brace.
JF Bastien
Comment 4
2016-12-22 09:08:39 PST
Comment on
attachment 297648
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=297648&action=review
>> Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp:185 >> if (!m_startFunction.get()) { > > I think this is always true, right? If so, let's drop this brace.
Indeed, the erroneous code I had above was the only code which touched m_startFunction. This should now never be set when we get here. I think you should also move this code down here: 97 bool hasStart = !!moduleInformation.startFunctionIndexSpace; 98 auto startFunctionIndexSpace = moduleInformation.startFunctionIndexSpace.value_or(0);
Saam Barati
Comment 5
2016-12-22 10:23:16 PST
Comment on
attachment 297648
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=297648&action=review
>>> Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp:185 >>> if (!m_startFunction.get()) { >> >> I think this is always true, right? If so, let's drop this brace. > > Indeed, the erroneous code I had above was the only code which touched m_startFunction. This should now never be set when we get here. > > I think you should also move this code down here: > 97 bool hasStart = !!moduleInformation.startFunctionIndexSpace; > 98 auto startFunctionIndexSpace = moduleInformation.startFunctionIndexSpace.value_or(0);
Sounds good, I'll make these changes.
Saam Barati
Comment 6
2016-12-22 10:32:03 PST
landed in:
https://trac.webkit.org/changeset/210102
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug