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

Issue 1990803005: [runtime] set AsyncFunctionNext/Throw to adapt arguments (Closed)

Created:
4 years, 7 months ago by caitp (gmail)
Modified:
4 years, 2 months ago
Reviewers:
caitp, Dan Ehrenberg, adamk, Yang
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[runtime] set AsyncFunctionNext/Throw to adapt arguments Prevent crash/UB during stack frame iteration through functions, which occurs when debugging, when building stacktraces, etc. Also prevents these functions from appearing in stacktraces, by unsetting the "native" flag. BUG=v8:4483, v8:5025 R=yangguo@chromium.org, littledan@chromium.org, adamk@chromium.org Committed: https://crrev.com/f6865cb14220df1a6cc909eceb4f674978dd141f Cr-Commit-Position: refs/heads/master@{#36339}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Rework to support all functions without arguments adapter frames #

Total comments: 4

Patch Set 3 : cleanup #

Patch Set 4 : Also, don't expose AsyncFunctionNext/AsyncFunctionThrow in stack trace #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -4 lines) Patch
M src/bootstrapper.cc View 1 2 3 1 chunk +4 lines, -4 lines 3 comments Download
A test/mjsunit/harmony/async-debug-basic.js View 1 chunk +40 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (8 generated)
caitp (gmail)
Hey, this fixes the debugger; crash reported in v8:4483. PTAL.
4 years, 7 months ago (2016-05-18 14:24:42 UTC) #1
caitp (gmail)
https://codereview.chromium.org/1990803005/diff/1/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/1990803005/diff/1/src/bootstrapper.cc#newcode2474 src/bootstrapper.cc:2474: async_function_next->shared()->set_internal_formal_parameter_count(1); question: why do we not set internal_formal_parameter_count when ...
4 years, 7 months ago (2016-05-18 14:38:24 UTC) #3
caitp (gmail)
https://codereview.chromium.org/1990803005/diff/1/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/1990803005/diff/1/src/bootstrapper.cc#newcode2474 src/bootstrapper.cc:2474: async_function_next->shared()->set_internal_formal_parameter_count(1); On 2016/05/18 14:38:23, caitp wrote: > question: why ...
4 years, 7 months ago (2016-05-18 18:21:13 UTC) #4
Dan Ehrenberg
Nothing revolutionary is happening here, so I'd like to separate out a rework of frames ...
4 years, 7 months ago (2016-05-18 18:58:03 UTC) #6
caitp (gmail)
https://codereview.chromium.org/1990803005/diff/20001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/1990803005/diff/20001/src/bootstrapper.cc#newcode2469 src/bootstrapper.cc:2469: Builtins::kGeneratorPrototypeNext, 1, false); On 2016/05/18 18:58:02, Dan Ehrenberg wrote: ...
4 years, 7 months ago (2016-05-18 19:03:43 UTC) #7
caitp (gmail)
On 2016/05/18 19:03:43, caitp wrote: > https://codereview.chromium.org/1990803005/diff/20001/src/bootstrapper.cc > File src/bootstrapper.cc (right): > > https://codereview.chromium.org/1990803005/diff/20001/src/bootstrapper.cc#newcode2469 > ...
4 years, 7 months ago (2016-05-18 19:04:30 UTC) #8
Dan Ehrenberg
lgtm
4 years, 7 months ago (2016-05-18 19:59:48 UTC) #11
Dan Ehrenberg
On 2016/05/18 at 19:59:48, Dan Ehrenberg wrote: > lgtm I'm not sure what implications set_native(false) ...
4 years, 7 months ago (2016-05-18 20:00:29 UTC) #12
caitp (gmail)
On 2016/05/18 20:00:29, Dan Ehrenberg wrote: > On 2016/05/18 at 19:59:48, Dan Ehrenberg wrote: > ...
4 years, 7 months ago (2016-05-18 20:02:12 UTC) #13
caitp (gmail)
On 2016/05/18 20:02:12, caitp wrote: > On 2016/05/18 20:00:29, Dan Ehrenberg wrote: > > On ...
4 years, 7 months ago (2016-05-18 20:11:29 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1990803005/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1990803005/60001
4 years, 7 months ago (2016-05-18 20:14:57 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 7 months ago (2016-05-18 20:53:05 UTC) #18
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/f6865cb14220df1a6cc909eceb4f674978dd141f Cr-Commit-Position: refs/heads/master@{#36339}
4 years, 7 months ago (2016-05-18 20:53:50 UTC) #20
adamk
Sorry for the long-past-closed question, but I happened to see this code today. https://codereview.chromium.org/1990803005/diff/60001/src/bootstrapper.cc File ...
4 years, 2 months ago (2016-09-27 23:57:11 UTC) #21
caitp
https://codereview.chromium.org/1990803005/diff/60001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/1990803005/diff/60001/src/bootstrapper.cc#newcode2473 src/bootstrapper.cc:2473: async_function_next->shared()->set_native(false); On 2016/09/27 23:57:11, adamk wrote: > I found ...
4 years, 2 months ago (2016-09-28 00:01:18 UTC) #23
caitp
On 2016/09/28 00:01:18, caitp wrote: > https://codereview.chromium.org/1990803005/diff/60001/src/bootstrapper.cc > File src/bootstrapper.cc (right): > > https://codereview.chromium.org/1990803005/diff/60001/src/bootstrapper.cc#newcode2473 > ...
4 years, 2 months ago (2016-09-28 00:03:01 UTC) #24
adamk
https://codereview.chromium.org/1990803005/diff/60001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/1990803005/diff/60001/src/bootstrapper.cc#newcode2473 src/bootstrapper.cc:2473: async_function_next->shared()->set_native(false); On 2016/09/28 00:01:18, caitp wrote: > On 2016/09/27 ...
4 years, 2 months ago (2016-09-28 00:03:15 UTC) #25
caitp
4 years, 2 months ago (2016-09-28 00:07:52 UTC) #26
Message was sent while issue was closed.
On 2016/09/28 00:03:15, adamk wrote:
> https://codereview.chromium.org/1990803005/diff/60001/src/bootstrapper.cc
> File src/bootstrapper.cc (right):
> 
>
https://codereview.chromium.org/1990803005/diff/60001/src/bootstrapper.cc#new...
> src/bootstrapper.cc:2473: async_function_next->shared()->set_native(false);
> On 2016/09/28 00:01:18, caitp wrote:
> > On 2016/09/27 23:57:11, adamk wrote:
> > > I found it surprising that this was done to _keep_ the function from
> appearing
> > > in stack traces. Can you explain how that works?
> > 
> > See IsNotInNativeScript() and IsVisibleInStackTrace() in isolate.cc
> 
> Ah, so "native" means "native but exposed to author script". Fascinating...

apparently not. its probably a coincidence that set_native(false) appeared to do
what was intended

Powered by Google App Engine
This is Rietveld 408576698