[squid-dev] New Defects reported by Coverity Scan for Squid after IndependentRunner

Christos Tsantilas christos at chtsanti.net
Mon Sep 12 14:48:43 UTC 2016


On 09/09/2016 10:26 PM, Alex Rousskov wrote:
> On 09/09/2016 11:21 AM, Christos Tsantilas wrote:
>> On 09/09/2016 07:00 PM, Alex Rousskov wrote:
>>> On 09/09/2016 07:34 AM, Christos Tsantilas wrote:
>>>> On 09/09/2016 02:21 PM, Amos Jeffries wrote:
>>>>> Also the IndependentRunner::registerRunner() method is not used
>>>>> anywhere. Was it supposed to be called by the child classes ?
>>>>>  (IdleConnList and ConnStateData)
>
>>>> Well, the registerRunner() method should be used instead of
>>>> RegisterRunner for ConnStateData and IDleConnList. But this change
>>>> somewhere lost while I was playing with the patches.
>
>>> [rant] Which means our testing was inadequate again. Accidents happen,
>>> but such a major bug should not have went unnoticed if proper testing
>>> was in place.[/rant]
>
>> But it is not exactly bug. The registereRunner() method just calls
>> "RegisterRunner(this)", it does not do anything else.
>> Just we did not replace RegisterRunner(this); with the
>> IndependedRunner::registerRunner call.
>
> Ah, this is minor, and no functionality testing could expose this. I
> incorrectly thought that we are not registering independent runners at all.
>
> BTW, you can probably move the sketched RegisterRunnerUnlessShutdown()
> function into the IndependedRunner::registerRunner() itself and also add
> a Must(not an independent runner) check to the sketched
> RegisterOrGetRidOfRunner().

I move the code of sketched RegisterRunnerUnlessShutdown to
IndependentRunner::registerRunner()

Also I did not rename the RegisterRunner() to 
RegisterOrGetRidOfRunner(), to avoid changes in places other than 
runnersRegistry.[cc,h] files..

Now there is Must to assure that the RegisterRunner will not called to 
register an IndependentRunner.

The final commit is the patch r14835.


>
>
> Thank you,
>
> Alex.
>


More information about the squid-dev mailing list