Summary: | WebAssembly: test imports and exports with 16-bit characters | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | JF Bastien <jfbastien> | ||||||
Component: | JavaScriptCore | Assignee: | JF Bastien <jfbastien> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | buildbot, commit-queue, ggaren, jfbastien, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 161709 | ||||||||
Attachments: |
|
Description
JF Bastien
2016-12-16 16:35:16 PST
*** Bug 165976 has been marked as a duplicate of this bug. *** (In reply to comment #0) > The Builder should already handle these, but the parser uses > consumeUTF8String which is suspicious. To elaborate, the implementation of consumeUTF8String looks wrong. Not the actual call to it. The implementation skips m_offset stringLength forward, which is wrong for 16 bit strings. (In reply to comment #2) > (In reply to comment #0) > > The Builder should already handle these, but the parser uses > > consumeUTF8String which is suspicious. > > To elaborate, the implementation of consumeUTF8String looks wrong. Not the > actual call to it. The implementation skips m_offset stringLength forward, > which is wrong for 16 bit strings. Nevermind. We're treating a field of number of bytes from wasm as the *string length*. This is obviously wrong for 16 bit strings. Created attachment 312256 [details]
patch
Comment on attachment 312256 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=312256&action=review r=me > Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp:141 > + return before + String(" ") + String::fromUTF8(import.module) + ":" + String::fromUTF8(import.field) + " " + after; you should use makeString here Created attachment 312275 [details]
patch
Use makeString.
Comment on attachment 312275 [details] patch Clearing flags on attachment: 312275 Committed r217921: <http://trac.webkit.org/changeset/217921> All reviewed patches have been landed. Closing bug. |