Message168495
Here's the deal. import_module_level() gets called for v1 from sa (where "globals" comes from). In that function it first calls get_parent(), which returns a borrowed reference to the sa module object. Then that parent object is passed to load_next() where the actual load of v1 will take place (and the segfault happens).
The problem is that get_parent() returns a borrowed reference. When the sa module is replaced in sys.modules, the old sa module is decref'ed. That's fine except load_next is using that same module as the parent. Enter segfault, stage left.
Here's a quick patch that fixes the failure (along with a test). |
|
Date |
User |
Action |
Args |
2012-08-18 05:59:47 | eric.snow | set | recipients:
+ eric.snow, twouters, brett.cannon, gregory.p.smith, r.david.murray, nordaux |
2012-08-18 05:59:46 | eric.snow | set | messageid: <1345269586.97.0.658354884733.issue15578@psf.upfronthosting.co.za> |
2012-08-18 05:59:46 | eric.snow | link | issue15578 messages |
2012-08-18 05:59:46 | eric.snow | create | |
|