-
Notifications
You must be signed in to change notification settings - Fork 524
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
Avoid unaligned memory accesses in conversion functions #904
Conversation
No guarantees are provided for the alignment of the buffers used for the various conversion functions, and in the case of packed structs (easily creatable with np.dtype, and in fact the test suite does so on the odd occasion) they definitely can be unaligned. Therefore exclusively use memcpy for multi-byte accesses to these buffers. The test suite now passes on Linux sparc64, which was previously crashing due to unaligned accesses.
AppVeyor failure is due to the Python35 (32-bit) build:
|
Reran appveyor, LGTM |
Thanks! I'll let this set a bit longer to see if it attracts any other attention, but 👍 to merging. Between this and #903 I think we should to a 2.7.1 next week. |
@tacaswell That sounds good |
@tacaswell Feel free to ping me when |
@ghisvail If I recall correctly we were seeing failures on sparc in the debian build system. Do I recall correctly and would it be possible to get this run through that before merging this? Is the cost of getting that tested an rc ;) ? |
@tacaswell I actually tested this patch by adding it to the (admittedly, 2.7.0) Debian package and building on a sparc64 machine |
I fully trust James on this. I don't think an RC is necessary, better just to roll a point release out and iterate if need be. |
@tacaswell Are you planning a new release, or shall I apply the patch to the packaging? |
Hopefully this week.....I am thoroughly over-subscribed |
Friendly ping :) |
Making progress, see #913 |
No guarantees are provided for the alignment of the buffers used for the various conversion functions, and in the case of packed structs (easily creatable with np.dtype, and in fact the test suite does so on the odd occasion) they definitely can be unaligned. Therefore exclusively use memcpy for multi-byte accesses to these buffers. The test suite now passes on Linux sparc64, which was previously crashing due to unaligned accesses.