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

__ipow__ method must ignore its third argument #1122

Closed
robertwb opened this issue Jul 27, 2010 · 4 comments
Closed

__ipow__ method must ignore its third argument #1122

robertwb opened this issue Jul 27, 2010 · 4 comments

Comments

@robertwb
Copy link
Contributor

robertwb commented Jul 27, 2010

Evidently the Python position is that it's OK to pass garbage as the third argument of a .nb_inplace_pow() method; see http://bugs.python.org/issue1653736 and http://svn.python.org/view/python/branches/release25-maint/Objects/typeobject.c?r1=53690&r2=53689&pathrev=53690 . In this case, it might be a good idea to forbid the user from writing crashy code.

(I don't know how to trigger the particular call referenced above without the patch on http://trac.cython.org/ticket/561, and the next version of that patch will be changed to avoid the problem. So I don't know of an actual test case for this problem.)

At 2010-07-27T23:31:25Z @cwitty added attachment trac_562-ipow-crash.patch

Migrated from http://trac.cython.org/ticket/562

@robertwb
Copy link
Contributor Author

robertwb commented Jul 27, 2010

@cwitty changed priority from major to minor
commented

Actually, I was wrong... the bug has nothing to do with http://trac.cython.org/ticket/561. This test case reliably segfaults for me, against current cython-devel. (I still don't think it's a major bug, though, since you have to do something quite strange to trigger it.)

@robertwb
Copy link
Contributor Author

@cwitty changed cc to Carl.Witty@gmail.com
commented

@robertwb
Copy link
Contributor Author

@robertwb commented

Merged test case http://hg.cython.org/cython-devel/rev/999a6d08631d

@robertwb
Copy link
Contributor Author

@dalcinl changed resolution to fixed
status from new to closed
commented

Fixed, and test enabled:

490fc80
490fc80

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

No branches or pull requests

1 participant