MinGW-W64: 32-bit opengl32.dll (llvmpipe) crashes any program since !6946
Split from #4108 (closed).
System information
- OS: Windows 10 Version 19042
- First affected Mesa revision: Mesa 21.0.0-devel (git-3175b63a) - bisect log bellow
Describe the issue
I discovered this while preparing a Windows binary pre-release of Mesa 21.0.0-rc1 as part of my downstream project previewing zink driver. The short version is that the resulted opengl32.dll makes any program crash. I built with MSYS2 MinGW-W64 GCC, but any MinGW-W64 toolchain using GCC 10.2.0 might reproduce it.
Regression
git bisect log
git bisect start
# bad: [3c1275ccae620888108206799403999c1fc7e8b3] radv: enable DCC for MSAA on GFX10+
git bisect bad 3c1275ccae620888108206799403999c1fc7e8b3
# good: [3c4e43e72be3bcb70d7cfb9abcaf77d4c0c75f57] intel: Pointer to SCISSOR_RECT array should be 64B aligned
git bisect good 3c4e43e72be3bcb70d7cfb9abcaf77d4c0c75f57
# bad: [3404c3111e0537b234f1cec4c39b7e82edff7b6c] radeons: only force staging uploads for VRAM when all VRAM is not visible
git bisect bad 3404c3111e0537b234f1cec4c39b7e82edff7b6c
# good: [8fffcbce9bcf393ee0e629aa66eaea4184afef1a] Revert "mesa: Fix helgrind complaint about one-time init"
git bisect good 8fffcbce9bcf393ee0e629aa66eaea4184afef1a
# bad: [ebcca77d4badfb3b1eb4e8753a3b553126ff109d] radeonsi: print more fields in si_dump_shader_key
git bisect bad ebcca77d4badfb3b1eb4e8753a3b553126ff109d
# good: [b14679ab226bd3e263a778ea8e39828bde38b403] v3dv: check return value of drmGetMagic
git bisect good b14679ab226bd3e263a778ea8e39828bde38b403
# bad: [9b1f091bd924a4fba9e201ce8e0f98a91e9a8f1d] gallium: add PIPE_CAP_PREFER_REAL_BUFFER_IN_CONSTBUF0
git bisect bad 9b1f091bd924a4fba9e201ce8e0f98a91e9a8f1d
# good: [9779a9a51e5d21044a2edbe15b876c5880d5804b] aco: Declare num_reduce_ops for array size
git bisect good 9779a9a51e5d21044a2edbe15b876c5880d5804b
# good: [736f1f70ab8a7995041a707d28d0e1a5f2940f4c] mesa: skip redundant uniform updates for glUniform
git bisect good 736f1f70ab8a7995041a707d28d0e1a5f2940f4c
# bad: [fc31d9b733d0f8f6ab1983ccba584d28002fc2ba] mesa: allow multi-slot program parameters
git bisect bad fc31d9b733d0f8f6ab1983ccba584d28002fc2ba
# good: [9c84ca574d43b47932f32fc7cb67a21cec7ffe8c] util: add a common ALIGN16 macro for m_matrix and u_threaded_context
git bisect good 9c84ca574d43b47932f32fc7cb67a21cec7ffe8c
# bad: [2ca6c99604f78249e273bd01b95e3ee5462f585e] mesa: rework matrix statevar enums to remove excessive branching in fetch_state
git bisect bad 2ca6c99604f78249e273bd01b95e3ee5462f585e
# bad: [3175b63a0dfa290430f9f7eb651387788933a02b] mesa: don't allocate matrices with malloc
git bisect bad 3175b63a0dfa290430f9f7eb651387788933a02b
# first bad commit: [3175b63a0dfa290430f9f7eb651387788933a02b] mesa: don't allocate matrices with malloc
C:\Software\Development\projects\mesa>git log HEAD~1...HEAD
commit 3175b63a0dfa290430f9f7eb651387788933a02b (HEAD, refs/bisect/bad)
Author: Marek Olšák <maraeo@gmail.com>
Date: Mon Sep 28 08:53:42 2020 -0400
mesa: don't allocate matrices with malloc
There is no reason for it. This removes a pointer indirection.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Edited by Prodea Alexandru-Liviu