crash on video playback
FreeBSD 12.1 amd64, AMD Ryzen 3200G.
#0 0x0000000800c204da in thr_kill () from /lib/libc.so.7
#1 0x0000000800c1e614 in raise () from /lib/libc.so.7
#2 0x0000000800b9398c in abort () from /lib/libc.so.7
#3 0x0000000000441bba in OsAbort ()
#4 0x00000000004491ac in LogHdrMessage ()
#5 0x000000000044787a in FatalError ()
#6 0x000000000043f1e8 in OsInit ()
#7 0x0000000800a4f675 in pthread_sigmask () from /lib/libthr.so.3
#8 0x0000000800a4ebdf in pthread_getspecific () from /lib/libthr.so.3
#9 <signal handler called>
#10 si_nir_build_llvm (ctx=0x7fffffff9130, nir=0x0) at si_shader_nir.c:981
#11 0x0000000802abb745 in si_compile_tgsi_main (ctx=0x7fffffff9130) at si_shader.c:6164
#12 0x0000000802ab9c1c in si_compile_tgsi_shader (sscreen=0x801109c00, compiler=0x8081ce430, shader=0x809455c00, debug=0x7fffffffd5e8) at si_shader.c:6774
#13 0x0000000802afb1ae in si_check_missing_main_part (sscreen=0x801109c00, sel=0x801726000, compiler_state=0x7fffffffd5e0, key=0x7fffffffd530) at si_state_shaders.c:1769
#14 0x0000000802afa7f1 in si_shader_select_with_key (sscreen=0x801109c00, state=0x8081ceb40, compiler_state=0x7fffffffd5e0, key=0x7fffffffd530, thread_index=-1)
at si_state_shaders.c:1909
#15 0x0000000802af6e00 in si_shader_select (ctx=0x8081cdf40, state=0x8081ceb40, compiler_state=0x7fffffffd5e0) at si_state_shaders.c:1995
#16 0x0000000802af6337 in si_update_shaders (sctx=0x8081cdf40) at si_state_shaders.c:3445
#17 0x0000000802af0871 in si_draw_vbo (ctx=0x8081cdf40, info=0x8083cf8a8) at si_state_draw.c:1359
#18 0x00000008028610dd in tc_call_draw_vbo (pipe=0x8081cdf40, payload=0x8083cf8a8) at u_threaded_context.c:2050
#19 0x0000000802860240 in tc_batch_execute (job=0x8083cf790, thread_index=0) at u_threaded_context.c:96
#20 0x000000080285a4d7 in _tc_sync (tc=0x8083cf300, info=0x801eb45ab "normal", func=0x801ea6a10 "tc_flush") at u_threaded_context.c:207
#21 0x000000080285c420 in tc_flush (_pipe=0x8083cf300, fence=0x0, flags=0) at u_threaded_context.c:2030
#22 0x00000008024da38f in st_flush (st=0x807f7d800, fence=0x0, flags=0) at state_tracker/st_cb_flush.c:55
#23 0x00000008024da5d8 in st_glFlush (ctx=0x808645440) at state_tracker/st_cb_flush.c:91
#24 0x000000080219471f in _mesa_flush (ctx=0x808645440) at context.c:1854
#25 0x0000000802194d7e in _mesa_Flush () at context.c:1892
#26 0x0000000801bb358c in ?? () from /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so
#27 0x0000000801baedc5 in ?? () from /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so
#28 0x0000000801ba1de0 in ?? () from /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so
---Type <return> to continue, or q <return> to quit---
#29 0x0000000801ba374a in ?? () from /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so
#30 0x000000000043f6bb in OsCleanup ()
#31 0x0000000000436f8a in WaitForSomething ()
#32 0x00000000002946df in UpdateCurrentTimeIf ()
#33 0x000000000029fb4c in InitFonts ()
#34 0x0000000000286114 in _start ()
#35 0x0000000800482000 in ?? ()
#36 0x0000000000000000 in ?? ()
Possible fix:
--- src/gallium/drivers/radeonsi/si_shader_nir.c 2019-01-17 14:26:22.000000000 +0300
+++ src/gallium/drivers/radeonsi/si_shader_nir.c 2020-04-25 21:34:02.166773000 +0300
@@ -976,7 +976,13 @@
bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader *nir)
{
- struct tgsi_shader_info *info = &ctx->shader->selector->info;
+ struct tgsi_shader_info *info;
+
+ if (!ctx || !ctx->shader || !ctx->shader->selector ||
+ !nir)
+ return false;
+
+ info = &ctx->shader->selector->info;
if (nir->info.stage == MESA_SHADER_VERTEX ||
nir->info.stage == MESA_SHADER_FRAGMENT) {