Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-17614

osk!__rt_sdiv causes crash in Windows msvcrt.dll on ARM

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Trivial
    • 0.4.15
    • CRT
    • Windows 10 ARM

    Description

      Steps to reproduce:

      (60.848): Access violation - code c0000005 (first chance)
      msvcrt!memcpy_strict_align+0x13a:
      763fcac2 f903070d vst1.8      {d0},[r3]!              00000002=????????????????
      0:000> kp
       # Child-SP RetAddr  Call Site
      00 00e4f4f8 011c2b16 msvcrt!memcpy_strict_align+0x13a
      01 00e4f500 011c13ce osk!__rt_sdiv(int divisor = 0n89, int dividend = 0n711)+0x1e [sdk\lib\crt\math\arm\__rt_sdiv.c @ 24] 
      02 00e4f528 011c1602 osk!OSK_DlgInitDialog(struct HWND__ * hDlg = 0x00040134)+0x146 [base\applications\osk\main.c @ 198]
      

      See analysis of the problem discussion here: https://chat.reactos.org/reactos/pl/qxo7iqiypjbf5qf9mwufntdpfh

      Comment from ThePhysicist:

      Yes, __rt_sdiv is supposed to return the result in r0, r1, but the c compiler passes it as the first parameter. I can have a look.

      Full debug log from WinDbg: osk_arm_dbg.txt

      Attachments

        1. arm_div_hack.patch
          1 kB
          Stas'M
        2. osk_arm_dbg.txt
          6 kB
          Stas'M

        Issue Links

          Activity

            People

              ThePhysicist Timo Kreuzer
              binarymaster Stas'M
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: