DataDog / dd-trace-php

Datadog PHP Clients
https://docs.datadoghq.com/tracing/setup/php
Other
487 stars 152 forks source link

Crashtracker: fix a use-after-free error #2843

Closed iamluc closed 3 weeks ago

iamluc commented 3 weeks ago

Description

Reviewer checklist

codecov-commenter commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.49%. Comparing base (98839cf) to head (72358cc).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2843/graphs/tree.svg?width=650&height=150&src=pr&token=eXio8H7vwF&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog)](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2843?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) ```diff @@ Coverage Diff @@ ## master #2843 +/- ## ============================================ - Coverage 81.06% 78.49% -2.58% Complexity 2516 2516 ============================================ Files 146 173 +27 Lines 14653 18682 +4029 Branches 0 975 +975 ============================================ + Hits 11879 14664 +2785 - Misses 2774 3481 +707 - Partials 0 537 +537 ``` | [Flag](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2843/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [appsec-extension](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2843/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `69.12% <ø> (?)` | | | [tracer-extension](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2843/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `78.18% <ø> (ø)` | | | [tracer-php](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2843/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `82.27% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#carryforward-flags-in-the-pull-request-comment) to find out more. [see 27 files with indirect coverage changes](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2843/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2843?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2843?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog). Last update [98839cf...72358cc](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2843?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog).
pr-commenter[bot] commented 3 weeks ago

Benchmarks

Benchmark execution time: 2024-09-10 16:36:55

Comparing candidate commit 72358ccbb69ee53d4a97d9d0a972cdf570d077a0 in PR branch luc/crashtracker-fix-use-after-free with baseline commit 98839cf637cac6374236c4d40dc70bede9551472 in branch master.

Found 6 performance improvements and 1 performance regressions! Performance is the same for 171 metrics, 0 unstable metrics.

scenario:EmptyFileBench/benchEmptyFileBaseline-opcache

scenario:LaravelBench/benchLaravelOverhead-opcache

scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache

scenario:PDOBench/benchPDOBaseline-opcache

scenario:PDOBench/benchPDOOverhead-opcache

scenario:PDOBench/benchPDOOverheadWithDBM-opcache

scenario:WordPressBench/benchWordPressOverhead

iamluc commented 3 weeks ago

Do you want to also toggle the default of the LOG_BACKTRACES setting if compiled with asan (via preprocessor directive)?

I find it easier to disable the entire signal handling. WDYT?

bwoebi commented 3 weeks ago

@iamluc Yeah, but then you can't run crashtracker tests with asan either and you'll have to disable tests via skipif too. I'd rather just add a define in configuration.h around the default value.