Bug 216709 - console APIs shouldn't crash making a string that's too long for a console warning when using user provided labels
Summary: console APIs shouldn't crash making a string that's too long for a console wa...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-18 11:22 PDT by Saam Barati
Modified: 2021-04-16 15:19 PDT (History)
10 users (show)

See Also:


Attachments
patch (7.86 KB, patch)
2020-09-18 11:40 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
patch (8.60 KB, patch)
2020-09-18 12:04 PDT, Saam Barati
mark.lam: review+
Details | Formatted Diff | Diff
patch for landing (14.73 KB, patch)
2020-09-18 16:14 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2020-09-18 11:22:55 PDT
...
Comment 1 Saam Barati 2020-09-18 11:23:29 PDT
<rdar://problem/68275357>
Comment 2 Saam Barati 2020-09-18 11:40:40 PDT
Created attachment 409154 [details]
patch
Comment 3 Saam Barati 2020-09-18 11:41:02 PDT
Comment on attachment 409154 [details]
patch

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

> LayoutTests/inspector/console/console-count-reset-oom.html:14
> +            console.countReset('a'.repeat(2**31-1));

gonna try to write tests for all the places I changed.
Comment 4 Saam Barati 2020-09-18 12:04:44 PDT
Created attachment 409158 [details]
patch
Comment 5 Mark Lam 2020-09-18 12:28:08 PDT
Comment on attachment 409158 [details]
patch

r=me
Comment 6 Devin Rousso 2020-09-18 13:57:47 PDT
Comment on attachment 409158 [details]
patch

r=me as well :)

FYI this also could happen in
 - `JSGlobalObjectConsoleClient::profile`
 - `JSGlobalObjectConsoleClient::profileEnd`
 - `JSGlobalObjectInspectorController::reportAPIException`
 - `InspectorTimelineAgent::startFromConsole`
 - `InspectorTimelineAgent::stopFromConsole`
 - `WebConsoleAgent::didReceiveResponse`
 - `WebConsoleAgent::didFailLoading`
Comment 7 Saam Barati 2020-09-18 16:14:19 PDT
Created attachment 409176 [details]
patch for landing
Comment 8 EWS 2020-09-18 17:27:11 PDT
Committed r267301: <https://trac.webkit.org/changeset/267301>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 409176 [details].