On Fri, Apr 08, 2016 at 10:27:00PM +0200, Vincent Bernat wrote: > ??? 8 avril 2016 22:17 +0200, Vincent Bernat <ber...@luffy.cx> : > > > On some architectures, unaligned access is not authorized. On most > > architectures, it is just slower. Therefore, we have to use memcpy() > > when an unaligned access is needed, specifically when writing the qinfo. > > > > Also remove the unaligned access when reading answer count when reading > > the answer. It's likely that this instruction was optimized away by the > > compiler since it is unneeded. Add a comment to explain why we use 7 as > > an offset instead of 6. Not an unaligned offset since "resp" is > > "unsigned char", then promoted to int. > > I did very little testing. Just: > > backend be > server s1 www.google.com:80 > server s2 www.google.ch:80 > > Works fine on sparc64.
BTW, armv5 is very handy to test alignment. By default it does crap (silent read of the wrong word) but you can configure it to fault or to emulate the alignment. I've found lots of such issues with just a Seagate Dockstar. Thanks, Willy