New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 717551 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

Cronet iOS: unbounded buffer in HttpProtocolHandlerCore::OnReadCompleted can cause OOM error

Project Member Reported by kapishnikov@chromium.org, May 2 2017

Issue description

NSMutableData 'data' variable allocated in HttpProtocolHandlerCore::OnReadCompleted grows indefinitely until there is no more data to read from the underlying URLRequest. During local test runs, the allocated memory for the buffer exceeded 1GB. We need to put a cap on it. The iOS system stack limits it approximately to 160KB.
 
Components: Internals>Network>Library
Status: Started (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, May 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/922dd693b59ee99082ab9bab9daab3822d03047a

commit 922dd693b59ee99082ab9bab9daab3822d03047a
Author: kapishnikov <kapishnikov@chromium.org>
Date: Fri May 12 15:51:35 2017

iOS Cronet: Put cap on the buffer size passed to onReadCompleted delegate

The change also allows the client to start handling the received data sooner.

BUG= 717551 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester

Review-Url: https://codereview.chromium.org/2857733002
Cr-Commit-Position: refs/heads/master@{#471319}

[modify] https://crrev.com/922dd693b59ee99082ab9bab9daab3822d03047a/components/cronet/ios/test/cronet_http_test.mm
[modify] https://crrev.com/922dd693b59ee99082ab9bab9daab3822d03047a/ios/net/crn_http_protocol_handler.mm

Status: Fixed (was: Started)

Sign in to add a comment