Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack-overflow in ecma_get_lex_env_type #4745

Closed
CCWANG19 opened this issue Aug 24, 2021 · 0 comments
Closed

stack-overflow in ecma_get_lex_env_type #4745

CCWANG19 opened this issue Aug 24, 2021 · 0 comments
Labels
stack-overflow Stack overflow caused by potential recursive call

Comments

@CCWANG19
Copy link

JerryScript revision
3bcd48f7
Build platform
Ubuntu 20.04.2 LTS (Linux 5.11.0-25-generic x86_64)
Build steps
./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 --profile=es2015-subset --stack-limit=20
Test case
function Foo() {
  new Foo()
}
var o = new Foo();
Output
AddressSanitizer:DEADLYSIGNAL
=================================================================
==26122==ERROR: AddressSanitizer: stack-overflow on address 0xff793ffc (pc 0x5663300c bp 0xff794018 sp 0xff794000 T0)
    #0 0x5663300b in ecma_get_lex_env_type /home/jerryscript/jerry-core/ecma/base/ecma-helpers.c:326
    #1 0x567531ae in ecma_op_resolve_reference_value /home/jerryscript/jerry-core/ecma/operations/ecma-reference.c:293
    #2 0x566f4821 in vm_loop /home/jerryscript/jerry-core/vm/vm.c:1098
    #3 0x5671255e in vm_execute /home/jerryscript/jerry-core/vm/vm.c:5231
    #4 0x56712bf1 in vm_run /home/jerryscript/jerry-core/vm/vm.c:5338
    #5 0x56673029 in ecma_op_function_call_simple /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1130
    ...
    #241 0x566742ee in ecma_op_function_construct /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1572
    #242 0x566f3c87 in opfunc_construct /home/jerryscript/jerry-core/vm/vm.c:884
    #243 0x56712601 in vm_execute /home/jerryscript/jerry-core/vm/vm.c:5258
    #244 0x56712bf1 in vm_run /home/jerryscript/jerry-core/vm/vm.c:5338
    #245 0x56673029 in ecma_op_function_call_simple /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1130
    #246 0x566742ee in ecma_op_function_construct /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1572

SUMMARY: AddressSanitizer: stack-overflow /home/jerryscript/jerry-core/ecma/base/ecma-helpers.c:326 in ecma_get_lex_env_type
==26122==ABORTING
@rerobika rerobika added the stack-overflow Stack overflow caused by potential recursive call label Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stack-overflow Stack overflow caused by potential recursive call
Projects
None yet
Development

No branches or pull requests

2 participants