Commit e18f82ad authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #934 from kmod/set_fix

Try to fix set-dtor segfault
parents ccf06236 3b44af6b
......@@ -664,7 +664,8 @@ done:
} // namespace set
void BoxedSet::dealloc(Box* b) noexcept {
assert(PyAnySet_Check(b));
// Unfortunately, this assert requires accessing the type object, which might have been freed already:
// assert(PyAnySet_Check(b));
static_cast<BoxedSet*>(b)->s.freeAllMemory();
}
......
......@@ -209,7 +209,7 @@ public:
// A "safe" tp_dealloc destructor/finalizer is one we believe:
// 1) Can be called at any point after the object is dead.
// (implies it's references could be finalized already)
// (implies it's references could be finalized already, including its class)
// 2) Won't take a lot of time to run.
// 3) Won't take up a lot of memory (requiring another GC run).
// 4) Won't resurrect itself.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment