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 JIT crash with instrumented generators #2797

Merged
merged 1 commit into from
Aug 19, 2024
Merged

Conversation

bwoebi
Copy link
Collaborator

@bwoebi bwoebi commented Aug 19, 2024

The JIT will look up zend_op_trace_info in (char*)EX(opline) + offset, where offset is generally somewhere in valid memory, but will effectively have random values, and crash when using these.

Also add tooling to trivially open a randomized corefile from circleci.

The JIT will look up zend_op_trace_info in (char*)EX(opline) + offset, where offset is generally somewhere in valid memory, but will effectively have random values, and crash when using these.

Also add tooling to trivially open a randomized corefile from circleci.

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
@bwoebi bwoebi requested a review from a team as a code owner August 19, 2024 15:28
@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.47%. Comparing base (d75a84d) to head (dcbf93a).
Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2797      +/-   ##
============================================
- Coverage     76.68%   76.47%   -0.22%     
  Complexity     2452     2452              
============================================
  Files           169      170       +1     
  Lines         18052    18120      +68     
  Branches        913      913              
============================================
+ Hits          13844    13857      +13     
- Misses         3713     3768      +55     
  Partials        495      495              
Flag Coverage Δ
appsec-extension 69.27% <ø> (ø)
tracer-extension 78.27% <100.00%> (-0.95%) ⬇️
tracer-php 78.40% <ø> (ø)

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

Files Coverage Δ
zend_abstract_interface/hook/hook.c 54.78% <100.00%> (+0.11%) ⬆️

... and 1 file 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 d75a84d...dcbf93a. Read the comment docs.

@pr-commenter
Copy link

pr-commenter bot commented Aug 19, 2024

Benchmarks

Benchmark execution time: 2024-08-19 15:52:40

Comparing candidate commit dcbf93a in PR branch bob/fixup-randomized with baseline commit d75a84d in branch master.

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

scenario:ContextPropagationBench/benchInject64Bit-opcache

  • 🟥 execution_time [+147.881ns; +352.119ns] or [+2.097%; +4.993%]

scenario:LaravelBench/benchLaravelBaseline-opcache

  • 🟥 execution_time [+82.148µs; +206.832µs] or [+3.157%; +7.949%]

scenario:LaravelBench/benchLaravelOverhead-opcache

  • 🟥 execution_time [+57.565µs; +189.455µs] or [+2.021%; +6.651%]

scenario:PDOBench/benchPDOBaseline

  • 🟥 execution_time [+12.360µs; +17.524µs] or [+7.370%; +10.449%]

scenario:PDOBench/benchPDOOverhead

  • 🟥 execution_time [+16.446µs; +18.147µs] or [+6.400%; +7.062%]

scenario:PDOBench/benchPDOOverhead-opcache

  • 🟥 execution_time [+6.653µs; +15.072µs] or [+2.460%; +5.572%]

scenario:PDOBench/benchPDOOverheadWithDBM

  • 🟥 execution_time [+16.688µs; +19.897µs] or [+6.002%; +7.156%]

scenario:PDOBench/benchPDOOverheadWithDBM-opcache

  • 🟥 execution_time [+14.993µs; +16.848µs] or [+4.908%; +5.515%]

scenario:SamplingRuleMatchingBench/benchRegexMatching2

  • 🟥 execution_time [+162.026ns; +391.774ns] or [+2.589%; +6.260%]

scenario:SamplingRuleMatchingBench/benchRegexMatching3

  • 🟥 execution_time [+138.998ns; +392.602ns] or [+2.195%; +6.199%]

scenario:SamplingRuleMatchingBench/benchRegexMatching3-opcache

  • 🟥 execution_time [+130.350ns; +367.450ns] or [+2.029%; +5.719%]

@bwoebi bwoebi merged commit 2a48b14 into master Aug 19, 2024
699 of 739 checks passed
@bwoebi bwoebi deleted the bob/fixup-randomized branch August 19, 2024 16:13
@github-actions github-actions bot added this to the 1.3.0 milestone Aug 19, 2024
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