Skip to content

fix(tracing): hook is_internal was backwards#3625

Merged
morrisonlevi merged 1 commit intomasterfrom
levi/is-internal
Feb 5, 2026
Merged

fix(tracing): hook is_internal was backwards#3625
morrisonlevi merged 1 commit intomasterfrom
levi/is-internal

Conversation

@morrisonlevi
Copy link
Collaborator

@morrisonlevi morrisonlevi commented Feb 4, 2026

Description

I'm fairly certain this is wrong but I'm not sure why it doesn't seem to affect things much. I have tried with AI's help to create reproducers that cause ASAN to fail (which is where I got started in the first place, looking at a bug report and seeing which things touch the run time cache and might get it wrong).

This field is used in a very narrow place, in zai_hook_entries_destroy when:

  • hooks->run_time_cache != NULL
  • hooks->resolved == NULL

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Feb 4, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 1024 Tests failed

    testSearchPhpBinaries from integration.DDTrace\Tests\Integration\PHPInstallerTest (Fix with Cursor)

testSimplePushAndProcess from laravel-58-test.DDTrace\Tests\Integrations\Laravel\V5_8\QueueTest (Datadog) (Fix with Cursor)
DDTrace\Tests\Integrations\Laravel\V5_8\QueueTest::testSimplePushAndProcess
Test code or tested code printed unexpected output: spanLinksTraceId: 6983c58d000000006ba9864312dd63dd
tid: 6983c58d00000000
hexProcessTraceId: 6ba9864312dd63dd
hexProcessSpanId: 25870df9c454990a
processTraceId: 7757879455759819741
processSpanId: 2704145467651168522

phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:106
testSimplePushAndProcess from laravel-8x-test.DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest (Datadog) (Fix with Cursor)
DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest::testSimplePushAndProcess
Test code or tested code printed unexpected output: spanLinksTraceId: 6983c57d00000000dff7c0e5a7a303b6
tid: 6983c57d00000000
hexProcessTraceId: dff7c0e5a7a303b6
hexProcessSpanId: 7f631fcc111d199d
processTraceId: 16138579882297983926
processSpanId: 9179215426832112029
View all

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7003e2b | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.12%. Comparing base (6843f96) to head (7003e2b).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3625      +/-   ##
==========================================
- Coverage   62.21%   62.12%   -0.09%     
==========================================
  Files         141      141              
  Lines       13387    13387              
  Branches     1753     1753              
==========================================
- Hits         8329     8317      -12     
- Misses       4260     4270      +10     
- Partials      798      800       +2     

see 2 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 6843f96...7003e2b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link

pr-commenter bot commented Feb 4, 2026

Benchmarks [ tracer ]

Benchmark execution time: 2026-02-04 23:03:00

Comparing candidate commit 7003e2b in PR branch levi/is-internal with baseline commit 6843f96 in branch master.

Found 1 performance improvements and 5 performance regressions! Performance is the same for 184 metrics, 4 unstable metrics.

scenario:BM_TeaSapiSpindown

  • 🟩 execution_time [-35.057µs; -15.233µs] or [-6.431%; -2.795%]

scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache

  • 🟥 execution_time [+3.771µs; +5.409µs] or [+3.648%; +5.231%]

scenario:SamplingRuleMatchingBench/benchRegexMatching1

  • 🟥 execution_time [+93.573ns; +140.627ns] or [+8.159%; +12.263%]

scenario:SamplingRuleMatchingBench/benchRegexMatching2

  • 🟥 execution_time [+85.660ns; +154.540ns] or [+7.436%; +13.416%]

scenario:SamplingRuleMatchingBench/benchRegexMatching3

  • 🟥 execution_time [+104.937ns; +154.863ns] or [+9.103%; +13.434%]

scenario:SamplingRuleMatchingBench/benchRegexMatching4

  • 🟥 execution_time [+74.072ns; +124.128ns] or [+6.401%; +10.727%]

@morrisonlevi morrisonlevi marked this pull request as ready for review February 5, 2026 18:31
@morrisonlevi morrisonlevi requested a review from a team as a code owner February 5, 2026 18:31
Copy link
Collaborator

@bwoebi bwoebi left a comment

Choose a reason for hiding this comment

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

That's right, however I think the only effect is that on PHP 8.0 and 8.1 the runtime cache of dynamic (bound to a file rather than a class) hook-closures may leak (within a request - freed at request end).

@morrisonlevi morrisonlevi merged commit f1d36ca into master Feb 5, 2026
2073 of 2080 checks passed
@morrisonlevi morrisonlevi deleted the levi/is-internal branch February 5, 2026 18:40
@github-actions github-actions bot added this to the 1.17.0 milestone Feb 5, 2026
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