Skip to content

luau crashes if create table capacity is too big #627

@cheesycod

Description

@cheesycod

Ideally, mlua should detect this and return a proper error instead of aborting the program with a fatal runtime error: Rust cannot catch foreign exceptions, aborting

fn main() {
    let lua = mlua::Lua::new();
    println!("{:?}", lua.create_table_with_capacity(100000000, 10));
}

Interestingly enough, mlua correctly handles this if a memory limit is set...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions