Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(10)

Issue 1159623012: Intensify security checks for WTF::Optional. (Closed)

Created:
4 years, 11 months ago by jbroman
Modified:
4 years, 11 months ago
Reviewers:
pdr., esprehn
CC:
blink-reviews, blink-reviews-wtf_chromium.org, Mikhail
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Intensify security checks for WTF::Optional. Use ASSERT_WITH_SECURITY_IMPLICATION for dereference checks, and store a pointer internally so that bugs manifest as null dereference in release, rather than use of uninitialized memory, similar to OwnPtr. BUG=492743 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196359

Patch Set 1 #

Patch Set 2 : store a pointer internally so failure mode is null dereference #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -16 lines) Patch
M Source/wtf/Optional.h View 1 1 chunk +13 lines, -16 lines 3 comments Download

Messages

Total messages: 18 (6 generated)
jbroman
Like similar checks elsewhere in WTF (e.g. Vector), esprehn correctly pointed out that these should ...
4 years, 11 months ago (2015-06-02 14:13:21 UTC) #2
jbroman
And this latest patchset changes access to use a pointer which is null until initialization, ...
4 years, 11 months ago (2015-06-02 14:30:14 UTC) #3
esprehn
lgtm w/ fix. https://codereview.chromium.org/1159623012/diff/20001/Source/wtf/Optional.h File Source/wtf/Optional.h (right): https://codereview.chromium.org/1159623012/diff/20001/Source/wtf/Optional.h#newcode43 Source/wtf/Optional.h:43: operator UnspecifiedBoolType() const { return m_ptr ...
4 years, 11 months ago (2015-06-02 22:13:08 UTC) #4
jbroman
https://codereview.chromium.org/1159623012/diff/20001/Source/wtf/Optional.h File Source/wtf/Optional.h (right): https://codereview.chromium.org/1159623012/diff/20001/Source/wtf/Optional.h#newcode43 Source/wtf/Optional.h:43: operator UnspecifiedBoolType() const { return m_ptr ? &Optional::m_ptr : ...
4 years, 11 months ago (2015-06-02 23:40:17 UTC) #5
esprehn
https://codereview.chromium.org/1159623012/diff/20001/Source/wtf/Optional.h File Source/wtf/Optional.h (right): https://codereview.chromium.org/1159623012/diff/20001/Source/wtf/Optional.h#newcode43 Source/wtf/Optional.h:43: operator UnspecifiedBoolType() const { return m_ptr ? &Optional::m_ptr : ...
4 years, 11 months ago (2015-06-02 23:57:08 UTC) #6
esprehn
Hmm I guess we already do this for WTF, that's kind of silly but okay. ...
4 years, 11 months ago (2015-06-02 23:59:40 UTC) #7
jbroman
On 2015/06/02 23:59:40, esprehn wrote: > Hmm I guess we already do this for WTF, ...
4 years, 11 months ago (2015-06-03 00:09:10 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1159623012/20001
4 years, 11 months ago (2015-06-03 00:10:04 UTC) #12
jbroman
Actually, still need someone with sufficient OWNERS powers. pdr?
4 years, 11 months ago (2015-06-03 00:11:06 UTC) #14
pdr.
LGTM
4 years, 11 months ago (2015-06-03 00:15:43 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1159623012/20001
4 years, 11 months ago (2015-06-03 00:17:06 UTC) #17
commit-bot: I haz the power
4 years, 11 months ago (2015-06-03 00:20:44 UTC) #18
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=196359

Powered by Google App Engine
This is Rietveld 408576698