Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUMM-2819 TLV Lenght Limit #1124

Merged
merged 6 commits into from
Jan 11, 2023
Merged

RUMM-2819 TLV Lenght Limit #1124

merged 6 commits into from
Jan 11, 2023

Conversation

maxep
Copy link
Member

@maxep maxep commented Jan 11, 2023

What and why?

Follow up of #1089

Inject object size limit to TLV to protect from 'Could not allocate memory` crash when a TLV gets corrupted.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes

Custom CI job configuration (optional)

  • Run unit tests
  • Run integration tests
  • Run smoke tests

@maxep maxep requested a review from a team as a code owner January 11, 2023 13:09
@maxep maxep self-assigned this Jan 11, 2023
@@ -79,14 +87,4 @@ class FileTests: XCTestCase {
XCTAssertEqual((error as NSError).localizedDescription, "The file “file” doesn’t exist.")
}
}

func testWhenIOExceptionHappens_itThrowsWhenReading() throws {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced by DataBlockTests.testDataBlockReader_whenIOErrorHappens_itThrowsWhenReading

XCTAssertEqual(dd.logger.errorLog?.error?.message, "data exceeds the maximum size of 23 bytes.")
XCTAssertEqual(dd.logger.errorLog?.error?.message, "bytesLengthExceedsLimit(limit: 23)")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will improve telemetry in RUMM-2817

Copy link
Member

@maciejburda maciejburda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 11, 2023

Datadog Report

Branch report: maxep/RUMM-2819/optimize-tlv-read
Commit report: 8e12a79

dd-sdk-ios 0 Failed, 0 New Flaky, 116 Passed, 0 Skipped, 4m 29.97s Wall Time

@maxep maxep merged commit 48fb8a9 into develop Jan 11, 2023
@maxep maxep deleted the maxep/RUMM-2819/optimize-tlv-read branch January 11, 2023 14:45
This was referenced Jan 18, 2023
@maxep maxep mentioned this pull request Jan 23, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants