This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Merge chakra-core/ChakraCore@3282057f4d] [1.6>master] [MERGE #3074 @…
…suwc] Fix problems caused by late update of sparse segment's 'left' field Merge pull request #3074 from suwc:build/suwc/bugfix This bug was introduced chakra-core/ChakraCore#2959 (CVE-2017-0238) Revert the move of 'left' field update and add try..catch
- Loading branch information
Showing
3 changed files
with
68 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
//------------------------------------------------------------------------------------------------------- | ||
// Copyright (C) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. | ||
//------------------------------------------------------------------------------------------------------- | ||
//switches: -forcearraybtree | ||
|
||
// x86debug: lib\runtime\Library/JavascriptArray.inl, current->left >= lastindex | ||
function test0() { | ||
var arr = [4294967296]; | ||
arr[9] = 19; | ||
arr.unshift(1, 2, {}, 4, 5, 6, 7, 8, 9, 10, 11, 12); | ||
} | ||
|
||
// x64debug: lib\Runtime\Library\SparseArraySegment.cpp, length <= size | ||
function test1() { | ||
function makeArrayLength() { | ||
return 100; | ||
} | ||
var obj0 = {}; | ||
var protoObj0 = {}; | ||
var obj1 = {}; | ||
var arrObj0 = {}; | ||
var func0 = function () { | ||
}; | ||
var func1 = function () { | ||
}; | ||
obj0.method1 = func0; | ||
var ary = Array(); | ||
var IntArr1 = new Array(); | ||
IntArr1[15] = ~obj1.prop0; | ||
arrObj0.length = makeArrayLength(); | ||
IntArr1[10] = arrObj0.length; | ||
makeArrayLength(IntArr1.unshift(func1(), ary, obj0.method1(), protoObj0, Object(), arrObj0, -1877547837)); | ||
} | ||
|
||
test0(); | ||
test1(); | ||
console.log("Pass"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters