]> git.kaiwu.me - njs.git/commit
HTTP: fixed r.subrequest() error handling.
authorDmitry Volyntsev <xeioex@nginx.com>
Fri, 31 May 2024 05:22:48 +0000 (22:22 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Wed, 12 Jun 2024 22:09:21 +0000 (15:09 -0700)
commitd34fcb03cf2378a644a3c7366d58cbddc2771cbd
treeaa69f1f10e9276133e16d5ddd9a0ba759a1ab8a6
parent558de1e14d9c9a6542bc0512b9fff51167ef6f3a
HTTP: fixed r.subrequest() error handling.

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).
nginx/ngx_http_js_module.c
nginx/t/js_subrequests.t