On Wed, 15 Feb 2023 02:25:00 GMT, Amit Kumar <d...@openjdk.org> wrote:

> After reverting all of my changes, I applied your patch and I got time limit 
> error, probably because of some inf-loop ?
> 
> ```
> result: Error. Agent error: java.lang.Exception: Agent 2 timed out with a 
> timeout of 480 seconds; check console log for any additional details
> ```

Yes, it seems the deflate or inflate loop doesn't terminate as finished doesn't 
change to true or no space available in the buffer. I assume you can quickly 
check which loop, I suspect it's the deflate loop based of the previous 
comments/experiments.

Your initial proposal was to increase the size of out1 but I can't see any 
cases in this test where the deflate fills out1 completely. Additionally, when 
you initially tried the patch to replace deflate with a loop, it failed with 
"out1 is too small" which is very surprising, it hints that Deflater::finished 
is not returning true when the input has been consumed. You might have to dig 
into this more to see if there is a bug in this area to explain it.

For inflate, the i == 0 case (in main) will cause inflate to fill out2 
completely. This is the most likely case to loop if there was a bug somewhere.

-------------

PR: https://git.openjdk.org/jdk/pull/12283

Reply via email to