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

Unified Diff: src/ic/ic.cc

Issue 2100313002: Add crash instrumentation for crbug.com/621147 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: check value instead of map 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 162e282d6a347fc03461c48d0376f8a37b7dc589..4e6b4a10a1c40d19906f04d46f909d8e2e815e56 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -2535,6 +2535,24 @@ MaybeHandle<Object> BinaryOpIC::Transition(
Handle<Object> right) {
BinaryOpICState state(isolate(), extra_ic_state());
+#ifdef V8_TARGET_ARCH_X64
+ // Crash instrumentation for crbug.com/621147.
+ uintptr_t left_raw = reinterpret_cast<uintptr_t>(*left);
+ uintptr_t hole_raw =
+ reinterpret_cast<uintptr_t>(isolate()->heap()->the_hole_value());
+ if ((hole_raw & ((1ul << 32) - 1)) == (left_raw & ((1ul << 32) - 1))) {
+ Code* c = GetCode();
+ Code::Kind kind = c->kind();
+ USE(kind);
+ int instruction_size = c->instruction_size();
+ byte* instructions = static_cast<byte*>(alloca(instruction_size));
+ for (int i = 0; i < instruction_size; i++) {
+ instructions[i] = c->instruction_start()[i];
+ }
+ isolate()->PushStackTraceAndDie(0xBAAAAAAD, pc(), fp(), 0u);
Igor Sheludko 2016/06/28 09:06:28 I have a fear that the instructions array could be
Michael Lippautz 2016/06/28 09:45:13 Done.
+ }
+#endif // V8_TARGET_ARCH_X64
+
// Compute the actual result using the builtin for the binary operation.
Handle<Object> result;
switch (state.op()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698