Fix _overlapped segfault and missing _winapi constants#6907
Fix _overlapped segfault and missing _winapi constants#6907youknowone merged 1 commit intoRustPython:mainfrom
Conversation
- Fix from_windows_err using new_exception_empty on OSError subclasses (ConnectionRefusedError, ConnectionAbortedError), which caused segfault in release builds due to debug_assert on type size mismatch - Move ConnectPipe from instance method to module-level function - Add Destructor for Overlapped to cancel pending I/O on object cleanup - Add NMPWAIT_NOWAIT, NMPWAIT_USE_DEFAULT_WAIT, NMPWAIT_WAIT_FOREVER constants to _winapi
📝 WalkthroughWalkthroughThis PR refactors Windows overlapped I/O error handling by simplifying errno translation to a generic IO error, adds explicit destructor support to the Overlapped pyclass with cleanup semantics, reintroduces ConnectPipe as a standalone function, and exposes three new pipe-related constants in the Windows API module. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.