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

HTTP: fixed r.subrequest() error handling. #735

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

xeioex
Copy link
Contributor

@xeioex xeioex commented Jun 12, 2024

Previously, when at least 2 subrequests were scheduled they both succeed, but the callback for the second threw an exception heap-use-after-free happened.

The issue was introduced in 0.8.1 (4cb8e873e8c6).

Checklist

Before creating a PR, run through this checklist and mark each as complete:

  • I have read the CONTRIBUTING document
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes

@p-pautov
Copy link

p-pautov commented Jun 12, 2024

May be elaborate a bit on the reasons behind use-after-free? For example, "there was a nested chain of ngx_http_run_posted_requests() calls and terminating request in the inner call left outer calls with already freed request pointer".

Previously, when at least 2 subrequests were scheduled they both
succeed, but the callback for the second threw an exception
heap-use-after-free happened: a nested chain of
ngx_http_run_posted_requests() calls and terminating request in the
inner call left outer calls with already freed request pointer.

The issue was introduced in 0.8.1 (4cb8e873e8c6).
@xeioex xeioex requested a review from VadimZhestikov June 12, 2024 21:52
@xeioex xeioex merged commit d34fcb0 into nginx:master Jun 12, 2024
1 check passed
@xeioex xeioex added this to the 0.8.5 milestone Jun 21, 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