Segmentation fault when loading multiple shaders
I'm on Alpine Linux Edge with libplacebo master (1b00e5f3) and mpv master (c5211dbf4ae38583b4a55ab63c5c07f8547f73b8). Here is the command that achieves a segfault:
mpv --no-config --vo=gpu-next --glsl-shaders=$HOME/.config/mpv/shaders/guided.glsl:$HOME/.config/mpv/shaders/guided.glsl:$HOME/.config/mpv/shaders/guided.glsl image.webp
Here is its output in gdb:
[vo/gpu-next/libplacebo] gl_fb_query: OpenGL error: GL_INVALID_OPERATION
[New LWP 10703]
V: 00:00:00 / 00:00:00 (0%)
Thread 11 "mpv/vo" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 10682]
0x0000555555669479 in ?? ()
(gdb)
#0 0x0000555555669479 in ?? ()
#1 0x0000555555669b5c in ?? ()
#2 0x000055555568ac0b in ?? ()
#3 0x00007ffff5ad0c35 in info_callback (priv=0x7fffee640220, dinfo=<optimized out>) at ../src/renderer.c:445
#4 0x00007ffff5b342e2 in run_pass.isra.0 (dp=0x7fffedf5f020, pass=0x7fffe35f6050, sh=<optimized out>) at ../src/dispatch.c:1192
#5 0x00007ffff5ad00e7 in pl_dispatch_finish (dp=0x7fffedf5f020, params=0x7fffee63ea80) at ../src/dispatch.c:1351
#6 0x00007ffff5ada665 in _img_tex (tag=<optimized out>, img=<optimized out>, pass=0x7fffee640220) at ../src/renderer.c:524
#7 _img_tex (pass=pass@entry=0x7fffee640220, img=img@entry=0x7fffee63ef10, tag=tag@entry=0x7ffff5b3c4eb "../src/renderer.c:1584") at ../src/renderer.c:504
#8 0x00007ffff5add3c5 in pass_read_image (pass=<optimized out>) at ../src/renderer.c:1584
#9 0x00007ffff5ae9ac0 in pl_render_image_mix (rr=0x7fffedf169e0, images=<optimized out>, ptarget=0x7fffee641f90, params=<optimized out>)
at ../src/renderer.c:3187
#10 0x000055555568fe4f in ?? ()
#11 0x0000555555663527 in ?? ()
#12 0x00007ffff7fb9c0b in start (p=0x7fffee642470) at src/thread/pthread_create.c:207
#13 0x00007ffff7fbbf79 in __clone () at src/thread/x86_64/clone.s:22
Using --vo=gpu
behaves correctly, no segfault.
Edited by Ethan