Skip to content
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

remove 2 bytes offset from align #177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fmina
Copy link

@fmina fmina commented Feb 14, 2017

@HannesSommer This fixes #176, but not sure if it generalizes to all platforms.

@ethzasl-jenkins
Copy link

Can one of the admins verify this patch?

@HannesSommer
Copy link
Contributor

add to whitelist

@HannesSommer
Copy link
Contributor

This is a pretty tough one. I don't believe your solution is right. It should lead to memory corruption in case the allocated isn't already aligned, because without the +16 or similar you might end up accessing memory in front of the allocated area (storage.bytes). The & makes the address always smaller. I wonder what lead to this problem on you side.
Could you easily add this as a unit test to the library? Then we can more easily test on different platforms. (jenkins is testing on ubuntu inidigo, xenial and some OSX )

Just add another member function below here that tests what you did for some fixed size eigen matrix:
https://github.com/ethz-asl/Schweizer-Messer/blob/master/numpy_eigen/test/numpy_eigen_tests.py#L111

The test_eigen function is currently skipped on Mac OS because something unknown is broken since ages. Maybe exactly what you've just discovered. I never had both time and motivation to look deeper into it. In general I'm afraid SM should officially drop Mac OS support unless somebody is volunteering to maintain it. I don't even have the means to to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

numpy_eigen conversion to eigen is not working correctly
3 participants