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.
This commit is contained in:
bank 2012-09-30 16:28:21 +04:00
parent 12dbf49533
commit 0ebafa695c

View file

@ -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