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

Segmentation Fault in release. Assertion 'context_p->source_p < context_p->source_end_p' failed in debug version #5105

Open
anbu1024 opened this issue Oct 18, 2023 · 0 comments

Comments

@anbu1024
Copy link

jerryScript version 3.0.0:
commit 05dbbd1

Build platform:
Ubuntu 20.04

Build cmd:

python tools/build.py --debug --profile=es.next --lto=off --compile-flag=-D_POSIX_C_SOURCE=200809 --compile-flag=-Wno-strict-prototypes --stack-limit=15

Test case

var a = new Uint16Array(Uint16Array, Uint16Array);
var b = `
    var o = {
        m(apple) {
            class Foo extends b {
                
                static {}
                
                512;
                
                static #m() {}
            }
            return apple;
        },
    };
`;

for (var [...i] of b) {
    i.splice(a, i);
    
    b += i;
    
    function bar() {
        return Uint16Array;
    }
    
    try { bar.constructor(b); } catch (e) {}
}

Error message:

SEGV on ASAN version

AddressSanitizer:DEADLYSIGNAL
=================================================================
==510031==ERROR: AddressSanitizer: SEGV on unknown address 0x000000005198 (pc 0x5618574bc04b bp 0x7ffd51997c50 sp 0x7ffd51997bb0 T0)
==510031==The signal is caused by a READ memory access.

Aborted with assertion error in debug version:

ICE: Assertion 'context_p->source_p < context_p->source_end_p' failed at /media/Store/JS-engines/jerryscript/jerryscript-pure/jerry-core/parser/js/js-lexer.c(lexer_consume_next_character):1821.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)
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