Prevent request_exec being issued between requests#3939
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 401529728b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Benchmarks [ appsec ]Benchmark execution time: 2026-06-09 14:07:07 Comparing candidate commit ff281ae in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.
|
4015297 to
4828351
Compare
4828351 to
4d74189
Compare
After a successful command exchange (e.g. request_init), the helper has entered its inner request loop and is waiting for the matching request_shutdown. If _imsg_destroy() reports a msgpack framing error at that point, the code was returning dd_error. dd_error does not trigger dd_helper_close_conn(), so the connection stays open while the helper is blocked in the inner loop. On the next request the extension sends request_init into the inner loop, which the Rust helper treats as an unexpected command and aborts. Return dd_network instead, which causes the caller to close and abandon the connection. This keeps helper and extension state in sync even in the presence of malformed trailers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Link extension against pthreads (Threads::Threads) to resolve undefined symbol: pthread_once on some platforms - Fix CMake deprecation warning: BYPRODUCT -> BYPRODUCTS - Add DD_APPSEC_ENABLED=1 env to user_tracking set_user phpt tests - Update http_client_ip_generation_01 response format - Update rinit_fail_malformed_resp expected output: malformed responses now return dd_network, closing the connection (failed_count=1)
- PG(last_error_message) is char* in all PHP 7.x; became zend_string* only in PHP 8.0. Fix the version guard from < 70100 to < 80000. - zend_set_memory_limit() returns void in PHP 8.0 (changed back to bool in PHP 8.1). Guard the return-value check accordingly. - Expand single-line function bodies to satisfy clang-format. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CI uses clang-format-20 which does not allow single-line function bodies even when AllowShortBlocksOnASingleLine is true. Expand three offending functions to multi-line form. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
appsec: fix bailouts during rshutdown
|
Note to reviewers: review only the 1st three commits. Another PR was merged here because it depended on test facilities introduced by this one. @codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Description
Reviewer checklist