Commit 1cbda235 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[asm.js] Fix missing recursion failure checks.

R=clemensh@chromium.org
BUG=v8:6127

Change-Id: I3b51474a6058312b4158c8cdd3eef004ee2e7d0c
Reviewed-on: https://chromium-review.googlesource.com/461143Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44227}
parent 98c0f6b1
......@@ -1677,7 +1677,8 @@ AsmType* AsmJsParser::MultiplicativeExpression() {
current_function_builder_->Emit(kExprI32Mul);
return AsmType::Intish();
}
AsmType* b = UnaryExpression();
AsmType* b;
RECURSEn(b = UnaryExpression());
if (a->IsA(AsmType::DoubleQ()) && b->IsA(AsmType::DoubleQ())) {
current_function_builder_->Emit(kExprF64Mul);
a = AsmType::Double();
......@@ -1688,7 +1689,8 @@ AsmType* AsmJsParser::MultiplicativeExpression() {
FAILn("expected doubles or floats");
}
} else if (Check('/')) {
AsmType* b = MultiplicativeExpression();
AsmType* b;
RECURSEn(b = MultiplicativeExpression());
if (a->IsA(AsmType::DoubleQ()) && b->IsA(AsmType::DoubleQ())) {
current_function_builder_->Emit(kExprF64Div);
a = AsmType::Double();
......@@ -1705,7 +1707,8 @@ AsmType* AsmJsParser::MultiplicativeExpression() {
FAILn("expected doubles or floats");
}
} else if (Check('%')) {
AsmType* b = MultiplicativeExpression();
AsmType* b;
RECURSEn(b = MultiplicativeExpression());
if (a->IsA(AsmType::DoubleQ()) && b->IsA(AsmType::DoubleQ())) {
current_function_builder_->Emit(kExprF64Mod);
a = AsmType::Double();
......@@ -1727,11 +1730,13 @@ AsmType* AsmJsParser::MultiplicativeExpression() {
// 6.8.9 AdditiveExpression
AsmType* AsmJsParser::AdditiveExpression() {
AsmType* a = MultiplicativeExpression();
AsmType* a;
RECURSEn(a = MultiplicativeExpression());
int n = 0;
for (;;) {
if (Check('+')) {
AsmType* b = MultiplicativeExpression();
AsmType* b;
RECURSEn(b = MultiplicativeExpression());
if (a->IsA(AsmType::Double()) && b->IsA(AsmType::Double())) {
current_function_builder_->Emit(kExprF64Add);
a = AsmType::Double();
......@@ -1754,7 +1759,8 @@ AsmType* AsmJsParser::AdditiveExpression() {
FAILn("illegal types for +");
}
} else if (Check('-')) {
AsmType* b = MultiplicativeExpression();
AsmType* b;
RECURSEn(b = MultiplicativeExpression());
if (a->IsA(AsmType::Double()) && b->IsA(AsmType::Double())) {
current_function_builder_->Emit(kExprF64Sub);
a = AsmType::Double();
......
......@@ -662,20 +662,13 @@
['variant == asm_wasm', {
# Issue 6127: We won't fix these in the "old" validator. But we definitely
# need to re-enable these for the "new" validator.
'compiler/regress-445859': [SKIP],
'compiler/regress-452427': [SKIP],
'regress/regress-458987': [SKIP],
'regress/regress-599719': [SKIP],
'regress/regress-618608': [SKIP],
'regress/regress-670808': [SKIP],
'wasm/asm-wasm-exception-in-tonumber': [SKIP],
'wasm/asm-wasm-stack': [SKIP],
# Issue 6127: Tiggers ASAN reports with "new" validator.
'asm/b5528-comma': [SKIP],
'asm/if-folding': [SKIP],
'asm/if-reduction': [SKIP],
# Issue 6127: Breaks on no-snap bots.
'es8/regress/regress-624300': [SKIP],
'regress/regress-148378': [SKIP],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment