On 18/08/14 11:08 AM, Christian Weisgerber wrote:
On 2014-08-18, Brad Smith <b...@comstyle.com> wrote:

Here is a diff to enable the uTP support with Transmission. It looks
like the unaligned accesses issues were fixed a tad under 2 years ago.

What makes you think so?  The only relevant difference between 2.30
and 2.84 is that structs are now individually marked as packed too,
but that should be a nop because the whole section is bracketed by
#pragma pack anyway.

The problem is that the seq_nr and ack_nr fields in PacketFormat
(in utp.cpp) are misaligned.  I don't quite know under what
circumstances gcc should handle direct loads/stores of these fields,
but in practice where pointers to different structs are cast back
and forth and eventually dereferenced, this blows up.

Any Transmission users able to test especially on say sparc64?

Yes, but the code hasn't changed.

There have been some fixes that went in to try and deal with the
alignment issues.

https://trac.transmissionbt.com/changeset?reponame=&new=12466%40trunk%2Fthird-party%2Flibutp%2Futp.cpp&old=12140%40trunk%2Fthird-party%2Flibutp%2Futp.cpp

https://trac.transmissionbt.com/changeset?reponame=&new=12603%40trunk%2Fthird-party%2Flibutp%2Futp.cpp&old=12583%40trunk%2Fthird-party%2Flibutp%2Futp.cpp

https://trac.transmissionbt.com/changeset?reponame=&new=13620%40trunk%2Fthird-party%2Flibutp%2Futp.cpp&old=13317%40trunk%2Fthird-party%2Flibutp%2Futp.cpp

and from what I can find with some of the tickets
from Transmission and libuTP this was an issue on
sparc..

https://trac.transmissionbt.com/changeset?reponame=&new=13646%40trunk%2Fthird-party%2Flibutp%2Futp.cpp&old=13620%40trunk%2Fthird-party%2Flibutp%2Futp.cpp


https://trac.transmissionbt.com/ticket/5128
https://trac.transmissionbt.com/ticket/5143

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply via email to