Python 2.7 segfaults on 'import site'

Chris Angelico rosuav at gmail.com
Mon Dec 29 21:05:11 EST 2014


On Tue, Dec 30, 2014 at 12:40 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> Chris Angelico wrote:
>
>> Unlike playing with sre_constants.pyc, this one *does* result in a
>> different file after renaming away the .pyc. So somehow, SOMEHOW, the
>> .pyc file became corrupt. Is this something worth reporting? I now
>> have what appears to be a file whose presence in the current directory
>> can crash Python.
>
> Time to run some SMART tests on your hard drive, methinks.

There's no other evidence of failure, SMART data shows no errors, and
I can copy the file to another directory and replicate the issue. It
appears to be a perfectly normal file, and one that can crash Python.
But maybe this falls into the same category as "you can crash Python
with ctypes, it's pretty easy".

Are .pyc files compatible across revisions? Could I carry this file to
a 2.7.9 and see if the crash still happens?

ChrisA



More information about the Python-list mailing list