With-defer-block-scope.js 679 B

123456789101112131415161718192021222324252627
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. let h = function f(a0 = (function () {
  6. a0;
  7. a1;
  8. a2;
  9. a3;
  10. a4;
  11. a5;
  12. a6;
  13. a7 = 0x99999; // oob write
  14. with ({});
  15. })(), a1, a2, a3, a4, a5, a6, a7) {
  16. function g() {
  17. f;
  18. }
  19. };
  20. for (let i = 0; i < 0x10000; i++) {
  21. h();
  22. }
  23. WScript.Echo('pass');