Bug 90383 - assembly enabled mesa crashes dota2
Summary: assembly enabled mesa crashes dota2
Status: RESOLVED WONTFIX
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-09 23:08 UTC by Sylvain BERTRAND
Modified: 2015-05-12 05:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Sylvain BERTRAND 2015-05-09 23:08:23 UTC
I just changed the configure option from disable-asm to enable-asm.
With asm on, dota2 crashes upon entering a game.
Comment 1 Sylvain BERTRAND 2015-05-09 23:11:04 UTC
http://filebin.ca/21BLOQZgI8Xh/mesa.conf
http://filebin.ca/21BLZM5UsAmW/dmesg
http://filebin.ca/21BLfuazDXEf/Xorg.0.log

linux (radeon drm git), llvm git, xserver git, ati xorg drv git, mesa git
Comment 2 Michel Dänzer 2015-05-10 02:59:41 UTC
Please attach a backtrace of the crash, preferably from gdb.
Comment 3 Sylvain BERTRAND 2015-05-10 15:25:43 UTC
I can't, segfault happens into a thread with a corrupted stack (gdb says)
But I get some "Mesa: User error: GL_INVALID_OPERATION in function(invalid call)"
in log, only when asm is on.
(I suspect strongly x86 assembly code in glapi, I'm going excise it and try again)
Comment 4 Sylvain BERTRAND 2015-05-10 16:57:48 UTC
I did excise the glapi/mapi x86 assembly code. Working and no more
"Mesa: User error: GL_INVALID_OPERATION in function(invalid call)".
This is where bad things are happening.

This bug seems to be not related to my bug #90370 (radeon related), did you have a look at it?
Comment 5 Tapani Pälli 2015-05-11 05:45:00 UTC
It looks to me you are trying to do a 32bit build (?)

what is included in $steam_i686_gnu_target variable?

You should give following flags to make sure things go ok (see docs/autoconf.html):

"./configure CC="gcc -m32" CXX="g++ -m32" --build=x86_64-pc-linux-gnu --host=i686-pc-linux-gnu"
Comment 6 Sylvain BERTRAND 2015-05-11 10:54:00 UTC
It's not a multilib build. It's a standard 32 bits build on x86_64 (CC="i686-pc-linux-gnu")

So you think the issue is the assembly code from the glapi dispatch table not
compiled properly?
Comment 7 Tapani Pälli 2015-05-11 10:59:58 UTC
(In reply to Sylvain BERTRAND from comment #6)
> It's not a multilib build. It's a standard 32 bits build on x86_64
> (CC="i686-pc-linux-gnu")
> 
> So you think the issue is the assembly code from the glapi dispatch table not
> compiled properly?

Yep, you'll need the arguments in comment #5 for your build. Otherwise CCASFLAGS wont have -m32.
Comment 8 Sylvain BERTRAND 2015-05-11 17:10:24 UTC
I tried -m32. Did not change anything. -m32 and -m64 are only for a gcc
multilib toolchains. Here, it's a normal x86 toolchain, with i686-pc-gnu-gcc
calling i686-pc-gnu-as (I checked i686-pc-gnu-gcc verbose output).
Did you mean something is hardcoded in the build system for the availabily
of the -m32/-m64 flags? If yes, what is it?
Comment 9 Sylvain BERTRAND 2015-05-11 21:54:15 UTC
Well, the asm tls path is working 'ok', with only a few "Mesa: User error: GL_INVALID_OPERATION in function(invalid call)".
It's the relevant code path anyway. Let's deal with this one for good.
Comment 10 Tapani Pälli 2015-05-12 05:08:58 UTC
(In reply to Sylvain BERTRAND from comment #8)
> I tried -m32. Did not change anything. -m32 and -m64 are only for a gcc
> multilib toolchains. Here, it's a normal x86 toolchain, with i686-pc-gnu-gcc
> calling i686-pc-gnu-as (I checked i686-pc-gnu-gcc verbose output).
> Did you mean something is hardcoded in the build system for the availabily
> of the -m32/-m64 flags? If yes, what is it?

Did you have also '--build=x86_64-pc-linux-gnu --host=i686-pc-linux-gnu'? It could be that '-m32' is not necessary here (I would not count on it though because I believe libtool needs it) but at least the build and host arguments are *very* necessary because libtool makes decisions based on them. So when you feed these to autogen.sh, it should generate you proper libtool file contents.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.