Skip to content

SIGSEGV instead of a syntax error #170

@snakeru

Description

@snakeru

Hi there!

I stumbled upon an issue caused by my own stupidity. Luckily a chat-bot was able to identify a syntax error for me, so here is a bug report for you :)

If I try to use this shader:

@compute @workgroup_size(64)
fn main(@builtin(global_invocation_id) global_id: vec3<u32>) {
    let diff = vec2<f32>(1.0, 1.0);
    let dist2 = dot(diff);
}

Then my go program crashes with SIGSEGV:

$ ./run
Can't open bumblebee display.
2026/05/05 16:20:13 INFO adapter selected name="Intel(R) UHD Graphics (TGL GT1)" type=IntegratedGPU
SIGSEGV: segmentation violation

The problem, apparently, is in the fact that dot-product requires two arguments and I gave it only one (I was trying to find the distance square).

So the bugfix for me was to do

    let dist2 = dot(diff, diff);

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