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

Assertion `s < mjs->owned_strings.buf + mjs->owned_strings.len' failed in function gc_mark_string (mjs.c:10678) #302

Open
Vancir opened this issue Nov 19, 2024 · 0 comments

Comments

@Vancir
Copy link

Vancir commented Nov 19, 2024

I found an assertion failure while mjs (latest, b1b6eac) executes the PoC on Ubuntu 20.04.

Download the PoC: mjs_assertion-failure_mjs10678.zip

Output

mjs-bin: mjs.c:10678: void gc_mark_string(struct mjs *, mjs_val_t *): Assertion `s < mjs->owned_strings.buf + mjs->owned_strings.len' failed.
[1]    1527614 IOT instruction  ./mjs-bin -f 

Steps to reproduce

git clone https://github.com/cesanta/mjs.git
cd mjs
clang -g -O1 -fsanitize=address -fno-omit-frame-pointer -Wno-error -DMJS_MAIN mjs.c -dl -o mjs_asan
./mjs_asan -f PoC 
@Vancir Vancir changed the title Assertion `s < mjs->owned_strings.buf + mjs->owned_strings.len' failed in function gc_mark_string (mjs.c:10678) of latest version (b1b6eac) Assertion `s < mjs->owned_strings.buf + mjs->owned_strings.len' failed in function gc_mark_string (mjs.c:10678) Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant