Skip to content

flatc --lua segfaults when missing root_type #8635

Open
@Gaiko-sw

Description

@Gaiko-sw

With the file, with no root_type Motion; specified

table Motion {
  x: float;
  y: float;
}

calling flatc --lua test.fbs crashes trying to read null.
Exception happens in base.h:ReadScalar(const void *p) where its p is 0. Coming from GetVTable, from name()

I would have expected an error "expected root_type".

However, C++ and Rust successfully generate, so maybe it should be doing whatever it is that they do instead.
Is it supposed to be optional?

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