Infinite loop in jdk/test/sun/management/windows/revokeall

Jonathan Gibbons jonathan.gibbons at oracle.com
Mon Oct 1 14:56:56 UTC 2018


I'm guessing serviceability-dev is a better place for this message.

-- Jon



On 10/1/18 5:44 AM, Ladislav Jahoda wrote:
> Hello guys,
> the revokeall utility has an infinite loop in its revokeAll method. 
> Please note in the loop (line #344 in revokeall.c):
> while (count > 0) {
> the condition (line #354):
> if (((ACCESS_ALLOWED_ACE *)ace)->Header.AceType != 
> ACCESS_ALLOWED_ACE_TYPE) {
>      continue;
> }
> which loops forever if the condition is met. Note that the “count” 
> counter needs to be decremented before the continue statement, that is:
> if (((ACCESS_ALLOWED_ACE *)ace)->Header.AceType != 
> ACCESS_ALLOWED_ACE_TYPE) {
>      count--;
>      continue;
> }
> I checked the OpenJDK 8, 9 and 10, the bug is in all versions.
> Thanks ahead for the fix,
> Lada Jahoda
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20181001/e20aee62/attachment.html>


More information about the serviceability-dev mailing list