You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In linbox/blackbox/apply.h, around line 629, there is the following code:
for (size_t j=0; j<_n; j++) {
// up to 53 bits will be ored-in, to be summed later
unsigned char* bitDest = combined;
bitDest += (size_t)rclen*((i % (size_t)rc)*_n+j);
long long mask = static_cast<long long>(ctd[j]);
bitDest += 2*i;
long long tmp;
memcpy(&tmp,bitDest,sizeof(long long));
tmp |= mask;
memcpy(bitDest,&tmp,sizeof(long long));
}
This code causes a crash (and hence a test suite failure) on 32 bit ARM where unaligned memory access is not supported. There may be additional places with this kind of code. (the alignment issue has been fixed as of b79fb13) It'll also fail on big endian platforms such as PowerPC and S390x. Please decide if you want to support platforms that have big-endian orientation or do not permit unaligned memory access and if yes, fix the code so it works on them.
The text was updated successfully, but these errors were encountered:
clausecker
changed the title
Unaligned memory access in LinBox::BlasMatrixApplyDomain
Endianess-dependent code in LinBox::BlasMatrixApplyDomain
Jul 28, 2022
In
linbox/blackbox/apply.h
, around line 629, there is the following code:This code causes a crash (and hence a test suite failure) on 32 bit ARM where unaligned memory access is not supported. There may be additional places with this kind of code.(the alignment issue has been fixed as of b79fb13) It'll also fail on big endian platforms such as PowerPC and S390x. Please decide if you want to support platforms that have big-endian orientationor do not permit unaligned memory accessand if yes, fix the code so it works on them.The text was updated successfully, but these errors were encountered: