WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
175055
ResourceLoadStatisticsClassifierCocoa::singletonPredictionModel() should check the return value of storagePath() before attempting to load
https://bugs.webkit.org/show_bug.cgi?id=175055
Summary
ResourceLoadStatisticsClassifierCocoa::singletonPredictionModel() should chec...
John Wilander
Reported
2017-08-01 15:49:43 PDT
ResourceLoadStatisticsClassifierCocoa::singletonPredictionModel() should check the return value of storagePath() before attempting to load the model file.
Attachments
Patch
(2.22 KB, patch)
2017-08-01 15:56 PDT
,
John Wilander
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews117 for mac-elcapitan
(2.00 MB, application/zip)
2017-08-02 08:57 PDT
,
Build Bot
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
John Wilander
Comment 1
2017-08-01 15:50:27 PDT
rdar://problem/32671352
John Wilander
Comment 2
2017-08-01 15:56:23 PDT
Created
attachment 316906
[details]
Patch
Build Bot
Comment 3
2017-08-02 08:57:53 PDT
Comment on
attachment 316906
[details]
Patch
Attachment 316906
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/4240177
New failing tests: fast/dom/Window/HTMLBodyElement-window-eventListener-attributes.html
Build Bot
Comment 4
2017-08-02 08:57:55 PDT
Created
attachment 316963
[details]
Archive of layout-test-results from ews117 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-elcapitan Platform: Mac OS X 10.11.6
David Kilzer (:ddkilzer)
Comment 5
2017-08-02 09:50:10 PDT
Comment on
attachment 316906
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=316906&action=review
r=me since this resolves a thread-safety issue when creating corePredictionModel (since thread-safe C++ statics are disabled in WebKit), but I'm not sure it will resolve all potential causes of this crash. Need to check if the CorePrediction API being used is also thread-safe when using the same model on more than one thread at the same time.
> Source/WebKit/Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp:111 > + if (path.isEmpty()) > + return;
You should add some WTFLogAlways() logging output here, too, if it's unexpected that this path will ever be empty.
David Kilzer (:ddkilzer)
Comment 6
2017-08-02 09:58:31 PDT
Comment on
attachment 316906
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=316906&action=review
>> Source/WebKit/Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp:111 >> + return; > > You should add some WTFLogAlways() logging output here, too, if it's unexpected that this path will ever be empty.
Oops, John correctly pointed out this will get logged below on Line 119 if it fails, so no need to make a change here.
John Wilander
Comment 7
2017-08-02 10:16:52 PDT
Comment on
attachment 316906
[details]
Patch Failed layout test looks unrelated. Successfully ran it 50 times (with guard malloc). Thanks for the review, Dave!
WebKit Commit Bot
Comment 8
2017-08-02 10:45:56 PDT
Comment on
attachment 316906
[details]
Patch Clearing flags on attachment: 316906 Committed
r220136
: <
http://trac.webkit.org/changeset/220136
>
WebKit Commit Bot
Comment 9
2017-08-02 10:45:57 PDT
All reviewed patches have been landed. Closing bug.
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