Demo code: https://github.com/lijunle/bug-node-v4-while-const/blob/master/index.js
The build output: Travis, AppVeyor. It is causing a dead loop in the while block.
This bug only happens in v4 and not v6 or v7. I understand that, v4 is in maintain status, but I think this is a critical bug.
/cc @nodejs/v8
Note that the bug only exists in sloppy mode. You can work around it with a 'use strict'; at the beginning of your file.
This has been a known issue for a year.
Going to close as this is a known issue and v4.x is in maintenance mode now. If you want correct functionality for const in v4, make sure you 'use strict'