Segfault in i915_dri.so (NULLPTR in s_context.c?)
There is a bug in mesa, causing periodically crashes e.g. when rendering models in OpenSCAD. Mesa-21.0.2 installed with slackware64-current. Problem appeared after about a month after successful usage (probably after some system updates).
The primary cause of crushes is at src/mesa/swrast/s_context.c:191 For some reason ctx->Texture.FixedFuncUnit[i]._CurrentCombine is NULL and this condition is not checked.
As workaround the following patch helps:
--- s_context.c><------>1970-01-01 03:00:00.000000000 +0300
+++ s_context.c><------>2021-04-12 18:22:49.142095071 +0300
@@ -188,7 +188,7 @@
const struct gl_tex_env_combine_state *combine =
ctx->Texture.FixedFuncUnit[i]._CurrentCombine;
GLuint term;
- for (term = 0; term < combine->_NumArgsRGB; term++) {
+ for (term = 0; combine && term < combine->_NumArgsRGB; term++) {
if (combine->SourceRGB[term] == GL_PRIMARY_COLOR) {
swrast->_TextureCombinePrimary = GL_TRUE;
return;