core: an empty App segfaults (potential to improve safety checks) #1069

Open
opened 2023-10-16 23:35:19 +00:00 by prime31 · 0 comments
prime31 commented 2023-10-16 23:35:19 +00:00 (Migrated from github.com)

While setting up mach in a project I discovered an empty App will result in a segfault.

Full repro of main.zig:

pub const App = struct {
    pub fn init(_: *App) !void {}

    pub fn update(_: *App) !bool {
        return false;
    }

    pub fn deinit(_: *App) void {}
};
While setting up mach in a project I discovered an empty App will result in a segfault. Full repro of main.zig: ``` pub const App = struct { pub fn init(_: *App) !void {} pub fn update(_: *App) !bool { return false; } pub fn deinit(_: *App) void {} }; ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach#1069
No description provided.