Ticket #562 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

__ipow__ method must ignore its third argument

Reported by: cwitty Owned by: somebody
Priority: minor Milestone: 0.15
Component: Code Generation Keywords:
Cc: Carl.Witty@…


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 #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.)


trac_562-ipow-crash.patch Download (0.5 KB) - added by cwitty 4 years ago.
test case that demonstrates segfault

Change History

Changed 4 years ago by cwitty

test case that demonstrates segfault

Changed 4 years ago by cwitty

  • priority changed from major to minor

Actually, I was wrong... the bug has nothing to do with #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.)

Changed 4 years ago by cwitty

  • cc Carl.Witty@… added

Changed 4 years ago by robertwb

Note: See TracTickets for help on using tickets.