Skip to content

ASan stack overflow in tests/test_builtin.js #671

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

Closed
bnoordhuis opened this issue Nov 10, 2024 · 1 comment · Fixed by #778
Closed

ASan stack overflow in tests/test_builtin.js #671

bnoordhuis opened this issue Nov 10, 2024 · 1 comment · Fixed by #778
Labels
bug Something isn't working

Comments

@bnoordhuis
Copy link
Contributor

$ ./build/run-test262 -c tests.conf -v -t 1 -f tests/test_builtin.js
tests.conf:4: ignoring testdir=tests                                                                                                                           
AddressSanitizer:DEADLYSIGNAL                                                                                                                                  
=================================================================                                                                                              
==3224737==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc0ca1bf80 (pc 0x55713bbbc1ec bp 0x7ffc0ca1c010 sp 0x7ffc0ca1bf70 T0)
    #0 0x55713bbbc1ec in JS_GetOpaque /home/bnoordhuis/src/quickjs/quickjs.c:10105
    #1 0x55713bd77a80 in js_proxy_isArray /home/bnoordhuis/src/quickjs/quickjs.c:46073  
    #2 0x55713bbcc3cb in JS_IsArray /home/bnoordhuis/src/quickjs/quickjs.c:12021  
    #3 0x55713bd77c3c in js_proxy_isArray /home/bnoordhuis/src/quickjs/quickjs.c:46086  
    #4 0x55713bbcc3cb in JS_IsArray /home/bnoordhuis/src/quickjs/quickjs.c:12021  
    #5 0x55713bd77c3c in js_proxy_isArray /home/bnoordhuis/src/quickjs/quickjs.c:46086  
    #6 0x55713bbcc3cb in JS_IsArray /home/bnoordhuis/src/quickjs/quickjs.c:12021  
    #7 0x55713bd77c3c in js_proxy_isArray /home/bnoordhuis/src/quickjs/quickjs.c:46086  
    #8 0x55713bbcc3cb in JS_IsArray /home/bnoordhuis/src/quickjs/quickjs.c:12021  
    #9 0x55713bd77c3c in js_proxy_isArray /home/bnoordhuis/src/quickjs/quickjs.c:46086  
    #10 0x55713bbcc3cb in JS_IsArray /home/bnoordhuis/src/quickjs/quickjs.c:12021                     
    #11 0x55713bd77c3c in js_proxy_isArray /home/bnoordhuis/src/quickjs/quickjs.c:46086 
    <etc>
@bnoordhuis bnoordhuis added the bug Something isn't working label Nov 10, 2024
@saghul
Copy link
Contributor

saghul commented Nov 11, 2024

Isn't this normal because we rely on the stack overflow checks (which are doubled for ASan) to detect that case?

bnoordhuis added a commit to bnoordhuis/quickjs that referenced this issue Dec 29, 2024
Otherwise recursive calls keep going until they trip ASan checks.

Remove the `__ASAN__` and `__UBSAN__` defines; no longer necessary.

Remove `globalThis.__running_with_sanitizer__` from qjs; likewise.

Fixes: quickjs-ng#671
Fixes: quickjs-ng#775
Fixes: quickjs-ng#776
bluesky950520 pushed a commit to bluesky950520/quickjs that referenced this issue Mar 14, 2025
Otherwise recursive calls keep going until they trip ASan checks.

Remove the `__ASAN__` and `__UBSAN__` defines; no longer necessary.

Remove `globalThis.__running_with_sanitizer__` from qjs; likewise.

Fixes: quickjs-ng/quickjs#671
Fixes: quickjs-ng/quickjs#775
Fixes: quickjs-ng/quickjs#776
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants