Jeff Trawick <[EMAIL PROTECTED]> writes:
> The patch below gets rid of a segfault while processing every HTTP/1.1
> request (w/ ElectricFence and APR_POOL_DEBUG) but there is a much less
> infrequent segfault remaining :(
The infrequent segfault still remaining is from a scenario where
ap_rgetline() gets APR_SUCCESS from a call to ap_get_brigade() which
hit EOF on the socket.
1) pid 14795 status 3
2) 14795 getting brigade in ap_rgetline()
3) hit socket error 20514 in 14795, returning immortal
4) 14795 getting brigade returned 0
5) 14795 getting brigade in ap_rgetline()
6) [Fri Jan 11 14:41:47 2002] [notice] child pid 14795 exit signal Seg...
1: entering BUSY_READ state
2: ap_rgetline() about to call ap_get_brigade()
3: socket_read() hits EOF on socket, returns immortal "" bucket
4: ap_get_brigade() returns APR_SUCCESS to ap_rgetline()
(it has a valid line)
5: ap_rgetline() about to call ap_get_brigade()
6: segfault in core input because ctx->b is empty
It would seem that the simplest patch to solve the last two problems
would be to check the brigade near the start of core-input and return
APR_EOF if it is empty. (Justin suggested that some hours ago :) ).
--
Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...