Skip to content

Conversation

@realFlowControl
Copy link
Member

@realFlowControl realFlowControl commented Jan 19, 2026

Description

When compiling the profiler on macOS with Homebrew Clang >= 19, bindgen fails with:

  thread 'main' panicked at bindgen-0.69.5/ir/function.rs:263:34:                                                                                                                                                   
  Cannot turn unknown calling convention to tokens: 20     

PHP 8.5.0 introduced the TAILCALL VM, a performance optimization that uses __attribute__((preserve_none)) for opcode handler function pointers. This is enabled when compiling PHP with a compiler that supports the preserve_none attribute (Clang >= 19) on x86_64 or aarch64.

The problem is that bindgen does not support CXCallingConv_PreserveNone (calling convention 20) and panics when parsing PHP headers containing these typedefs (zend_vm_opcode_handler_t, zend_vm_opcode_handler_func_t in our case).

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 19, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

❄️ 1 New flaky test detected

ext/standard/tests/network/fsockopen_variation2.phpt (testing fsockopen() with udp sockets) from php.ext.standard.tests.network (Datadog) (Fix with Cursor)
--
     resource(%d) of type (stream)
     
     Pass some data between the sockets:
007- string(10) "0123456789"
007+ bool(false)
     
     Calling fsockopen() with address and port in same string:
     resource(%d) of type (stream)
--

🧪 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 (Fix with Cursor)

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: 696e4bb40000000048996296e2ccfb6d
tid: 696e4bb400000000
hexProcessTraceId: 48996296e2ccfb6d
hexProcessSpanId: 3561a9b9cd86d800
processTraceId: 5231320842357242733
processSpanId: 3846542172233324544

phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:106
View all
This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0696d7d | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@github-actions github-actions bot added the profiling Relates to the Continuous Profiler label Jan 19, 2026
@realFlowControl realFlowControl force-pushed the florian/fix-macos-bindgen branch from 6273eaf to 0696d7d Compare January 19, 2026 14:56
@pr-commenter
Copy link

pr-commenter bot commented Jan 19, 2026

Benchmarks [ profiler ]

Benchmark execution time: 2026-01-19 15:13:03

Comparing candidate commit 0696d7d in PR branch florian/fix-macos-bindgen with baseline commit 434d817 in branch master.

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

@realFlowControl realFlowControl marked this pull request as ready for review January 19, 2026 16:08
@realFlowControl realFlowControl requested a review from a team as a code owner January 19, 2026 16:08
@realFlowControl realFlowControl merged commit 269b7df into master Jan 19, 2026
1943 of 2019 checks passed
@realFlowControl realFlowControl deleted the florian/fix-macos-bindgen branch January 19, 2026 16:12
@github-actions github-actions bot added this to the 1.16.0 milestone Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

profiling Relates to the Continuous Profiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants