dd-trace-php icon indicating copy to clipboard operation
dd-trace-php copied to clipboard

Fix post bailout hook execution in 8.3 unoptimized builds

Open bwoebi opened this issue 1 year ago • 2 comments
trafficstars

When optimized, all is fine; however, in unoptimized builds the compiler will write stacktarget back to the stack and read it later from there, even though the stack address has moved. (i.e. only affects development builds.)

Adding register keyword to avoid this.

Description

Reviewer checklist

  • [ ] Test coverage seems ok.
  • [ ] Appropriate labels assigned.

bwoebi avatar Jun 28 '24 11:06 bwoebi

Codecov Report

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

Project coverage is 77.95%. Comparing base (44a07ba) to head (21dd318).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2737      +/-   ##
============================================
- Coverage     79.24%   77.95%   -1.29%     
  Complexity     2216     2216              
============================================
  Files           201      227      +26     
  Lines         22595    26613    +4018     
  Branches          0      988     +988     
============================================
+ Hits          17905    20747    +2842     
- Misses         4690     5340     +650     
- Partials          0      526     +526     
Flag Coverage Δ
appsec-extension 69.13% <ø> (?)
tracer-extension 78.82% <100.00%> (+<0.01%) :arrow_up:
tracer-php 80.54% <ø> (+0.69%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
..._abstract_interface/interceptor/php8/interceptor.c 77.42% <100.00%> (+0.05%) :arrow_up:

... and 32 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 44a07ba...21dd318. Read the comment docs.

codecov-commenter avatar Jun 28 '24 11:06 codecov-commenter

Benchmarks

Benchmark execution time: 2024-06-28 11:52:07

Comparing candidate commit 21dd318dc0ed5a23f0b30d49de7a7276adced48d in PR branch bob/fix-83-posthook with baseline commit 44a07ba98de2062986a33cc1592a2b87533441a0 in branch master.

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

scenario:ComposerTelemetryBench/benchTelemetryParsing-opcache

  • 🟥 execution_time [+1.845µs; +4.355µs] or [+3.455%; +8.155%]

scenario:EmptyFileBench/benchEmptyFileBaseline

  • 🟥 execution_time [+73.634µs; +172.486µs] or [+3.119%; +7.306%]

scenario:EmptyFileBench/benchEmptyFileOverhead

  • 🟥 execution_time [+56.849µs; +152.651µs] or [+2.207%; +5.926%]

scenario:LaravelBench/benchLaravelBaseline

  • 🟥 execution_time [+73.931µs; +211.029µs] or [+2.974%; +8.490%]

pr-commenter[bot] avatar Jun 28 '24 11:06 pr-commenter[bot]