File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -340,6 +340,9 @@ mod _multiprocessing {
340340 if args. kind != RECURSIVE_MUTEX && args. kind != SEMAPHORE {
341341 return Err ( vm. new_value_error ( "unrecognized kind" . to_owned ( ) ) ) ;
342342 }
343+ if args. maxvalue <= 0 {
344+ return Err ( vm. new_value_error ( "maxvalue must be positive" . to_owned ( ) ) ) ;
345+ }
343346 if args. value < 0 || args. value > args. maxvalue {
344347 return Err ( vm. new_value_error ( "invalid value" . to_owned ( ) ) ) ;
345348 }
Original file line number Diff line number Diff line change @@ -2077,6 +2077,8 @@ pub(super) mod types {
20772077 args_reduced. push ( vm. ctx . none ( ) ) ;
20782078 args_reduced. push ( filename2) ;
20792079 } else {
2080+ // Diverges from CPython: include winerror even without
2081+ // filename2 so it survives pickle round-trips.
20802082 #[ cfg( windows) ]
20812083 if let Some ( winerror) = winerror {
20822084 args_reduced. push ( winerror) ;
You can’t perform that action at this time.
0 commit comments