-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch unaligned 64-bit atomic operation panic #37
Patch unaligned 64-bit atomic operation panic #37
Conversation
Damn, does it really take that much?! |
Was moving the stat block to the beginning of the struct not enough? What if it's detached and pointed to instead of embedded? |
You're right, I looked through the code a little more and found that if i move the "traversal" block to the beginning of "Announce" struct in "announce.go" that also solves the problem. Working on 32-bit systems. I am revoking this pull request. |
A simpler solution is also available. |
@silentmurdock I commented about this in anacrolix/torrent#483 (comment) but got feedback to the contrary from @compliment . Can you confirm the patch in the linked comment fix this for you on the platforms you're using? |
This is fd60ad0
Are you sure this worked for you and you didn't have your own patch applied? |
Thanks for chasing this up. I'll follow this up when you guys determine the best way forward. |
The fd60ad0 didn’t work for me either, I used my own patch solution first: torrent-issue-483_solution_2.zip Anacrolix's solution didn't work before, because he modified only the "traversal.go" file, but "announce.go" has an other struct that need to be modified. I extended his solution, so it works now: torrent-issue-483_solution_1.zip Both versions work, but I think Anacrolix's modified solution is simpler and faster. Which one do we use? |
I think mine is simpler. It would be great if this was checked in CI. It's recently moved to GitHub actions if you're keen/know how to implement that. |
Unfortunately, CircleCI does not contain 32-bit images. I don’t feel so confident in using CI. Maybe if we compile the 32-bit code on a 64-bit system image and run the tests there. (Example - run: GOOS = linux GOARCH = arm GOARM = 6) |
@anacrolix Can you add the changes because my app doesn't work without it? I don’t want to use a vendor library in my project. I tested it manually on arm, linux, windows 32 bit systems. I will be working on a CI test solution in the future. |
Fix unaligned 64-bit atomic operation panic to support 32-bit architectures too.