diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-10-11 17:51:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-11 17:51:28 -0700 |
commit | 66dbc57d32bb2c8c01deefba7a035ebed5a42e2c (patch) | |
tree | dd11daa6008d62dcf708a65093bdfd2d3a14e4fa | |
parent | f6162405686348cf6f0b032e6796b5b76f750abf (diff) | |
download | binaryen-66dbc57d32bb2c8c01deefba7a035ebed5a42e2c.tar.gz binaryen-66dbc57d32bb2c8c01deefba7a035ebed5a42e2c.tar.bz2 binaryen-66dbc57d32bb2c8c01deefba7a035ebed5a42e2c.zip |
properly handle unreachable atomic operations, fixes a regression from #1693 (#1696)
-rw-r--r-- | src/wasm/wasm-validator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 4d88b9d1f..07c7b6aad 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -504,7 +504,7 @@ void FunctionValidator::visitLoad(Load* curr) { shouldBeEqualOrFirstIsUnreachable(curr->ptr->type, i32, curr, "load pointer type must be i32"); if (curr->isAtomic) { shouldBeFalse(curr->signed_, curr, "atomic loads must be unsigned"); - shouldBeTrue(isIntegerType(curr->type), curr, "atomic loads must be of integers"); + shouldBeIntOrUnreachable(curr->type, curr, "atomic loads must be of integers"); } } @@ -517,7 +517,7 @@ void FunctionValidator::visitStore(Store* curr) { shouldBeUnequal(curr->value->type, none, curr, "store value type must not be none"); shouldBeEqualOrFirstIsUnreachable(curr->value->type, curr->valueType, curr, "store value type must match"); if (curr->isAtomic) { - shouldBeTrue(isIntegerType(curr->valueType), curr, "atomic stores must be of integers"); + shouldBeIntOrUnreachable(curr->valueType, curr, "atomic stores must be of integers"); } } |