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

UInt32x32To64 from autogenerated winnt.h breaks RPC

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Fix Version/s: 0.3.17
    • Component/s: CRT
    • Labels:
    • Module:
    • Guilty Revision:
      64,016

      Description

      Starting with r64016, RPC in second stage seems to fail:
      https://build.reactos.org/builders/Linux_AMD64_1%20KVM-Test/builds/6998/steps/test/logs/stdio

      According to a diff of the disassembly for ntdll, the code differences are caused by different definitions of Int32x32To64 and Int64ShrlMod32.

      Examples of functions with binary differences are CsrCaptureTimeout and LdrpInitSecurityCookie, respectively.

      The following change seems to make the differences go away:

      --- include/psdk/winnt.h	(revision 64017)
      +++ include/psdk/winnt.h	(working copy)
      @@ -741,3 +741,3 @@
          asm functions, the compiler can optimize this better. */
      -#define Int32x32To64(a,b) (((__int64)(long)(a))*((__int64)(long)(b)))
      +#define Int32x32To64(a,b) (((__int64)(a))*((__int64)(b)))
       #define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b)) 
      @@ -753,3 +753,3 @@
        #define Int64ShraMod32(a,b) __ll_rshift(a,b)
      - #define Int64ShrlMod32(a,b) __ull_rshift(a,b)
      + #define Int64ShrlMod32(a,b) (((unsigned __int64)(a))>>(b))
       #endif

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ThePhysicist Timo Kreuzer
                Reporter:
                ThFabba ThFabba
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: