Skip to content

SIGABRT when reading nonexistent array members #30

@FGasper

Description

@FGasper
#!perl

use strict;
use warnings;

use FindBin;
use blib;

use JavaScript::Duktape::XS;

my $js = JavaScript::Duktape::XS->new();

$js->eval(
    qq<
        var croaker = function() { throw "hahaha" };
        var got = [];
        try {
            croaker();
        }
        catch(e) {
            got[1] = e;
        }

        got
    >
);

… yields SIGABRT, with the following output:

duktape fatal error, aborting: uncaught: 'cannot read property 1 of undefined'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions