WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
199922
Add threading assertion to WeakPtr's operator->()
https://bugs.webkit.org/show_bug.cgi?id=199922
Summary
Add threading assertion to WeakPtr's operator->()
Chris Dumez
Reported
2019-07-18 16:07:36 PDT
Add threading assertion to WeakPtr's operator->().
Attachments
WIP Patch
(854 bytes, patch)
2019-07-18 16:08 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews104 for mac-highsierra-wk2
(2.64 MB, application/zip)
2019-07-18 17:26 PDT
,
EWS Watchlist
no flags
Details
Patch
(1.55 KB, patch)
2019-07-29 18:39 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(1.60 KB, patch)
2019-08-01 07:36 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(1.86 KB, patch)
2019-08-01 08:56 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2019-07-18 16:08:28 PDT
Created
attachment 374424
[details]
WIP Patch
EWS Watchlist
Comment 2
2019-07-18 16:10:34 PDT
Attachment 374424
[details]
did not pass style-queue: ERROR: Source/WTF/wtf/WeakPtr.h:75: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:77: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:83: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:85: Should have a space between // and comment [whitespace/comments] [4] Total errors found: 4 in 1 files If any of these errors are false positives, please file a bug against check-webkit-style.
EWS Watchlist
Comment 3
2019-07-18 17:26:54 PDT
Comment on
attachment 374424
[details]
WIP Patch
Attachment 374424
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
https://webkit-queues.webkit.org/results/12769328
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 4
2019-07-18 17:26:56 PDT
Created
attachment 374432
[details]
Archive of layout-test-results from ews104 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Chris Dumez
Comment 5
2019-07-29 18:39:23 PDT
Created
attachment 375135
[details]
Patch
EWS Watchlist
Comment 6
2019-07-29 18:40:37 PDT
Attachment 375135
[details]
did not pass style-queue: ERROR: Source/WTF/wtf/WeakPtr.h:75: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:77: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:83: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:85: Should have a space between // and comment [whitespace/comments] [4] Total errors found: 4 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Geoffrey Garen
Comment 7
2019-07-30 09:10:14 PDT
Comment on
attachment 375135
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=375135&action=review
> Source/WTF/wtf/WeakPtr.h:65 > + RELEASE_ASSERT(Thread::mayBeGCThread() || m_wasConstructedOnMainThread == isMainThread());
I think this needs to be a debug-only behavior. It's pretty expensive to turn every read from a pointer into a read from a thread-specific variable. We want WeakPtr to be "just as fast" as raw pointer, so we never have to have a performance vs security debate when we deploy WeakPtr.
Chris Dumez
Comment 8
2019-07-30 09:11:14 PDT
(In reply to Geoffrey Garen from
comment #7
)
> Comment on
attachment 375135
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=375135&action=review
> > > Source/WTF/wtf/WeakPtr.h:65 > > + RELEASE_ASSERT(Thread::mayBeGCThread() || m_wasConstructedOnMainThread == isMainThread()); > > I think this needs to be a debug-only behavior. It's pretty expensive to > turn every read from a pointer into a read from a thread-specific variable. > We want WeakPtr to be "just as fast" as raw pointer, so we never have to > have a performance vs security debate when we deploy WeakPtr.
Well, obviously :) This is merely using RELEASE_ASSERT() so that EWS can catch cases that trip this assertion. This patch is NOT up for review :)
Geoffrey Garen
Comment 9
2019-07-30 09:16:55 PDT
Oh, duh :P
Chris Dumez
Comment 10
2019-08-01 07:36:43 PDT
Created
attachment 375309
[details]
Patch
EWS Watchlist
Comment 11
2019-08-01 07:38:58 PDT
Attachment 375309
[details]
did not pass style-queue: ERROR: Source/WTF/wtf/WeakPtr.h:75: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:77: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:83: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:85: Should have a space between // and comment [whitespace/comments] [4] Total errors found: 4 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 12
2019-08-01 08:56:55 PDT
Created
attachment 375312
[details]
Patch
Chris Dumez
Comment 13
2019-08-01 09:53:30 PDT
Comment on
attachment 375312
[details]
Patch Patch is ready for review.
WebKit Commit Bot
Comment 14
2019-08-01 11:38:47 PDT
Comment on
attachment 375312
[details]
Patch Clearing flags on attachment: 375312 Committed
r248113
: <
https://trac.webkit.org/changeset/248113
>
WebKit Commit Bot
Comment 15
2019-08-01 11:38:49 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 16
2019-08-01 11:39:23 PDT
<
rdar://problem/53825085
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug