-
Notifications
You must be signed in to change notification settings - Fork 167
test(tracing): ASAN failures in eval'd code #3624
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
base: master
Are you sure you want to change the base?
Conversation
Adds a PHPT that forces an eval() parse error inside an end-hook on an internal fake closure. Under ASAN this triggers a crash in ddtrace backtrace collection.
Updates the internal fake closure ASAN reproducer to use two hooks and re-enter after removing one hook, while forcing eval() into the error path.
Reduces iterations and re-entry calls to the smallest values while preserving the ASAN crash.
Removes the extra hook installation/removal while preserving the ASAN crash.
Drops the secondary closure and re-entry call while preserving the ASAN crash in ddtrace backtrace collection.
Simplifies the reproducer to a single internal fake closure with one hook, while forcing eval() into the error path and still crashing under ASAN.
The crash occurs during eval() error handling, so hook removal is unnecessary; keep the hook installed.
Passes no begin hook and removes unused hook-id plumbing, while still reproducing the ASAN SEGV in ddtrace backtrace collection.
Removes the unnecessary callable indirection; the reduced test still deterministically triggers the ASAN SEGV in ddtrace backtrace collection.
Removes the non-essential DD_INSTRUMENTATION_TELEMETRY_ENABLED environment section; the test still deterministically crashes under ASAN.
Replace the eval parse-error payload with valid PHP that throws an exception, and catch the exception at the call site. The ASAN SEGV in ddtrace backtrace collection still reproduces deterministically.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3624 +/- ##
==========================================
- 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.
🚀 New features to boost your workflow:
|
PROF-13687
Description
Look at the ASAN failures for commit 2242f59. Example.
The rest of the commits were to try and reduce a previous failure down to valid PHP code. They failed for me locally but for some reason, they didn't in CI. For instance, commit f499613 failed locally for both amd64 and arm64 on PHP 8.3 ZTS ASAN. Here's the output for amd64:
Reviewer checklist