pombreda / unladen-swallow

Automatically exported from code.google.com/p/unladen-swallow
Other
0 stars 0 forks source link

Segfault in Unladen trunk@head #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Running Lib/test/regrtest.py against Unladen trunk@head results in a 
reproducible segfault in test_sys. Running test_sys in an infinite loop (same 
process) does not reproduce the bug, nor does running smaller subsets of the 
tests run by regrtest.py

Running with -v produces this:
test_sys
test_43581 (test.test_sys.SysModuleTest) ... ok
test_attributes (test.test_sys.SysModuleTest) ... ok
test_bailerror (test.test_sys.SysModuleTest) ... ok
test_clear_type_cache (test.test_sys.SysModuleTest) ... Bus error

The problem has not shown up on the trunk buildbots.

Original issue reported on code.google.com by collinw on 11 Dec 2009 at 9:38

GoogleCodeExporter commented 9 years ago
This must be related to the attribute lookup optimizations, since I modified
_PyType_Lookup.  I can't reproduce on Linux, so I'm working on updating and 
building
Unladen under OS X.

Original comment by reid.kle...@gmail.com on 12 Dec 2009 at 6:45

GoogleCodeExporter commented 9 years ago
I'm unable to reproduce this.  I'm starting to think that the real problem is 
that I
added a member to the end of PyTypeObject, which when allocated as a global 
defaults
to NULL.  However, if any one is allocating a PyTypeObject on the heap without
initializing it to 0, then we could see a junk value there.

The nondeterminism of test_sys failing when run via regrtest and not when run 
alone
suggests that this is an uninitialized memory bug.

Another possible source of the problem is a C extension module that didn't get
rebuild when I modified object.h.

Original comment by reid.kle...@gmail.com on 12 Dec 2009 at 6:12

GoogleCodeExporter commented 9 years ago
This looks like it was related to the segfault fixed in r941, since I can't 
provoke it 
anymore after that change. Will reopen if it returns.

Original comment by collinw on 22 Dec 2009 at 2:27