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 re_parse_term #29

Closed
apascovici opened this issue Nov 3, 2020 · 2 comments
Closed

Stack overflow in re_parse_term #29

apascovici opened this issue Nov 3, 2020 · 2 comments

Comments

@apascovici
Copy link

[this is a clone of https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21422 which is now open to everyone]
Using the attached file one can try (N.B. the build must have CONFIG_ASAN=y in the Makefile for this to show)

./qjs e26867.js.TXT

==32654==ERROR: AddressSanitizer: stack-overflow on address 0x7ffee78a8d80 (pc 0x000107da7d7a bp 0x7ffee78a93b0 sp 0x7ffee78a8d80 T0)
#0 0x107da7d7a in re_parse_term+0x8a (qjs:x86_64+0x100250d7a)
#1 0x107da7444 in re_parse_disjunction+0x184 (qjs:x86_64+0x100250444)
#2 0x107da92c2 in re_parse_term+0x15d2 (qjs:x86_64+0x1002522c2)
#3 0x107da7444 in re_parse_disjunction+0x184 (qjs:x86_64+0x100250444)
#4 0x107da92c2 in re_parse_term+0x15d2 (qjs:x86_64+0x1002522c2)
#5 0x107da7444 in re_parse_disjunction+0x184 (qjs:x86_64+0x100250444)
#6 0x107da92c2 in re_parse_term+0x15d2 (qjs:x86_64+0x1002522c2)
...

e26867.js.TXT

@bellard
Copy link
Owner

bellard commented Nov 8, 2020

fixed

@apascovici
Copy link
Author

Excellent, confirmed fix on 2020-11-08 thanks Fabrice!
A.

cykoder pushed a commit to cykoder/quickjs that referenced this issue Sep 1, 2023
GerHobbelt pushed a commit to GerHobbelt/quickjs that referenced this issue Oct 17, 2023
* move lifetime to own file

* Scope

* scope.alive

* promise

* failing tests

* fix promise

* promise docs

* doc comments

* regenerate docs

* even more doc

* use Scope to manage lifetimes for QuickJsVm instance

* doc Disposable

* evalCode: use Scope.withScope

* export Scope, Disposable

* update README for recent changes
TooTallNate pushed a commit to TooTallNate/quickjs that referenced this issue Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants