Closed LukasKalbertodt closed 5 years ago
Appveyor fails due to errors when compiling rand_isaac
:
Notably: AppVeyor tries to compile rand_isaac 0.1.0
while Travis compiles 0.1.1
which got some version requirement fixes. Not sure what exactly is happening here tho. But I'm pretty sure this has nothing to do with this PR.
Yeah, ignore rand
for now. I have a branch that rips it out, because I'm so tired of dealing with it. I'll try to cherry pick those commits out, put them on master, and then you can rebase. I'll try to take a look at your PR soon. Thanks so much for submitting it. :-)
@LukasKalbertodt Thank you for fixing #118. I tested cargo sweep with your branch of walkdir and it works.
@LukasKalbertodt Thanks so much for the amazing analysis and fix here! I merged this (with a small fixup to your test, since I couldn't get it to fail on current master) in #125, among other things, which also got CI straightened out. I also believed your analysis of the second way this could happen and hopefully fixed that as well, although as you discovered, reproducing that bug is a bit tricky so I didn't bother with a regression test.
Either way, the fix is in walkdir 2.2.9
on crates.io, so cargo sweep
should probably update!
@BurntSushi Thank you :)
Fixes #118
As discussed in the issue, the fix is fairly straight forward. I even managed to create a fairly minimal example in form of a test. It indeed panics before the patch and works fine afterwards. I used
self.pop()
inskip_current_dir
as I think it's correct there. As far as I can tellstack_path
has always the same length asstack_list
or is empty. So there is no reason to treat them independently.Regarding the second way the invariant can be destroyed I mentioned here: I tried to trigger this bug, but it's hard. So I think this can only go wrong when
Ancestor::new
returns an error. This apparently only happens on Windows (which I'm not currently using) and I don't know when exactly this error is triggered. So I will stop now in trying to trigger the bug. So the question is: should I "fix" this what I think is a bug in some situations OR should I just keep it as is?