This repository was archived by the owner on Oct 15, 2020. It is now read-only.
File tree 3 files changed +39
-5
lines changed
3 files changed +39
-5
lines changed Original file line number Diff line number Diff line change @@ -1163,13 +1163,14 @@ namespace Js
1163
1163
__asm
1164
1164
{
1165
1165
mov savedEsp, esp;
1166
- mov eax , argsSize;
1167
- cmp eax , 0x1000 ;
1166
+ mov ecx , argsSize;
1167
+ cmp ecx , 0x1000 ;
1168
1168
jl allocate_stack;
1169
1169
// Use _chkstk to probe each page when using more then a page size
1170
- call _chkstk;
1171
- allocate_stack:
1172
- sub esp, eax;
1170
+ mov eax, ecx;
1171
+ call _chkstk; // _chkstk saves/restores ecx
1172
+ allocate_stack:
1173
+ sub esp, ecx;
1173
1174
1174
1175
mov edi, esp;
1175
1176
mov esi, argv;
Original file line number Diff line number Diff line change
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
+
6
+ let str = `(function module() { "use asm";function foo(` ;
7
+ // 550 double args exceeds 1 page
8
+ const totalArgs = 550
9
+ for ( let i = 0 ; i < totalArgs ; ++ i )
10
+ {
11
+ str += `arg${ i } ,` ;
12
+ }
13
+ str += `arg${ totalArgs } ){` ;
14
+
15
+ for ( let i = 0 ; i <= totalArgs ; ++ i )
16
+ {
17
+ str += `arg${ i } =+arg${ i } ;` ;
18
+ }
19
+ str += "return 10;}function bar(){return foo(" ;
20
+ for ( let i = 0 ; i < totalArgs ; ++ i )
21
+ {
22
+ str += "0.0," ;
23
+ }
24
+ str += "1.0)|0;}"
25
+ str += "return bar})()()" ;
26
+
27
+ const result = eval ( str ) ;
28
+ print ( result == 10 ? "Pass" : `Fail: ${ result } ` ) ;
Original file line number Diff line number Diff line change 1043
1043
<files >argassignbug.js</files >
1044
1044
</default >
1045
1045
</test >
1046
+ <test >
1047
+ <default >
1048
+ <files >manyargs.js</files >
1049
+ </default >
1050
+ </test >
1046
1051
<test >
1047
1052
<default >
1048
1053
<files >maybecallbug.js</files >
You can’t perform that action at this time.
0 commit comments