Skip to content

Segmentation fault on self-referential array raised to power of zero #5290

@lmaltsis

Description

@lmaltsis
JerryScript revision

b706935

Build platform

Ubuntu 24.04.4 LTS (Linux 6.17.0-23-generic x86_64)

Build steps

Debug build from source with -DCMAKE_BUILD_TYPE=Debug

mkdir build && cmake  -B "$BUILD_DIR" -S "$SRC_DIR" -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DCMAKE_BUILD_TYPE=Debug && cmake --build "$BUILD_DIR" -j"$JOBS"
Test case
let base = new Array;
base[0] = base;
Math.pow(base, 0)
Execution steps + Output
$ jerry /tmp/bug.js
Aborted (core dumped)
Backtrace

(None except segfault)

Note: This bug was found via fuzzing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions