WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
156956
Fix issues found by the clang static analyzer
https://bugs.webkit.org/show_bug.cgi?id=156956
Summary
Fix issues found by the clang static analyzer
Andy Estes
Reported
2016-04-23 17:39:24 PDT
Fix issues found by the clang static analyzer
Attachments
Patch
(25.55 KB, patch)
2016-04-23 18:01 PDT
,
Andy Estes
ap
: review+
Details
Formatted Diff
Diff
patch for landing
(27.72 KB, patch)
2016-04-23 18:43 PDT
,
Andy Estes
aestes
: commit-queue-
Details
Formatted Diff
Diff
patch for landing
(25.44 KB, patch)
2016-04-23 18:47 PDT
,
Andy Estes
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Andy Estes
Comment 1
2016-04-23 18:01:30 PDT
Created
attachment 277172
[details]
Patch
WebKit Commit Bot
Comment 2
2016-04-23 18:04:04 PDT
Attachment 277172
[details]
did not pass style-queue: ERROR: Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm:463: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm:463: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 2 in 19 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alexey Proskuryakov
Comment 3
2016-04-23 18:27:41 PDT
Comment on
attachment 277172
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=277172&action=review
Fun.
> Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm:466 > - (NSURLResponse *)response > { > - return _response.get(); > + @synchronized (self) { > + return _response.get(); > + } > }
I don't understand what good this is. The member variable should be aligned, so reading it is always atomic, no synchronization needed.
> Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm:509 > +- (void)dealloc > +{ > + [_originalRequest release]; > + [_currentRequest release]; > + [_error release]; > + [_taskDescription release]; > + [super dealloc]; > +}
I know that Alex ran NSURLSession code through leaks, surprised that this wasn't found.
Andy Estes
Comment 4
2016-04-23 18:34:16 PDT
(In reply to
comment #2
)
>
Attachment 277172
[details]
did not pass style-queue: > > > ERROR: Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm:463: > Place brace on its own line for function definitions. [whitespace/braces] > [4] > ERROR: Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm:463: > Extra space before ( in function call [whitespace/parens] [4] > Total errors found: 2 in 19 files > > > If any of these errors are false positives, please file a bug against > check-webkit-style.
Filed
https://bugs.webkit.org/show_bug.cgi?id=156957
Andy Estes
Comment 5
2016-04-23 18:36:20 PDT
(In reply to
comment #3
)
> Comment on
attachment 277172
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=277172&action=review
> > Fun. > > > Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm:466 > > - (NSURLResponse *)response > > { > > - return _response.get(); > > + @synchronized (self) { > > + return _response.get(); > > + } > > } > > I don't understand what good this is. The member variable should be aligned, > so reading it is always atomic, no synchronization needed.
Perhaps you're right. I didn't think too much about this. I'll remove it.
> > > Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm:509 > > +- (void)dealloc > > +{ > > + [_originalRequest release]; > > + [_currentRequest release]; > > + [_error release]; > > + [_taskDescription release]; > > + [super dealloc]; > > +} > > I know that Alex ran NSURLSession code through leaks, surprised that this > wasn't found.
I think this is code added by Jer for AVFoundation loading, perhaps written after Alex did his check. Thanks for the review!
Andy Estes
Comment 6
2016-04-23 18:43:57 PDT
Created
attachment 277174
[details]
patch for landing
Andy Estes
Comment 7
2016-04-23 18:47:17 PDT
Created
attachment 277175
[details]
patch for landing
WebKit Commit Bot
Comment 8
2016-04-23 19:49:27 PDT
Comment on
attachment 277175
[details]
patch for landing Clearing flags on attachment: 277175 Committed
r199960
: <
http://trac.webkit.org/changeset/199960
>
Joseph Pecoraro
Comment 9
2017-06-16 19:13:51 PDT
Nice changes! Closing this bug as it landed a while ago.
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