Skip to content

Commit

Permalink
Merge r238578 - [Re-landing] NaNs read from Wasm code needs to be be …
Browse files Browse the repository at this point in the history
…purified.

https://bugs.webkit.org/show_bug.cgi?id=191056
<rdar://problem/45660341>

Reviewed by Filip Pizlo.

* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):
  • Loading branch information
Mark Lam authored and mcatanzaro committed Dec 8, 2018
1 parent 4aed210 commit 3c5b915
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
2018-11-27 Mark Lam <mark.lam@apple.com>

[Re-landing] NaNs read from Wasm code needs to be be purified.
https://bugs.webkit.org/show_bug.cgi?id=191056
<rdar://problem/45660341>

Reviewed by Filip Pizlo.

* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):

2018-10-03 Mark Lam <mark.lam@apple.com>

Make string MaxLength for all WTF and JS strings consistently equal to INT_MAX.
Expand Down
4 changes: 2 additions & 2 deletions Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp
Expand Up @@ -388,11 +388,11 @@ void WebAssemblyModuleRecord::link(ExecState* exec, JSValue, JSObject* importObj
return;

case Wasm::F32:
exportedValue = JSValue(m_instance->instance().loadF32Global(exp.kindIndex));
exportedValue = jsNumber(purifyNaN(m_instance->instance().loadF32Global(exp.kindIndex)));
break;

case Wasm::F64:
exportedValue = JSValue(m_instance->instance().loadF64Global(exp.kindIndex));
exportedValue = jsNumber(purifyNaN(m_instance->instance().loadF64Global(exp.kindIndex)));
break;

default:
Expand Down

0 comments on commit 3c5b915

Please sign in to comment.