eiskaltdcpp/eiskaltdcpp — pull request #25 by DorianScholz (2013-07-23 10:15:30+00:00)
Title: fix crash in calculation of Tiger hash on ARM cpus

The Tiger hash C++ code inherited from DC++ crashes with a SIGBUS on ARM (arm7le here), because of unaligned memory access in dcpp/TigerHash.cpp line 202.

The problem was fixed i.e. in the tthsum tool version 1.3.0 [1], which comes from the same original C code [2] as the DC++ Tiger hash C++ implementation. But porting these changes to the C++ implementation would be quite some work, if you look at the diff for tthsum 1.2 vs 1.3.

So the easier way was to use librhash's [3] Tiger hash implementation, which does not have this bug and is actively maintained. Using this will also allow to profit from future bug fixes.

I have not made any performance comparison though, so if you prefer it to only be enabled on ARM, thats fine with me. But the current version of eiskaltdcpp simply crashes on ARM right after starting a download...

[1] http://tthsum.devs.nu/svn/trunk/tthsum/CHANGES.txt
[2] http://www.cs.technion.ac.il/~biham/Reports/Tiger/
[3] http://sourceforge.net/apps/mediawiki/rhash/index.php?title=LibRHash