Bug 47313

Summary: Handle massive input strings to normalizeLineEndingsToCRLF() more gracefully
Product: WebKit Reporter: Chris Evans <cevans>
Component: WebCore Misc.Assignee: Chris Evans <cevans>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, levin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
levin: review-
Patch none

Description Chris Evans 2010-10-06 16:13:47 PDT
Looks like there are integer wrap issues here. The upcoming patch detects pathological conditions and returns the empty string. This mirrors the behaviour of e.g. WebCore::base64Encode().
Comment 1 Chris Evans 2010-10-06 16:17:06 PDT
Created attachment 70004 [details]
Patch
Comment 2 Adam Barth 2010-10-06 16:37:22 PDT
Comment on attachment 70004 [details]
Patch

No test?
Comment 3 David Levin 2010-10-06 16:40:59 PDT
Comment on attachment 70004 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=70004&action=review

Mr. Barth makes a good observation. Test?

> WebCore/ChangeLog:3
> +        Reviewed by Reviewed by NOBODY (OOPS!).

"Reviewed by Reviewed by"
Comment 4 Chris Evans 2010-10-06 16:46:03 PDT
@abarth: I don't think this can be tested without crashing on 32-bit (virtual address space too small). Even on 64-bit, the test would be at best very slow and at worse prone to exhausting physical memory.
Comment 5 Chris Evans 2010-10-06 16:46:49 PDT
Created attachment 70012 [details]
Patch
Comment 6 David Levin 2010-10-06 16:50:15 PDT
Comment on attachment 70012 [details]
Patch

Reasonable explanation about the test.
Comment 7 WebKit Commit Bot 2010-10-06 18:46:57 PDT
Comment on attachment 70012 [details]
Patch

Rejecting patch 70012 from commit-queue.

Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', 'build-and-test', '--no-clean', '--no-update', '--test', '--quiet', '--non-interactive']" exit_code: 2
Last 500 characters of output:
-dumprendertree
Compiling Java tests
make: Nothing to be done for `default'.
Running tests from /Projects/CommitQueue/LayoutTests
Testing 21468 test cases.
http/tests/xmlhttprequest/cross-origin-no-credential-prompt.html -> failed

Exiting early after 1 failures. 21325 tests run.
566.99s total testing time
WARNING:webkitpy.common.system:Called kill_process with a non-existant pid 90163

21324 test cases (99%) succeeded
1 test case (<1%) had incorrect layout
34 test cases (<1%) had stderr output

Full output: http://queues.webkit.org/results/4193122
Comment 8 Chris Evans 2010-10-06 20:43:01 PDT
Seems unrelated; retrying.
Comment 9 WebKit Commit Bot 2010-10-06 21:15:51 PDT
Comment on attachment 70012 [details]
Patch

Rejecting patch 70012 from commit-queue.

Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', 'build-and-test', '--no-clean', '--no-update', '--test', '--quiet', '--non-interactive']" exit_code: 2
Last 500 characters of output:
0.90 CPU)
Running build-dumprendertree
Compiling Java tests
make: Nothing to be done for `default'.
Running tests from /Projects/CommitQueue/LayoutTests
Testing 21469 test cases.
http/tests/xmlhttprequest/failed-auth.html -> failed

Exiting early after 1 failures. 21341 tests run.
565.75s total testing time
WARNING:webkitpy.common.system:Called kill_process with a non-existant pid 4291

21340 test cases (99%) succeeded
1 test case (<1%) had incorrect layout
34 test cases (<1%) had stderr output

Full output: http://queues.webkit.org/results/4237080
Comment 10 David Levin 2010-10-06 22:15:20 PDT
re cq+, cq-, cq+, cq-, cq+

See defn insanity.
Comment 11 Chris Evans 2010-10-06 22:21:12 PDT
Not sure I follow? I can stop if that's what you saying.
We're getting good data as to the current flake rate :)
Comment 12 David Levin 2010-10-06 22:23:55 PDT
(In reply to comment #11)
> Not sure I follow? I can stop if that's what you saying.
> We're getting good data as to the current flake rate :)

It was reference to http://www.quotationspage.com/quote/26032.html
Meant to be funny that's all.
Comment 13 WebKit Commit Bot 2010-10-06 22:42:22 PDT
Comment on attachment 70012 [details]
Patch

Clearing flags on attachment: 70012

Committed r69275: <http://trac.webkit.org/changeset/69275>
Comment 14 WebKit Commit Bot 2010-10-06 22:42:28 PDT
All reviewed patches have been landed.  Closing bug.
Comment 15 Chris Evans 2010-10-06 22:43:46 PDT
A victory for insanity! I never knew that was Einstein...