Endianness issues
kspalaiologos opened this issue · comments
The following was reported by the NetBSD maintainers:
Does not run correctly on big-endian systems.
crc32 calculation is not correct on be systems
when trying to decompress a bzip3 file and
when trying to compress a file it crashes on
line 108 in libbzip3.c claiming it can't read
the in_end variable.
Needs further investigation. I don't usually work with big endian systems, but I will try to verify these in a timely fashion...
I don't think that these claims are true since we already test against s390x, which is big endian, without any issues. Maybe it's a SPARC-specific problem. The CRC32 issue might affect only cross-endian decompression.
Verified that CRC32 calculation is correct on 64-bit big endian MIPS64.
Probably a SPARC-specific problem, if someone stumbles upon this then they're on their own.
The "crash" is probably a problem related to unaligned memory accesses which work fine on all modern CPUs.