dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 93551] Divinity: Original Sin Enhanced Edition(Native) crash on start
Date: Thu, 31 Mar 2016 13:11:53 +0000	[thread overview]
Message-ID: <bug-93551-502-bPc5CARHyb@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-93551-502@http.bugs.freedesktop.org/>


[-- Attachment #1.1: Type: text/plain, Size: 2517 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=93551

--- Comment #6 from smidjar2.reg@email.cz ---
I disassembled ApplyConstants() where the game crashes when using OpenGL
override to 4.2. It is indeed a game bug, caused by possible NULL dereference.
Crash occurs at line marked by =>

   0x00007ffff48467e0 <+0>:    push   r15
   0x00007ffff48467e2 <+2>:    push   r14
   0x00007ffff48467e4 <+4>:    push   r12
   0x00007ffff48467e6 <+6>:    push   rbx
   0x00007ffff48467e7 <+7>:    push   rax
   0x00007ffff48467e8 <+8>:    mov    r14,rdi
   0x00007ffff48467eb <+11>:    mov    eax,DWORD PTR [r14+0x6f8]
   0x00007ffff48467f2 <+18>:    mov    rcx,QWORD PTR [rip+0xd297]        #
0x7ffff4853a90
   0x00007ffff48467f9 <+25>:    cmp    eax,DWORD PTR [rcx]
   0x00007ffff48467fb <+27>:    je     0x7ffff4846959
<_ZN3api14OpenGLRenderer14ApplyConstantsEv+377>
   0x00007ffff4846801 <+33>:    xor    r15d,r15d
   0x00007ffff4846804 <+36>:    test   eax,0x3ff0000
   0x00007ffff4846809 <+41>:    je     0x7ffff4846845
<_ZN3api14OpenGLRenderer14ApplyConstantsEv+101>
   0x00007ffff484680b <+43>:    movzx  ecx,ax
   0x00007ffff484680e <+46>:    mov    edx,DWORD PTR [r14+0xc4]
   0x00007ffff4846815 <+53>:    xor    r15d,r15d
   0x00007ffff4846818 <+56>:    cmp    rcx,rdx
   0x00007ffff484681b <+59>:    jae    0x7ffff4846845
<_ZN3api14OpenGLRenderer14ApplyConstantsEv+101>
   0x00007ffff484681d <+61>:    shr    eax,0x10
   0x00007ffff4846820 <+64>:    mov    rdx,QWORD PTR [r14+0xe0]
   0x00007ffff4846827 <+71>:    xor    r15d,r15d
   0x00007ffff484682a <+74>:    movzx  edx,WORD PTR [rdx+rcx*2]
   0x00007ffff484682e <+78>:    and    eax,0x3ff
   0x00007ffff4846833 <+83>:    cmp    eax,edx
   0x00007ffff4846835 <+85>:    jne    0x7ffff4846845
<_ZN3api14OpenGLRenderer14ApplyConstantsEv+101>
   0x00007ffff4846837 <+87>:    imul   r15,rcx,0x110
   0x00007ffff484683e <+94>:    add    r15,QWORD PTR [r14+0xb8]
=> 0x00007ffff4846845 <+101>:    mov    rcx,QWORD PTR [r15+0x10]
   ......


//0x00007ffff48467eb:
  eax = this->variable_at_offset_0x6f8
//0x00007ffff48467f2:
  rcx = some_related_global_or_static_variable
//0x00007ffff48467fb:
  if (eax != rcx) {
    // 0x00007ffff4846801:
    r15 = NULL
    if ((eax & 0x3ff0000) != 0) {
       // ...
       // r15 is set in this block to valid value
       // ...
    }
    // 0x00007ffff4846845:
    rcx = r15->variable_at_offset_0x10 // crash here because r15 can be NULL
  }
// function end

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 3500 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-03-31 13:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-01  8:07 [Bug 93551] Divinity: Original Sin Enhanced Edition(Native) crash on start bugzilla-daemon
2016-01-01  8:10 ` bugzilla-daemon
2016-01-04 15:28 ` bugzilla-daemon
2016-01-09 22:01 ` bugzilla-daemon
2016-01-17 22:28 ` bugzilla-daemon
2016-01-18 21:20 ` bugzilla-daemon
2016-03-31 13:11 ` bugzilla-daemon [this message]
2016-03-31 13:28 ` bugzilla-daemon
2016-03-31 14:45 ` bugzilla-daemon
2016-03-31 15:49 ` bugzilla-daemon
2016-04-26  6:49 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-93551-502-bPc5CARHyb@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).