When dumping invalid objects, we may as well avoid segfaults if possible. This allows us to extract as much information as possible before dieing, which may be handy in release builds etc. Trivial patch just to get started (as I actually hit this block!). Assign back if you are OK with it, or I will be OK with you not wanting to start this slippery slope.
Logged In: YES user_id=31435 Do you think this helps? I'm OK with it either way. Normally, this routine doesn't exist in a release build, and in the debug build if we didn't segfault we'd end up calling Py_FatalError() after it returned. BTW. since we're on Windows, would it be simpler to call the Win32 IsBadReadPtr()?