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

fix(iast): fix leak on slice aspect. Add cleanup code to the trycatch macro #10457

Merged
merged 5 commits into from
Aug 30, 2024

Conversation

juanjux
Copy link
Collaborator

@juanjux juanjux commented Aug 30, 2024

Description

  • Fix a memory leak on slice_aspect.
  • Add a parameter to the TRY_CATCH_ASPECT macro to optionally add cleanup code to the exception handlers.

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

@juanjux juanjux added the ASM Application Security Monitoring label Aug 30, 2024
@juanjux juanjux self-assigned this Aug 30, 2024
@juanjux juanjux requested review from a team as code owners August 30, 2024 11:04
Copy link
Contributor

CODEOWNERS have been resolved as:

releasenotes/notes/slice-aspect-leak-95e264c4f1aa851c.yaml              @DataDog/apm-python
ddtrace/appsec/_iast/_taint_tracking/Aspects/AspectIndex.cpp            @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/Aspects/AspectModulo.cpp           @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/Aspects/AspectOperatorAdd.cpp      @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/Aspects/AspectSlice.cpp            @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/Aspects/AspectsOsPath.cpp          @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/Aspects/Helpers.h                  @DataDog/asm-python

@juanjux juanjux changed the title fix(iast): fix leak on slice aspect. Add cleanup code to the trycatch macro. fix(iast): fix leak on slice aspect. Add cleanup code to the trycatch macro Aug 30, 2024
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Aug 30, 2024

Datadog Report

Branch report: juanjux/august-leak-hunt
Commit report: 8d548d9
Test service: dd-trace-py

✅ 0 Failed, 112898 Passed, 3999 Skipped, 56m 55.97s Total Time

@pr-commenter
Copy link

pr-commenter bot commented Aug 30, 2024

Benchmarks

Benchmark execution time: 2024-08-30 12:49:33

Comparing candidate commit 8d548d9 in PR branch juanjux/august-leak-hunt with baseline commit 5b394f1 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 353 metrics, 47 unstable metrics.

@juanjux juanjux enabled auto-merge (squash) August 30, 2024 12:13
@juanjux juanjux merged commit b75448f into main Aug 30, 2024
197 of 199 checks passed
@juanjux juanjux deleted the juanjux/august-leak-hunt branch August 30, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASM Application Security Monitoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants