Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Version 5.3.332.1 (cherry-pick)
Browse files Browse the repository at this point in the history
Merged 5ff508a

Add crash instrumentation for crbug.com/621147

BUG=chromium:621147
LOG=N
TBR=machenbach@chromium.org

Review URL: https://codereview.chromium.org/2104033003 .

Cr-Commit-Position: refs/heads/5.3.332@{#2}
Cr-Branched-From: 37538cb-refs/heads/master@{#37308}
  • Loading branch information
ajklein committed Jun 28, 2016
1 parent 71bd2e3 commit 820a23a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 5
#define V8_MINOR_VERSION 3
#define V8_BUILD_NUMBER 332
#define V8_PATCH_LEVEL 0
#define V8_PATCH_LEVEL 1

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
21 changes: 21 additions & 0 deletions src/ic/ic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2535,6 +2535,27 @@ 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 & ((1ull << 32) - 1)) == (left_raw & ((1ull << 32) - 1))) {
Code* c = GetCode();
Code::Kind kind = c->kind();
int instruction_size = c->instruction_size() + 2 * sizeof(Address);
byte* instructions = static_cast<byte*>(alloca(instruction_size));
Address* start = reinterpret_cast<Address*>(instructions);
start[0] = fp();
start[1] = pc();
for (int i = 2 * sizeof(Address); i < instruction_size; i++) {
instructions[i] = c->instruction_start()[i];
}
isolate()->PushStackTraceAndDie(0xBAAAAAAD, instructions, fp(),
static_cast<unsigned int>(kind));
}
#endif // V8_TARGET_ARCH_X64

// Compute the actual result using the builtin for the binary operation.
Handle<Object> result;
switch (state.op()) {
Expand Down

0 comments on commit 820a23a

Please sign in to comment.