Re: Putting limits on formatting element growth

On Sep 14, 2010, at 1:05 AM, Henri Sivonen wrote:

>> Here's a test case (not a live link but the source) that caused
>> lengthy hangs in the older WebKit HTML parser:
> Following links form that commit leads me to a patch that limits the outer loop of the old AAA to 5 iterations.
> Any particular reason why the new implementation limits the outer AAA loop to 10 iterations instead?

5 was an arbitrary choice, I think because there was already another limit of 5 somewhere. It probably could have been higher, any finite limit will prevent unbounded O(N^2) growth. Content that breaks that particular limit is fairly rare in any case, I think.


Received on Tuesday, 14 September 2010 14:05:08 UTC