Skip to content

Segmentation fault initializing anonymous struct with local variable #5397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jeffkdev opened this issue May 21, 2020 · 1 comment
Closed

Comments

@jeffkdev
Copy link

jeffkdev commented May 21, 2020

test "anon struct initialization" {
    const SomeStruct = struct {x :f32, y:f32,};
    var local: f32 = 25.0;
    const some_value = .{
        SomeStruct{ .x = local, .y = 2 },
        SomeStruct{ .x = 2, .y = 2 },
    };
}
test "anon struct initialization"...Segmentation fault at address 0x7ff77b9167b8
0x7ff77b8839d4 in test "segfaulter 9000" (test.obj)
        SomeStruct{ .x = local, .y = 2 },
                         ^

Happens on 0.6.0 release build and master.

@Vexu
Copy link
Member

Vexu commented May 22, 2020

Duplicate of #4597 and #3915.

@Vexu Vexu closed this as completed May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants