Loading trivial tesc shader crashes nv ogl driver

I whittled a crash case down to two totally trivial shaders. When in the same spv module, the nv driver crashes in glSpecializeShader.

Anyone clue me in on what I’m doing wrong? Hard to believe something this simple is an actual driver bug. I’ve mucked around with the shader a great deal, and the presence of the second degree OpAccessChain to tesc’s gl_out is what crashes it. I.e., gl_out[gl_InvocationID].Position causes the crash, but gl_out[gl_InvocationID] does not.

I’ll add that glSpecializeShader works when the two shaders are loaded from separate binaries. The single spv module causes the crash.

I ran this on my Intel gfx notebook and it did not segfault.

I used below configuration setup to recreate issue where I get segmentation fault error but not exactly the same one reported by you.

Precision T7600 + Arch Linux + 5.7.12-arch1-1 + Quadro RTX 8000 + Driver 450.57

[amrits@archbox-amrits 43f0bb087692e42f4f884fb371c8a786-9d324dc8c41aae5a3b63cef44461d798fce60a07] ./segfault 1 program.spv: 1908 bytes Segmentation fault (core dumped) [amrits@archbox-amrits 43f0bb087692e42f4f884fb371c8a786-9d324dc8c41aae5a3b63cef44461d798fce60a07]

Can you please confirm if this can be considered as repro, if not, please let me know your configuration details (attach nvidia bug report) so that I can try to match and reattempt for repro.

I used below command to create executable file-
clang++ segfault.cxx -lGL -ldl gl3w.c -lsfml-system -lsfml-window -lsfml-graphics -o segfault

[root@archbox-amrits 43f0bb087692e42f4f884fb371c8a786-9d324dc8c41aae5a3b63cef44461d798fce60a07]# clang --version
clang version 10.0.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

After looking at stack trace, it loks like I am hitting the same error.

(gdb) run
Starting program: /home/amrits/43f0bb087692e42f4f884fb371c8a786-9d324dc8c41aae5a3b63cef44461d798fce60a07/segfault
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/usr/lib/libthread_db.so.1”.
program.spv: 1908 bytes

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff535da54 in ?? () from /usr/lib/libnvidia-glcore.so.450.57
(gdb) where
#0 0x00007ffff535da54 in ?? () from /usr/lib/libnvidia-glcore.so.450.57
#1 0x00007ffff5367895 in ?? () from /usr/lib/libnvidia-glcore.so.450.57
#2 0x00007ffff5367b8f in ?? () from /usr/lib/libnvidia-glcore.so.450.57
#3 0x00007ffff5367d52 in ?? () from /usr/lib/libnvidia-glcore.so.450.57
#4 0x00007ffff5367f0a in ?? () from /usr/lib/libnvidia-glcore.so.450.57
#5 0x00007ffff525f657 in ?? () from /usr/lib/libnvidia-glcore.so.450.57
#6 0x00007ffff525ff27 in ?? () from /usr/lib/libnvidia-glcore.so.450.57
#7 0x00007ffff5c24692 in ?? () from /usr/lib/libnvidia-glcore.so.450.57
#8 0x00007ffff5c2844e in ?? () from /usr/lib/libnvidia-glcore.so.450.57
#9 0x0000555555559966 in main ()
[amrits@archbox-amrits ~]$

What’s going on with this bug? I installed 455.23, which is only four days old, and this same segfault occurs. When is the fix coming?

Also, here’s another module that is segfaulting. I don’t know if it’s caused by the same bug or not. Again, this passes spirv-val.

The bug report I filed still says “open” but I got an email a month ago saying the bug was fixed.