Преглед на файлове

Fix crash on RHEL-based distros.

Looks like GCC (4.4.x) on RHEL is built with some optimization flags, which caused crash inside assembler code (when using inline-cast: uint->uchar->uint from GetNzbSubID down to find_maskwidth).
Tested this change on 7 different distros, so far - everything seems to be working.
bank преди 13 години
родител
ревизия
0ebafa695c
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      Engine/source/platform/platformCPUCount.cpp

+ 3 - 3
Engine/source/platform/platformCPUCount.cpp

@@ -522,9 +522,9 @@ next:
                // processors per core
 
                tblSMTID[j]  = GetNzbSubID(apicID, MaxLPPerCore, 0);
-               tblCoreID[j] = GetNzbSubID(apicID, 
-                  MaxCorePerPhysicalProc(),
-                  (unsigned char) find_maskwidth(MaxLPPerCore));
+               unsigned char maxCorePPP = MaxCorePerPhysicalProc();
+               unsigned char maskWidth = find_maskwidth(MaxLPPerCore);
+               tblCoreID[j] = GetNzbSubID(apicID, maxCorePPP, maskWidth);
 
                // Extract package ID, assume single cluster.
                // Shift value is the mask width for max Logical per package