WebAssembly: validate load / store alignment
authorjfbastien@apple.com <jfbastien@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 May 2017 07:07:35 +0000 (07:07 +0000)
committerjfbastien@apple.com <jfbastien@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 May 2017 07:07:35 +0000 (07:07 +0000)
commit4af090a623a3f90b5f041f224c6abe877ccc19b5
tree4f1c20b36edbe097238708a0e262eef310973d15
parent7c2004d48a43c8fc17825701eebe6bbee3865a56
WebAssembly: validate load / store alignment
https://bugs.webkit.org/show_bug.cgi?id=168836
<rdar://problem/31965349>

Reviewed by Keith Miller.

JSTests:

* wasm/WASM.js: fix regular expression greed
* wasm/function-tests/memory-alignment.js: Added.
(const.op.of.WASM.opcodes):
* wasm/wasm.json: fix formatting

Source/JavaScriptCore:

* wasm/WasmFunctionParser.h: check the alignment
* wasm/generateWasm.py: generate the log2 alignment helper
(Wasm):
(isSimple):
(memoryLog2Alignment):
* wasm/generateWasmOpsHeader.py:
(memoryLog2AlignmentGenerator):
* wasm/wasm.json: fix formatting

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/wasm/WASM.js
JSTests/wasm/wasm.json
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wasm/WasmFunctionParser.h
Source/JavaScriptCore/wasm/generateWasm.py
Source/JavaScriptCore/wasm/generateWasmOpsHeader.py
Source/JavaScriptCore/wasm/wasm.json