"gallium: Force blend color to 16-byte alignment" crash with "-march=native -O3" causes some 32bit games to crash
https://bugs.freedesktop.org/show_bug.cgi?id=96835
Bug ID: 96835
Summary: "gallium: Force blend color to 16-byte alignment"
crash with "-march=native -O3" causes some 32bit games to crash
Product: Mesa
Version: git
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Building mesa with "-march=native -O3" causes some 32 bit games to crash at start since "gallium: Force blend color to 16-byte alignment" patch (d8d6091a846ac2a40a011d512d6d57f6c8442e6a). This happens using both opengl or nine. Everything works as expected using "-march=native -O2". tested games are:
Native:
The Talos Princible (32 bit) -- Always crash
The Talos Princible (64 bit) -- Works
Wine (32bit):
League of Legends -- Always crash
World of Warcraft 1.21 -- Always crash
World of Warcraft 2.4.3 -- Sometimes crashes
World of Warcraft 3.3.5 -- Most times works
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96835
Michel Dänzer <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #1 from Michel Dänzer <[email protected]> --- Please attach a gdb backtrace of a crash.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96835
--- Comment #2 from [email protected] ---
Created attachment 124940
--> https://bugs.freedesktop.org/attachment.cgi?id=124940&action=edit
steam gdb backtrace
Steam crashes (it's 32 bit)
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96835
--- Comment #3 from Nicolai Hähnle <[email protected]> ---
The backtrace looks completely unrelated to the commit you cite. Why do you think that this particular commit is at fault?
Just to be sure, could you please provide a backtrace with debug symbols enabled (-g)?
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96835
--- Comment #4 from [email protected] ---
The previous commit does just fine, this one does not.
I've found the traces to be different with and without the gallium hud, so I'm attaching both traces.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96835
--- Comment #5 from [email protected] ---
Created attachment 124947
--> https://bugs.freedesktop.org/attachment.cgi?id=124947&action=edit
steam gdb stack trace with gallium hud and mesa debug
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96835
--- Comment #6 from [email protected] ---
Created attachment 124948
--> https://bugs.freedesktop.org/attachment.cgi?id=124948&action=edit
steam gdb stack trace without gallium hud and mesa debug
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96835
--- Comment #7 from Roland Scheidegger <[email protected]> ---
On second look, I am actually wondering if that commit really is doing the right thing. Shouldn't we try to set the alignment on the struct itself instead? And regardless, if someone uses an ordinary malloc for it it's not going to be aligned anyway (meaning if it's passed to drivers somewhere and the called functions are relying on this to be aligned they might be in for some surprise).
(That said I have no idea if this is really related to this bug.)
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96835
Nicolai Hähnle <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
QA Contact|[email protected] |[email protected]. |.org |org Component|Drivers/Gallium/radeonsi |Mesa core Assignee|[email protected] |[email protected]. |.org |org
--- Comment #8 from Nicolai Hähnle <[email protected]> --- (The Gallium HUD crash is "benign": you enabled more graphs than there are pre-defined colors. Annoying, but unrelated to the problem at hand.)
My understanding is that malloc should return pointers with the largest alignment requirement possible for the size that it allocates. Although, perhaps that's less than 16 bytes on 32 bits?
Actually, I think that's it: the backtrace shows ctx=0x569cbfc8, i.e. ctx is only 8-byte aligned even though it contains a pipe_blend_color structure.
Moving to Mesa core since it's not really radeonsi-specific.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel