The attached code worked fine in Python 2.3 and prior, but broke in a recent version of Python 2.4 (I think between the alpha and beta, but I'm not sure). It now causes a Segmentation fault, at least on my Linux boxes (2.4.18 and 2.4.22). For those not looking at the attachment, the code is essentially: import re re.match (...big regular expression..., 'December 20, 1997', re.IGNORECASE) The code works if the re.IGNORECASE flag is omitted. I hope I'm not doing anything stupid in installation... I tried both CVS head and 2.4c1, both with-pyalloc and without-pyalloc.
Logged In: YES user_id=265183 An update: The same code crashes (general protection fault) on a vanilla install of 2.4c1 on Windows XP using the MSI installer. So I don't think it's my installation.
Logged In: YES user_id=265183 FYI, this bug remains in 2.4final, which is a shame to me (but probably just a timing mishap), as it makes 2.4 unusable to me. However, the exact version I attached before does seem to work on on 2.4final on WindowsXP, but still not on Linux. Attached is a version that still fails on 2.4final on all systems I've tried. The only difference is using re.compile(...).match instead of re.match.
Logged In: YES user_id=7887 I'm really sorry for not fixing this before 2.4 final. The only reason it wasn't fixed is because I wasn't aware about it until yesterday. The problem is fixed in CVS on revision 2.110 of _sre.c. The patch is also attached for reference. Thank you very much for reporting it Erik, and thanks you for pointing the bug to me Raymond.