[Python-Dev] New critical thread bug

Tim Peters tim.peters at gmail.com
Fri Nov 19 03:08:20 CET 2004


This one is a puzzler.  See

    http://www.python.org/sf/1069160

for details.  The short course is that the PyThreadState_SetAsyncExc()
implementation fell into a common trap, and can cause segfaults under
rare conditions (like every other Python thread segfault bug we've
ever had).

This is easily repaired (although I've got no interest in doing the
coding, or even in contriving a test case -- this was an obvious "by
eyeball" bug).

The puzzle is how to treat this wrt 2.4.  Since it's a critical bug, I
suppose it "should" force another release candidate.  OTOH, this is a
C-only API (there's no exposure from Python) that's never used in the
core.  We could add code to make it segfault every time <wink>, and
nothing in the distribution would notice.

OTOH, if we broke its intended behavior while fixing the bug, we'd
never know that either.  "Never used in the core" means never -- the
function isn't tested.

On the third hand, it's a simple function with an obvious segfault
mode that has an obvious fix.

I'll leave it to the release manager <wink>.


More information about the Python-Dev mailing list