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

Unified Diff: src/crankshaft/hydrogen.h

Issue 2348293002: [crankshaft] Protect against deopt loops from string length overflows. (Closed)
Patch Set: Fix MSAN Created 4 years, 3 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 | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.h
diff --git a/src/crankshaft/hydrogen.h b/src/crankshaft/hydrogen.h
index d01958456d7a64ef3361d25f2d68fe6e9d854593..9f7ef0bf82216c7aa61d197afad36721df1c0c74 100644
--- a/src/crankshaft/hydrogen.h
+++ b/src/crankshaft/hydrogen.h
@@ -440,6 +440,13 @@ class HGraph final : public ZoneObject {
return depends_on_empty_array_proto_elements_;
}
+ void MarkDependsOnStringLengthOverflow() {
+ if (depends_on_string_length_overflow_) return;
+ info()->dependencies()->AssumePropertyCell(
+ isolate()->factory()->string_length_protector());
+ depends_on_string_length_overflow_ = true;
+ }
+
bool has_uint32_instructions() {
DCHECK(uint32_instructions_ == NULL || !uint32_instructions_->is_empty());
return uint32_instructions_ != NULL;
@@ -515,6 +522,7 @@ class HGraph final : public ZoneObject {
bool allow_code_motion_;
bool use_optimistic_licm_;
bool depends_on_empty_array_proto_elements_;
+ bool depends_on_string_length_overflow_;
int type_change_checksum_;
int maximum_environment_size_;
int no_side_effects_scope_count_;
« no previous file with comments | « no previous file | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698