Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-14306 (GitHub Actions) clang-cl 10 reports some warnings: review/fix them
  3. CORE-14310

MmMapViewOfArm3Section(): "ntoskrnl\mm\ARM3\section.c(2899,23) : warning: comparison 'ULONG_PTR' (aka 'unsigned long') > 4294967295 is always false [-Wtautological-constant-compare]"

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Fixed
    • Minor
    • 0.4.10
    • NTCore
    • None

    Description

      MmMapViewOfArm3Section()

      Ftr, the 2 previous blocks use ULONG64.

      This 3rd block is warned.

      2892     /* Check if the caller did not specify a view size */
      2893     if (!(*ViewSize))
      2894     {
      2895         /* Compute it for the caller */
      2896         *ViewSize = (SIZE_T)(Section->SizeOfSection.QuadPart - SectionOffset->QuadPart);
      2897 
      2898         /* Check if it's larger than 4GB or overflows into kernel-mode */
      2899         if ((*ViewSize > 0xFFFFFFFF) ||
      2900             (((ULONG_PTR)MM_HIGHEST_VAD_ADDRESS - (ULONG_PTR)*BaseAddress) < *ViewSize))
      2901         {
      2902             DPRINT1("Section view won't fit\n");
      2903             return STATUS_INVALID_VIEW_SIZE;
      2904         }
      2905     }

      It feels like this block too should use ULONG64.

      This code was added as is in r48997 by "sir_richard".

      Attachments

        Activity

          People

            bug zilla Bug Zilla
            Serge Gautherie Serge Gautherie
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: