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

BUG: void dtype setup checked offset not actual pointer for alignment #11180

Merged
merged 1 commit into from
May 29, 2018

Conversation

seberg
Copy link
Member

@seberg seberg commented May 28, 2018

This commit also adds an assert and closes gh-11088


Ok, the assert, its still in there with sizeof, which is probably OK here, but not right generally....

@seberg
Copy link
Member Author

seberg commented May 28, 2018

OK, silly me, the problem was that the macro is defined in the local file, and it was defined below... and I missed the first error ;).

@seberg
Copy link
Member Author

seberg commented May 28, 2018

Maybe the macro should be moved all the way up, it is probably pretty random there.

@@ -760,7 +771,8 @@ _setup_field(int i, PyArray_Descr *descr, PyArrayObject *arr,
}

((PyArrayObject_fields *)(arr))->descr = new;
if ((new->alignment > 1) && ((offset % new->alignment) != 0)) {
if ((new->alignment > 1) && (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ( would look better on the next line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Committer can fix later if needed.

@charris
Copy link
Member

charris commented May 28, 2018

LGTM.

@charris charris added this to the 1.14.4 release milestone May 28, 2018
@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label May 29, 2018
@charris charris merged commit 52cf8c8 into numpy:master May 29, 2018
@charris
Copy link
Member

charris commented May 29, 2018

Thanks Sebastian.

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label May 29, 2018
@seberg seberg deleted the sparc-void-fix branch May 29, 2018 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.14.3 on sparc64: numpy.core.tests.test_multiarray.TestMethods.test__complex__should_not_work ... Bus error
2 participants