Found by Coverity scan: 1. webkitgtk-2.20.3/Source/WTF/wtf/text/WTFString.cpp:454: va_init: Initializing va_list "argsCopy". 3. webkitgtk-2.20.3/Source/WTF/wtf/text/WTFString.cpp:480: missing_va_end: va_end was not called for "argsCopy". # 478| # 479| if (result == 0) # 480|-> return emptyString(); # 481| if (result < 0) # 482| return String();
Created attachment 342925 [details] Patch
Attachment 342925 [details] did not pass style-queue: ERROR: Source/WTF/wtf/text/WTFString.cpp:480: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 342925 [details] Patch Attachment 342925 [details] did not pass win-ews (win): Output: http://webkit-queues.webkit.org/results/8236949 New failing tests: http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html
Created attachment 342984 [details] Archive of layout-test-results from ews200 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews200 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Weird. va_start and va_end are invoked in String::format. https://trac.webkit.org/browser/webkit/trunk/Source/WTF/wtf/text/WTFString.cpp?rev=233122#L507 https://trac.webkit.org/browser/webkit/trunk/Source/WTF/wtf/text/WTFString.cpp?rev=233122#L509 Why does createWithFormatAndArguments invoke va_end(args)? https://trac.webkit.org/browser/webkit/trunk/Source/WTF/wtf/text/WTFString.cpp?rev=233122#L465 https://trac.webkit.org/browser/webkit/trunk/Source/WTF/wtf/text/WTFString.cpp?rev=233122#L477 How do you think?
Comment on attachment 342925 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=342925&action=review > Source/WTF/wtf/text/WTFString.cpp:466 > va_end(args); > + va_end(argsCopy); Good catch, Fujii. Surely this function should call va_end(argsCopy), as Coverity suggests, but it should NOT call va_end(args). > Source/WTF/wtf/text/WTFString.cpp:478 > va_end(args); This should be removed, as well.
(In reply to Fujii Hironori from comment #5) > Why does createWithFormatAndArguments invoke va_end(args)? Good catch Fujii! Also String::formatWithArguments() is not used at all. I will open a bug for removing it.
Created attachment 345657 [details] Patch
Comment on attachment 345657 [details] Patch Attachment 345657 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/8639639 New failing tests: http/tests/security/canvas-remote-read-remote-video-localhost.html
Created attachment 345695 [details] Archive of layout-test-results from ews200 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews200 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment on attachment 345657 [details] Patch Clearing flags on attachment: 345657 Committed r234192: <https://trac.webkit.org/changeset/234192>
All reviewed patches have been landed. Closing bug.
<rdar://problem/42572181>