Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] http-backend: Don't infinite loop during die()

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:29

"Shawn O. Pearce" [off-list ref] writes:
If stdout has already been closed by the CGI and die() gets called,
the CGI will fail to write the "Status: 500 Internal Server Error" to
the pipe, which results in die() being called again (via safe_write).
This goes on in an infinite loop until the stack overflows and the
process is killed by SIGSEGV.
Before looking at the code I first thought "wouldn't we have the same
problem in die(), and shouldn't we have "dying" flag there?" but I was
stupid as usual ;-)

The patch looks sane.  Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help