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

resolve_labels: Assertion `label_slots[i].first_reloc == NULL' failed #282

Open
renatahodovan opened this issue Apr 23, 2024 · 0 comments
Open

Comments

@renatahodovan
Copy link
Contributor

Version: 3b45d15
Command: ASAN_OPTIONS="handle_abort=1" ./qjs test.js
Build: CONFIG_ASAN=y make qjs
Test:

for (;;) {
  SIGALRM:break ;
  SIGALRM:break ;
  SIGALRM:break ;
}

Backtrace:

qjs: quickjs.c:32859: resolve_labels: Assertion `label_slots[i].first_reloc == NULL' failed.
AddressSanitizer:DEADLYSIGNAL
=================================================================
==1830816==ERROR: AddressSanitizer: ABRT on unknown address 0x03e9001befa0 (pc 0x7ffff76759fc bp 0x0000001befa0 sp 0x7fffffffd140 T0)
    #0 0x7ffff76759fc in __pthread_kill_implementation nptl/pthread_kill.c:44
    #1 0x7ffff76759fc in __pthread_kill_internal nptl/pthread_kill.c:78
    #2 0x7ffff76759fc in __GI___pthread_kill nptl/pthread_kill.c:89
    #3 0x7ffff7621475 in __GI_raise ../sysdeps/posix/raise.c:26
    #4 0x7ffff76077f2 in __GI_abort stdlib/abort.c:79
    #5 0x7ffff760771a in __assert_fail_base assert/assert.c:92
    #6 0x7ffff7618e95 in __GI___assert_fail assert/assert.c:101
    #7 0x55555566aee4 in resolve_labels quickjs/quickjs.c:32859
    #8 0x55555566aee4 in js_create_function quickjs/quickjs.c:33344
    #9 0x55555572ebce in __JS_EvalInternal quickjs/quickjs.c:34473
    #10 0x5555557218bd in JS_EvalInternal quickjs/quickjs.c:34504
    #11 0x5555557218bd in JS_EvalThis quickjs/quickjs.c:34535
    #12 0x5555557218bd in JS_Eval quickjs/quickjs.c:34543
    #13 0x55555558a761 in eval_buf quickjs/qjs.c:71
    #14 0x55555558a957 in eval_file quickjs/qjs.c:103
    #15 0x555555589875 in main quickjs/qjs.c:516
    #16 0x7ffff7608d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #17 0x7ffff7608e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #18 0x555555589e24 in _start (quickjs/qjs+0x35e24)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: ABRT nptl/pthread_kill.c:44 in __pthread_kill_implementation
==1830816==ABORTING

The issue was found by libFuzzer with a Grammarinator-based custom mutator.

GerHobbelt pushed a commit to GerHobbelt/quickjs that referenced this issue May 6, 2024
I have a use case where a user can hand me many different kinds of
types, array buffer, uint8array, or a string, and I need to be able to
distingush between them.

Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
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