Skip to content

luau crashes if create table capacity is too big #627

Closed

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...

Activity

  1. khvzak commented on Aug 13, 2025

    @khvzak
    Member

    Fixed, thank you. Seems Luau has lower limits than other Lua versions.

  2. added a commit that references this issue on Aug 14, 2025
    f0806a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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