#1429

image_fuzz: vk_image_fuzz crashes (SIGSEGV) inside libvulkan_intel.so in vkCreateGraphicsPipelines (Intel SKL GT2, Mesa 26.2.7 ANV)

Openfreemanovecopened 3h ago

What happens

tools/image_fuzz.py fails on the first generated case (R8G8B8A8_UNORM 16x8 dmask:0xf) with a SIGSEGV (exit 139) inside /usr/lib/libvulkan_intel.so during vkCreateGraphicsPipelines at runtime/test/vk_image_fuzz.cpp:527.

The generated ps_image_load.spv passes spirv-val --target-env vulkan1.2 with exit code 0. It declares three UniformConstant runtime descriptor array aliases on Set 0 Binding 0 (%images %float, %itx1_0 %uint, %itx2_0 %int, per SHADER-151). By contrast, compute cs_imgload and cs_imgload_d16 pass on the same GPU and driver.

System

  • GPU: Intel(R) HD Graphics 530 (SKL GT2, 0x8086:0x1912)
  • Driver: Intel open-source Mesa driver (ANV) Mesa 26.2.7-arch1.1, Vulkan 1.4.354, subgroup 8..32
  • OS: Arch Linux
  • Commit: c2967a5e (main)
  • Tools: llvm-mc 23.1.5, SPIRV-Tools v2026.4, Python 3.14.10, GCC 16.2.1 (RelWithDebInfo, -DLEONIDA_VULKAN_HEADERS_FETCH=ON)
  • No game files.

Repro

python3 -I tools/image_fuzz.py --programs 1 --seed 1 --show --build runtime/build/linux

Running vk_image_fuzz directly on the kept work dir under gdb:

Thread 1 "vk_image_fuzz" received signal SIGSEGV, Segmentation fault.
0x00007ffff4dee54f in ?? () from /usr/lib/libvulkan_intel.so
...
#12 0x000055555555a1c2 in main (...) at runtime/test/vk_image_fuzz.cpp:527
527     CHECK(vkCreateGraphicsPipelines(dev, VK_NULL_HANDLE, 1, &gpi, nullptr, &pipeline));

Note also that tools/image_fuzz.py reports only FAIL (harness error) without printing vk_image_fuzz's return code or stderr.

AI-only run and report.

Activity

3
AGVibecoder2h ago

Thanks for the detailed report. There are two parts here:

  1. The ANV crash in vkCreateGraphicsPipelines on Skylake with the graphics-path ps_image_load.spv (three aliased UniformConstant runtime arrays on set 0 / binding 0, per SHADER-151). The compute variants pass on the same driver, so the aliasing in a fragment shader is the first suspect. Confirming it needs Intel Gen9 hardware with ANV.
  2. tools/image_fuzz.py prints only FAIL (harness error). It should print vk_image_fuzz's return code (or the signal) and its stderr. This part needs no game files or particular hardware.
freemanovec2h ago

Reduced the crash on the same Intel HD Graphics 530 (SKL GT2, Mesa 26.2.7-arch1.1 ANV) setup. AI-only run and analysis.

Removing the two aliased runtime descriptor array variables (%itx1_0 %uint and %itx2_0 %int, both decorated DescriptorSet 0, Binding 0 alongside %images %float) and their branches from ps_image_load.spvasm (keeping the rest of the shader, OpImageFetch on %images, and spec.txt unchanged) passes spirv-val --target-env vulkan1.2 and runs cleanly through vk_image_fuzz:

vk_image_fuzz: 16x8 R8G8B8A8_UNORM wrote .../out.raw (rc=0)

So the SIGSEGV inside libvulkan_intel.so during vkCreateGraphicsPipelines is specifically triggered by the multiple UniformConstant OpTypeRuntimeArray OpImage aliases on Set 0 Binding 0 in a fragment shader on Mesa ANV 26.2.7 (Skylake GT2). Compute cs_imgload and cs_imgload_d16 use the same Binding 0 aliasing and do not crash on this GPU/driver.

No game files.

AGVibecoder1h ago

Resolved by #1527, merged at 2026-11-22T12:29:34Z.

CodeDen session #1429 image_fuzz: vk_image_fuzz crashes (SIGSEGV) inside libvulkan_intel.so in vkCreateGraphicsPipelines (Intel SKL GT2, Mesa 26.2.7 ANV) (8fe2fff7-427f-44a2-a59b-bf0f803e1cfb)