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

Issue 1564923007: Fix sloppy block-scoped function hoisting with nested zones (Closed)

Created:
4 years, 11 months ago by Dan Ehrenberg
Modified:
4 years, 11 months ago
Reviewers:
adamk
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

Fix sloppy block-scoped function hoisting with nested zones The sloppy block-scoped function declaration placeholder statements are held in parser_zone_-allocated hashtables. These hashtables are not updated when local_zone_s are removed. Therefore, the NewSloppyBlockFunctionStatement method should allocate SloppyBlockScopeFunctionStatements in the parser_zone_ to avoid a use-after-free. Scope fixup code may end up updating something which is thrown away, but this is a small cost and much simpler than removing dead hashtable entries later. R=adamk LOG=Y BUG=chromium:537816 Committed: https://crrev.com/eb9deba81545e294e83c6c96ce84d74b4fc9ae52 Cr-Commit-Position: refs/heads/master@{#33185}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix other part of allocation #

Patch Set 3 : Add a cctest, which crashed with asan on and now passes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -4 lines) Patch
M src/ast/ast.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (5 generated)
Dan Ehrenberg
4 years, 11 months ago (2016-01-07 23:13:15 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1564923007/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1564923007/1
4 years, 11 months ago (2016-01-07 23:13:19 UTC) #3
adamk
https://codereview.chromium.org/1564923007/diff/1/src/ast/ast.h File src/ast/ast.h (right): https://codereview.chromium.org/1564923007/diff/1/src/ast/ast.h#newcode3458 src/ast/ast.h:3458: return new (local_zone_) Don't you need to allocate the ...
4 years, 11 months ago (2016-01-07 23:14:31 UTC) #4
Dan Ehrenberg
https://codereview.chromium.org/1564923007/diff/1/src/ast/ast.h File src/ast/ast.h (right): https://codereview.chromium.org/1564923007/diff/1/src/ast/ast.h#newcode3458 src/ast/ast.h:3458: return new (local_zone_) On 2016/01/07 at 23:14:31, adamk wrote: ...
4 years, 11 months ago (2016-01-07 23:18:21 UTC) #5
Dan Ehrenberg
The new version has a test. PTAL.
4 years, 11 months ago (2016-01-08 02:51:45 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1564923007/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1564923007/40001
4 years, 11 months ago (2016-01-08 02:51:59 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-08 03:44:43 UTC) #10
adamk
lgtm
4 years, 11 months ago (2016-01-08 16:04:14 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1564923007/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1564923007/40001
4 years, 11 months ago (2016-01-08 16:04:26 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 11 months ago (2016-01-08 16:16:00 UTC) #14
commit-bot: I haz the power
4 years, 11 months ago (2016-01-08 16:16:51 UTC) #16
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/eb9deba81545e294e83c6c96ce84d74b4fc9ae52
Cr-Commit-Position: refs/heads/master@{#33185}

Powered by Google App Engine
This is Rietveld 408576698