Bug 47313 - Handle massive input strings to normalizeLineEndingsToCRLF() more gracefully
Summary: Handle massive input strings to normalizeLineEndingsToCRLF() more gracefully
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Chris Evans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-06 16:13 PDT by Chris Evans
Modified: 2010-10-06 22:43 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.72 KB, patch)
2010-10-06 16:17 PDT, Chris Evans
levin: review-
Details | Formatted Diff | Diff
Patch (1.71 KB, patch)
2010-10-06 16:46 PDT, Chris Evans
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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...