New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault with radeonsi in LLVMAddTargetDependentFunctionAttr #163
Comments
This looks like some incompatibility llvm svn vs mesa git, but I don't explain why you'd hit it with nine only. |
Archlinux with llvm svn 254142 and latest mesa git + ixit git and latest wine git + ixit git and it still happens. Can anyone reproduce it? Can anyone not reproduce it with similar versions? |
I have this bug as well, it happens with both Arch's stock Mesa (currently 11.0.7) and stock LLVM (currently 3.7) and mesa-git + llvm-svn. Heres the crash report it spits out, which shows it happening in the same call chain as the OP. It happens in anything using d3dadapter.so for me, so this seems reproducible with AMD hardware on Arch. I have a 290 for reference in case this is some device-specific issue. |
HD 7970M for me. Should we report this upstream at mesa? Then someone who also works on the llvm side could take a look at it. But first, a backtrace with full debug info for llvm might be good to have. |
I am on opensuse 42.1 (gcc 4.8) and every 3-5 days i build llvm\mesa snapshot and nine always works fine. |
log from #178
|
Someone reported it to mesa: https://bugs.freedesktop.org/show_bug.cgi?id=93425 |
For people not reading the other thread, this crash is caused by a movaps instruction that tries to access unaligned memory: I suppose this is related to how windows / wine thinks applications should be 4 byte aligned, while the linux ABI thinks stuff should be 16 byte aligned: https://bugs.archlinux.org/task/27560 So I built llvm with gcc's -mstackrealign option like this:
and it works. |
For users of the archlinux [mesa-git] repository, there's an update for llvm now that is built with -mstackrealign. At least for me this works now. I've also created https://bugs.archlinux.org/task/47450, let's see what they say. |
I've just tested several permutations of LLVM compiles as well to see what fixes this bug - for me, only the BUILD_TYPE=debug or relwithdebinfo work, and mstackrealign has no effect. I currently have my own version of lib32-llvm-libs 3.7.0-4 built as debinfo that works with d3dadapter, and has little performance impact. |
Everything works now with packages (llvm) from mesa-git repo. While not the best solution, the speed is worth it. Went from 9 fps to 30 in some cpu / gpu intensive scenes in fallout(nv)! Just to be clear, the packages that more than one people are saying that work, are compiled only with mstackrealign and without changing the release type. |
It looks like stackrealign is required for llvm when using nine. |
Can this be worked around in how wine makes these calls? In the archlinux bug report the maintainer of the llvm package was not thrilled about compiling the system wide llvm installation with stackrealign. Perhaps with
? |
Yeah, probably we could use this attributes on nine entry functions. |
Note this seems mostly required for the 32 bits build (of llvm or nine, on the two needs to have the attribute) and not for 64 bits. |
The patch that fixes it for me is on master (doesn't require -mstackrealign for nine or llvm). |
Sent upstream, etc. |
wine-1.7.55 with latest nine patches from git.
Latest mesa git.
llvm-svn 253143.
Everything crashes with nine, but works with wined3d.
Backtrace with debug mesa:
https://gist.githubusercontent.com/ChristophHaag/b277cee468a06dec275e/raw/1c834b35e1e039ba0939b830ec4f39d76834b7c4/gistfile1.txt
The text was updated successfully, but these errors were encountered: