[Bug 49139] Regression: Wine crashes on startup on FreeBSD >= 5.7

WineHQ Bugzilla wine-bugs at winehq.org
Thu May 14 00:32:54 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=49139

Gen Otsuji <otsugen0000 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #67162|dyn->d_un.d_ptr is already  |[patch for
        description|summed base address         |FreeBSD]dyn->d_un.d_ptr is
                   |                            |already summed by base
                   |                            |address

--- Comment #3 from Gen Otsuji <otsugen0000 at gmail.com> ---
Comment on attachment 67162
  --> https://bugs.winehq.org/attachment.cgi?id=67162
[patch for FreeBSD]dyn->d_un.d_ptr is already summed by base address

>--- dlls/ntdll/loader.c.orig    2020-04-24 20:09:10.000000000 +0000
>+++ dlls/ntdll/loader.c 2020-05-10 20:20:28.755105000 +0000
>@@ -1344,7 +1344,21 @@
>         {
>         case 0x60009990: init_array = (void *)((char *)map->l_addr + dyn->d_un.d_val); break;
>         case 0x60009991: init_arraysz = dyn->d_un.d_val; break;
>-        case 0x60009992: init_func = (void *)((char *)map->l_addr + dyn->d_un.d_val); break;
>+        case 0x60009992:
>+            {
>+                char * addr1 = (char *)map->l_addr;
>+                char * addr2 = (char *)dyn->d_un.d_ptr;
>+                // assumption
>+                if(addr1 < addr2)
>+                {
>+                    //FIXME("file:%s : base:%p < addr:%p\n", debugstr_w(wm->ldr.BaseDllName.Buffer), addr1, addr2);
>+                    //FIXME("file:%s : base:%p < addr:%p\n", map->l_name, addr1, addr2);
>+                    init_func = (void *)((char *)dyn->d_un.d_ptr);
>+                }
>+                else
>+                    init_func = (void *)((char *)map->l_addr + dyn->d_un.d_val);
>+                break;
>+            }
>         }
>     }
>

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list