Skip to content

Conversation

@ahaldane
Copy link
Member

Fixes #4855. Only real change was Py_DECREF(result) became Py_XDECREF(result).

I assume the other logic there is fine, I don't know ufunc code very well.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is quite right here (or below), as a NULL return indicates that PyArray_GenericBinaryFunction encountered an error. Probably something like

if (result == NULL) {
    PyErr_Clear();
}
else {
    Py_DECREF(result);
}

Somehow I think the logic in this function can be cleaned up, but that might be for another day.

@ahaldane ahaldane force-pushed the fix4855 branch 2 times, most recently from a696688 to bee7fe5 Compare June 12, 2015 14:45
@ahaldane
Copy link
Member Author

That makes a lot more sense, I had thought TypeError was the expected output.

Updated + added a test.

@ahaldane
Copy link
Member Author

Oh, I just noticed that #5864 probably fixes this in a better way. Feel free to take the unit test for use there, if wanted.

@charris
Copy link
Member

charris commented Jun 14, 2015

I copied the test to #5965. The problem should be fixed by #5964, so closing this and the issue. Thanks for the work.

@charris charris closed this Jun 14, 2015
charris referenced this pull request Jun 14, 2015
TST: Add test for segfault in richcompare of void type ==, !=.
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.

2 participants