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

Issue 2004423007: SourceLocation: Fix use-after-move. (Closed)

Created:
4 years, 7 months ago by kinaba
Modified:
4 years, 7 months ago
CC:
chromium-reviews, blink-reviews, blink-reviews-bindings_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

SourceLocation: Fix use-after-move. Depending on the arguments evaluation order, the previous code may access std::move'ed object. It is triggering crashes in many pages including google.com on Chrome OS (built by gcc). BUG=614900 TEST=Manually verified new tab page doesn't crash (which previously did.) Committed: https://crrev.com/9a1916358318e35f8045864784dc757bfb617eee Cr-Commit-Position: refs/heads/master@{#396154}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Reflect review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -4 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/SourceLocation.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp View 1 4 chunks +14 lines, -4 lines 0 comments Download

Messages

Total messages: 27 (8 generated)
kinaba
Meant to be a P0-bug fixer. bashi-san, could you take a look as a third_party/WebKit/Source/bindings ...
4 years, 7 months ago (2016-05-26 06:26:57 UTC) #3
Yuki
Thanks for finding out the issue. https://codereview.chromium.org/2004423007/diff/1/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp File third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp (right): https://codereview.chromium.org/2004423007/diff/1/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp#newcode45 third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp:45: const V8StackTrace* stackTracePtr ...
4 years, 7 months ago (2016-05-26 06:55:50 UTC) #5
Yuki
https://codereview.chromium.org/2004423007/diff/1/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp File third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp (right): https://codereview.chromium.org/2004423007/diff/1/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp#newcode96 third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp:96: return adoptPtr(new SourceLocation(stackTrace->topSourceURL(), stackTrace->topLineNumber(), stackTrace->topColumnNumber(), std::move(stackTrace), 0)); This line ...
4 years, 7 months ago (2016-05-26 07:05:36 UTC) #6
kinaba
Thanks! How about this one? https://codereview.chromium.org/2004423007/diff/1/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp File third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp (right): https://codereview.chromium.org/2004423007/diff/1/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp#newcode45 third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp:45: const V8StackTrace* stackTracePtr = ...
4 years, 7 months ago (2016-05-26 07:14:19 UTC) #7
Yuki
Thanks for fixing the issue. LGTM.
4 years, 7 months ago (2016-05-26 07:17:43 UTC) #8
kinaba
On 2016/05/26 07:17:43, Yuki wrote: > Thanks for fixing the issue. LGTM. Thanks for you ...
4 years, 7 months ago (2016-05-26 07:23:38 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2004423007/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2004423007/20001
4 years, 7 months ago (2016-05-26 07:24:20 UTC) #11
haraken
LGTM
4 years, 7 months ago (2016-05-26 07:35:02 UTC) #12
bashi
lgtm
4 years, 7 months ago (2016-05-26 07:36:33 UTC) #13
haraken
+yutak FYI We need to be careful about this pattern. (In essence, OwnPtr.release() should have ...
4 years, 7 months ago (2016-05-26 07:36:50 UTC) #15
kinaba
Thank you all!! On 2016/05/26 07:36:50, haraken wrote: > +yutak FYI > > We need ...
4 years, 7 months ago (2016-05-26 07:40:10 UTC) #16
Yuta Kitamura
+thakis On 2016/05/26 07:40:10, kinaba wrote: > It may be a good idea to have ...
4 years, 7 months ago (2016-05-26 08:11:50 UTC) #18
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-26 10:29:25 UTC) #20
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/9a1916358318e35f8045864784dc757bfb617eee Cr-Commit-Position: refs/heads/master@{#396154}
4 years, 7 months ago (2016-05-26 10:30:34 UTC) #22
dgozman
Sorry for breakage. Thanks for the fix! I'm surprised this fails though, as I was ...
4 years, 7 months ago (2016-05-26 14:12:18 UTC) #23
Nico
A compiler warning for this is https://bugs.chromium.org/p/chromium/issues/detail?id=409318#c16 -- there's even a prototype patch there On ...
4 years, 7 months ago (2016-05-26 14:20:14 UTC) #24
kinaba
On 2016/05/26 14:12:18, dgozman wrote: > Sorry for breakage. Thanks for the fix! > > ...
4 years, 7 months ago (2016-05-26 14:21:58 UTC) #25
Yuki
On 2016/05/26 14:12:18, dgozman wrote: > Sorry for breakage. Thanks for the fix! > > ...
4 years, 7 months ago (2016-05-26 14:23:02 UTC) #26
Nico
4 years, 7 months ago (2016-05-26 14:48:05 UTC) #27
Message was sent while issue was closed.
(fwiw it looks like the clang/win bots also caught this,
https://bugs.chromium.org/p/chromium/issues/detail?id=614745 But the clang/win
bot on the CQ doesn't run tests, and we didn't get around to analyzing this
yesterday, sorry.)

Powered by Google App Engine
This is Rietveld 408576698