WineHQ
Bug Tracking Database – Bug 38826

 Bugzilla

 

Last modified: 2015-10-10 11:12:00 CDT  

Dragon Age Origins crashes in msvcr80 due to unaligned SSE stack access (OSX, clang version 3.7.0 trunk 239386 produces faulty code)

Bug 38826 - Dragon Age Origins crashes in msvcr80 due to unaligned SSE stack access (OSX, clang version 3.7.0 trunk 239386 produces faulty code)
Dragon Age Origins crashes in msvcr80 due to unaligned SSE stack access (OSX,...
Status: CLOSED NOTOURBUG
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: -unknown
1.7.46
x86 Mac OS X
: P2 normal
: ---
Assigned To: Mr. Bugs
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2015-06-28 12:09 CDT by Kurt
Modified: 2015-10-10 11:12 CDT (History)
2 users (show)

See Also:
Regression SHA1:
Fixed by SHA1:
Distribution: ---
Staged patchset:


Attachments
Crash backtrace. (17.11 KB, text/plain)
2015-06-28 12:09 CDT, Kurt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kurt 2015-06-28 12:09:51 CDT
Created attachment 51766 [details]
Crash backtrace.

Dragon Age Origins crashes after showing the intro sequence, with the backtrace attached.
Just for curiosity, I bisected to wine-1.7.20. It crashes at the very same location.
Comment 1 Anastasius Focht 2015-06-28 16:44:54 CDT
Hello folks,

I can't confirm this, the game works fine here on Linux.

WineHQ appdb also doesn't list a blocker: https://appdb.winehq.org/objectManager.php?sClass=application&iId=10457

Your backtrace shows 'andps xmm0,0x8(%ebp)' SSE instruction with a misaligned stack variable access.
With 32-bit Wine build on OSX there should be a stack realign in function prolog code.
Looking at the thread context of the faulting instruction I don't see ECX being in ESP range (ECX is usually clobbered with ESP(+4) when stack realign happens).

My guess would be it's your Wine build/tooling on OSX being broken/your problem.

---

Unrelated to this there is a lot of msvcrt stub spam emitted during the game, slowing things down.

--- snip ---
fixme:msvcrt:__crtGetStringTypeW (unk 0, type 1, wstr 0x536e554(1), 0x536e558) partial stub
--- snip ---

$ wine --version
wine-1.7.46

Regards
Comment 2 Kurt 2015-06-29 11:01:39 CDT
(In reply to Anastasius Focht from comment #1)
> Your backtrace shows 'andps xmm0,0x8(%ebp)' SSE instruction with a
> misaligned stack variable access.
> With 32-bit Wine build on OSX there should be a stack realign in function
> prolog code.
> Looking at the thread context of the faulting instruction I don't see ECX
> being in ESP range (ECX is usually clobbered with ESP(+4) when stack realign
> happens).
> 
> My guess would be it's your Wine build/tooling on OSX being broken/your
> problem.

Thanks for the nice diagnosis. I tried another compiler as you suggested:
* "clang version 3.7.0 (trunk 239386)" produces faulty code
* Yosemite's default compiler "Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)" works

In both cases, passing "-mstackrealign" in CFLAGS does not matter.

Should this be submitted to clang?
Comment 3 Austin English 2015-06-29 12:08:35 CDT
(In reply to Kurt from comment #2)
> Thanks for the nice diagnosis. I tried another compiler as you suggested:
> * "clang version 3.7.0 (trunk 239386)" produces faulty code
> * Yosemite's default compiler "Apple LLVM version 6.1.0 (clang-602.0.53)
> (based on LLVM 3.6.0svn)" works
> 
> In both cases, passing "-mstackrealign" in CFLAGS does not matter.
> 
> Should this be submitted to clang?

You might consider bisecting clang first, but yes.
Comment 4 Austin English 2015-06-29 12:09:11 CDT
UPSTREAM issue
Comment 5 Kurt 2015-10-09 08:57:10 CDT
Fixed upstream, see https://llvm.org/bugs/show_bug.cgi?id=22371
Comment 6 Matteo Bruni 2015-10-10 11:12:00 CDT
(In reply to Kurt from comment #5)
> Fixed upstream, see https://llvm.org/bugs/show_bug.cgi?id=22371

Thank you for the update, closing bug.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to privacy@winehq.org

Hosted By CodeWeavers