Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Unified Diff: src/typing-asm.cc

Issue 2041843002: [asmjs] Validator should reject assignments to heap variables in functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-617529.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typing-asm.cc
diff --git a/src/typing-asm.cc b/src/typing-asm.cc
index d98998520fae35bbc16c305979a6123df1be0cd7..df80c8ca0a7471739b6b407eed3f8b8619dd87f0 100644
--- a/src/typing-asm.cc
+++ b/src/typing-asm.cc
@@ -682,6 +682,9 @@ void AsmTyper::VisitAssignment(Assignment* expr) {
if (intish_ != 0) {
FAIL(expr, "intish or floatish assignment");
}
+ if (in_function_ && target_type->IsArray()) {
+ FAIL(expr, "assignment to array variable");
+ }
expected_type_ = target_type;
Variable* var = proxy->var();
VariableInfo* info = GetVariableInfo(var);
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-617529.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698