Files
rust/src/libstd
bors 7d2fa4a4d2 Auto merge of #50630 - sharkdp:fix-50619, r=sfackler
Fix possibly endless loop in ReadDir iterator

Certain directories in `/proc` can cause the `ReadDir` iterator to loop indefinitely. We get an error code (22) when calling libc's `readdir_r` on these directories, but `entry_ptr` is `NULL` at the same time, signalling the end of the directory stream.

This change introduces an internal state to the iterator such that the `Some(Err(..))` value will only be returned once when calling `next`. Subsequent calls will return `None`.

fixes #50619
2018-06-26 03:49:37 +00:00
..
2018-03-11 10:59:28 -07:00
2018-06-18 21:41:24 +02:00
2018-06-11 13:47:27 -07:00
2018-05-17 08:47:25 -06:00
2018-05-17 08:47:25 -06:00
2018-06-15 23:23:11 +02:00
2018-06-22 11:36:01 -07:00
2017-08-24 18:42:53 +02:00
2018-05-16 19:11:31 +02:00
2018-06-03 13:46:19 +02:00
2018-06-18 19:49:45 +02:00
2018-03-19 11:41:28 +09:00
2018-05-28 18:24:01 -06:00