Possible bug in jdk.naming.dns. I need guidance on how get someone smarter to look at it.

Daniel Fuchs daniel.fuchs at oracle.com
Wed Sep 4 14:59:22 UTC 2024


On 04/09/2024 15:02, Marko Bakšić wrote:
> Thank you Daniel.
> 
> The part that was suspicious to me is
> 
> ```
> int timeoutLeft = pktTimeout;
> do {
>       ...
>       timeoutLeft = pktTimeout - ((int) (end - start));
> } while (timeoutLeft > MIN_TIMEOUT);
> ```
> 
> Here, timeoutLeft is not iteratively decreased, but is always derived 
> from `pktTimeout`.
> I can see a case where `timeoutLeft` never drops below `MIN_TIMEOUT` 
> (this is the part where I'm not sure if I'm missing some deeper knowledge).

Indeed - good observation!

-- daniel




More information about the core-libs-dev mailing list