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

Issue 2284673002: Fix LookupCode for the DatePrototype_GetField builtin (Closed)

Created:
4 years, 3 months ago by jgruber
Modified:
4 years, 3 months ago
CC:
v8-reviews_googlegroups.com, v8-mips-ports_googlegroups.com, v8-x87-ports_googlegroups.com, v8-ppc-ports_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Fix LookupCode for the DatePrototype_GetField builtin This was exposed on win64 and manifested as a negative offset during stack frame collection, i.e. pc < Code::instruction_start() for a BUILTIN frame. This happened because StackFrame::LookupCode returns the wrong code object when call is the last instruction in a code object: * pc is actually the return address for all but the topmost frame. * pc points at the next instruction after the call. * This is beyond the current code object if call is the last instruction. * Lookup itself is naive in that it just returns the first code object for which (next_code_obj_addr > pc). It does not check that pc is actually within [instruction_start, instruction_end[. * In this specific case, the pc (== return address) actually pointed at the beginning of the header of the next code object. * We finally calculated offset as (code->instruction_start() - pc), but with the wrong code object. This should be followed up by a proper fix at some point. For instance, this could be setting pc to (return address - 1) for all but the topmost frame. BUG=v8:5311 Committed: https://crrev.com/4f781d72491ce092bd7cb34bc677eeed3e63eda3 Cr-Commit-Position: refs/heads/master@{#38996}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -0 lines) Patch
M src/builtins/arm/builtins-arm.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M src/builtins/arm64/builtins-arm64.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M src/builtins/ia32/builtins-ia32.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M src/builtins/mips/builtins-mips.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M src/builtins/mips64/builtins-mips64.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M src/builtins/ppc/builtins-ppc.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M src/builtins/s390/builtins-s390.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M src/builtins/x64/builtins-x64.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M src/builtins/x87/builtins-x87.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M src/frames-inl.h View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (8 generated)
jgruber
4 years, 3 months ago (2016-08-26 14:10:13 UTC) #4
jgruber
4 years, 3 months ago (2016-08-30 07:55:16 UTC) #8
Benedikt Meurer
lgtm
4 years, 3 months ago (2016-08-30 08:02:05 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2284673002/1
4 years, 3 months ago (2016-08-30 08:04:10 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 3 months ago (2016-08-30 08:27:56 UTC) #12
commit-bot: I haz the power
4 years, 3 months ago (2016-08-30 08:28:25 UTC) #14
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/4f781d72491ce092bd7cb34bc677eeed3e63eda3
Cr-Commit-Position: refs/heads/master@{#38996}

Powered by Google App Engine
This is Rietveld 408576698