/[Apache-SVN]
ViewVC logotype

Revision 1636289


Jump to revision: Previous Next
Author: stevehay
Date: Mon Nov 3 08:41:03 2014 UTC (9 years, 5 months ago)
Changed paths: 1
Log Message:
Decrement interp->refcnt when freeing interpreter in modperl_interp_unselect()

The case where interp->refcnt==1 was not being handled correctly. Prior to r1562772 the refcnt was decremented to 0 but then the function returned early, wrongly not freeing the interpreter, leading to deadlock in the event MPM. Following that change the interpreter was now freed, but the refcnt was wrongly no longer decremented.

This change decrements the refcnt (always) and frees the interpreter as well (unless the refcnt is still > 0). An extra safety check is also made, to return early if the interpreter has already been unselected, although with correct refcnting now, we do not expect this to happen.

This patch is based on investigations and a tentative patch suggested by Richard M Kandarian:
http://marc.info/?t=140191218700004&r=1&w=2

Changed paths

Path Details
Directoryperl/modperl/trunk/src/modules/perl/modperl_interp.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26