The failures are caused by validator regressions in spirv-tools 2026.3~rc1 (over-strict checks on untyped pointers, kernel FPRoundingMode, constant composites, debug info, plus an out-of-bounds crash on OpString in InspectDebugLine).
Forwarded to Debian BTS: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1149809 Attached debdiff relaxes these checks and fixes the crash. With this fix, the spirv-llvm-translator-20 upstream test suite passes 100% (929/929 passed, 0 failed). ** Description changed: [ Impact ] spirv-tools 2026.3~rc1-1 is stuck in Ubuntu stonking proposed-migration because tighter checks in spirv-val break the upstream-testsuite autopkgtests of spirv-llvm-translator-{17,18,19,20,22} across amd64 and amd64v3. The validator changes in 2026.3 introduced 6 regressions / over-strict rejections of valid SPIR-V constructs generated by the LLVM translator: 1. ValidateLifetime (validate_cfg.cpp:358): Only accepted OpTypePointer, failing when SPV_KHR_untyped_pointers uses OpTypeUntypedPointerKHR. 2. CheckFPRoundingModeForKernels (validate_decorations.cpp:1833): Disallowed FPRoundingMode on standard arithmetic ops (OpFAdd, OpFSub, OpFMul, OpFRem, OpFMod) and integer conversions (OpSConvert, OpUConvert) in OpenCL kernels, and rejected OpFDiv when RoundedDivideSqrtINTEL is absent even with Kernel capability. 3. ValidateConstantOperand (validate_constants.cpp:58): Rejected OpSpecConstantOp inside OpConstantComposite. In SPIR-V, global composite initializers must use OpSpecConstantOp bitcasts because SPIR-V does not provide OpConstantOp. 4. ValidatePtrCastToGeneric (validate_conversion.cpp:619): Strictly required identical source and destination pointee types on OpSpecConstantOp PtrCastToGeneric, breaking generic pointer casts in OpenCL global blocks. 5. NonSemantic.Shader.DebugInfo.200 validation (validate_extensions.cpp): - Rejected DebugInfoNone as debug flag and lexical scope operand. - Demanded 8th operand (Flags) when omitted in basic debug types. - Rejected line_start == 0 in DebugLine (standard DWARF/LLVM for compiler-generated code without line numbers) and rejected OpString sources. 6. InspectDebugLine (validation_state.cpp:2380): Crashed with std::out_of_range when the debug line source was an OpString (operands size <= 3). [ Fix ] Apply upstream-style surgical relaxations in spirv-tools validator: 1. In ValidateLifetime, query pointer metadata via GetPointerTypeInfo() instead of hardcoded OpTypePointer check, verifying storage class is Function. 2. In CheckFPRoundingModeForKernels, permit FPRoundingMode on arithmetic and integer conversions in kernels, and allow OpFDiv under Capability::Kernel. 3. In ValidateConstantOperand, exempt OpSpecConstantOp operands within OpConstantComposite. 4. In ValidatePtrCastToGeneric, allow pointee type mismatch when opcode is OpSpecConstantOp. 5. In validate_extensions.cpp, accept DebugInfoNone for constants and scopes, allow optional Flags, allow line_start == 0 and OpString sources in DebugLine. 6. In InspectDebugLine, add bounds checking on operands size before indexing operand 4 and operand 3. [ Test Plan ] 1. Stand reproduction on Ubuntu stonking: Run upstream-testsuite of spirv-llvm-translator-20 with spirv-tools 2026.3~rc1-1: 9 tests fail (lifetime.ll, memmove.ll, constrained-arithmetic.ll, convert_functions.ll, constant-vars.ll, globals.ll, global_block.cl, DebugLineOnlyOnce.ll, DebugLinePriority.spt). 2. Install updated spirv-tools 2026.3~rc1-1ubuntu1. 3. Re-run translator test suite: Total Discovered Tests: 940 Unsupported : 7 (0.74%) Passed : 929 (98.83%) Expectedly Failed: 4 (0.43%) Failed : 0 (0.00%) 100% pass rate, 0 failures. [ Where problems could occur ] The changes relax validation checks to tolerate constructs emitted by LLVM/OpenCL tools and add bounds checks to prevent crashes. A potential risk is that malformed hand-written SPIR-V binaries might bypass some strictness checks. However, all relaxations are scoped to OpenCL kernels, specialization constant expressions, debug info extensions, and untyped pointer capabilities. [ Other Info ] - Target series: stonking (26.10 devel series). Resolving this unblocks spirv-tools migration to stonking release. + - Debian BTS: Forwarded with patch as Bug #1149809 (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1149809). - Upstream: KhronosGroup/SPIRV-Tools. The relaxations restore backwards compatibility with LLVM SPIR-V translator. - Package build and debdiff generated cleanly against pristine 2026.3~rc1-1.dsc; patch applies with 0 fuzz and 0 rejects. --- [ Original Report ] spirv-tools 2026.3~rc1-1 is stuck in Ubuntu stonking proposed-migration because it regresses the upstream-testsuite autopkgtest of every spirv-llvm-translator it triggers on amd64 and amd64v3: - spirv-llvm-translator-17 17.0.19-1 - spirv-llvm-translator-18 18.1.21-1 - spirv-llvm-translator-19 19.1.16-1 - spirv-llvm-translator-20 20.1.11-1 - spirv-llvm-translator-22 22.1.0-1ubuntu1 Each of these passes with spirv-tools 2026.1-1 (and in the migration-reference runs) and fails 14-15/14-15 times with 2026.3~rc1-1. The translator versions did not change. The translator testsuite runs /usr/bin/spirv-val on llvm-spirv output, and the new validator rejects modules the old one accepted, e.g.: transcoding/global_block.cl (spirv-val --target-env spv1.1): error: Expected input and Result Type to point to the same type: SpecConstantOp %12 = OpSpecConstantOp %_ptr_Generic_uchar PtrCastToGeneric %__block_literal_global llvm-intrinsics/constrained-arithmetic.ll: error: FPRoundingMode decoration can be applied only to a conversion instruction to or from a floating-point type. %add = OpFAdd %float %a %a Other failing tests include type-scavenger/globals.ll and llvm-intrinsics/lifetime.ll. Logs: https://autopkgtest.ubuntu.com/results/autopkgtest-stonking/stonking/amd64/s/spirv-llvm-translator-17/20260926_015234_d5e34@/log.gz https://autopkgtest.ubuntu.com/results/autopkgtest-stonking/stonking/amd64/s/spirv-llvm-translator-18/20260926_015035_c2863@/log.gz https://autopkgtest.ubuntu.com/results/autopkgtest-stonking/stonking/amd64/s/spirv-llvm-translator-19/20260926_015158_b1629@/log.gz https://autopkgtest.ubuntu.com/results/autopkgtest-stonking/stonking/amd64/s/spirv-llvm-translator-20/20260926_015111_cef04@/log.gz https://autopkgtest.ubuntu.com/results/autopkgtest-stonking/stonking/amd64/s/spirv-llvm-translator-22/20260926_015011_c5a21@/log.gz (amd64v3 runs show the same failures.) Needs a decision on whether the validator is over-strict (a SPIRV-Tools regression to fix or relax) or whether llvm-spirv really emits invalid SPIR-V (translator fixes, or updating the tests to match). Either way this has to be resolved before spirv-tools can migrate to stonking. ** Bug watch added: Debian Bug tracker #1149809 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1149809 ** Patch added: "spirv-tools 2026.3~rc1-1ubuntu1 debdiff for stonking" https://bugs.launchpad.net/ubuntu/+source/spirv-tools/+bug/2168911/+attachment/6005242/+files/spirv-tools_2026.3~rc1-1ubuntu1.debdiff ** Also affects: spirv-tools (Debian) via https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1149809 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2168911 Title: spirv-tools 2026.3~rc1-1: stricter spirv-val breaks spirv-llvm- translator-{17,18,19,20,22} autopkgtests on amd64/amd64v3 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/spirv-tools/+bug/2168911/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
