-
-
Notifications
You must be signed in to change notification settings - Fork 783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Fix --exec #142
[WIP] Fix --exec #142
Conversation
After decoupling the tests about shell_escape from the tests of src/exec/input.rs, ping #134 |
This looks very good to me! I'd like to hear @mmstick's feedback though. @iology Do you have any idea what's causing the failure on |
Testing on Windows is a little hard. Always need more tests. Windows is not my daily OS, I just do anything to keep the features complete. On Windows, A single drive name without slashes (e.g. I don't use musl. |
Looks fine to me. The tests pass with musl on my end with your PR, so I'm not sure why Travis errored there. |
Interestingly, the tests with musl pass on x86_64, but not i686. |
I am able to reproduce this locally. Here is what is happening:
@mmstick Could this be related to the Line 74 in e9cf8af
|
The actual SIGILL seems to come from the // However we need to guard against massive refcounts in case someone
// is `mem::forget`ing Arcs. If we don't do this the count can overflow
// and users will use-after free. We racily saturate to `isize::MAX` on
// the assumption that there aren't ~2 billion threads incrementing
// the reference count at once. This branch will never be taken in
// any realistic program.
//
// We abort because such a program is incredibly degenerate, and we
// don't care to support it.
if old_size > MAX_REFCOUNT {
unsafe {
abort();
}
} |
So it seems like this is indeed somehow related to that let cmd = unsafe { Arc::from_raw(cmd as *const TokenizedCommand) }; with let cmd = Arc::new(cmd.clone()); |
@iology Could you please try to rebase this on top of master? This should hopefully fix the tests. I'd like to include this before releasing fd v5.0. |
Sorry, I'm going to close this if nobody else wants to take good care of the Windows build. In my unpublished fork the Windows support has been completely removed. (a very backward-incompatible fork ;-) This patch is not completed for the Windows build even after rebasing. So I can't say it fixes everything. Anyway the code is licensed for merging. |
I would really like to integrate the tests you wrote (for Linux). Does this PR make things worse on Windows? Otherwise, someone else can still continue working on the Windows part later.
I'm also not a Windows-developer and I think it's definitely not our main target platform, but there has definitely been interest in a Windows version. However, I think it would be perfectly fine to support only a limited subset of features on Windows (the others might still be supported at a later point in time).
If it's not too much trouble, it would be great if you could still rebase it on master. I currently cannot merge or rebase (unless I would manually cherry-pick your commits on the command line or something similar). Once you choose to publish your private fork, let me know! It would be a shame to lose you as a contributor. Anyways, thank you very much for your great support in the last few weeks! |
Ok, I'll rebase and add some FIXME notes to the code.
No problem. I've customized it for my taste. |
Rebased, please check. |
Thank you very much! fd v5.0 coming in 3...2...1... |
@sharkdp FYI: https://github.com/jakwings/ff-find (still a lot of todos) |
@iology Very cool! I will take a closer look soon. Maybe we can 'backport' a few ideas to fd 😄 |
Problem solved but the tests are in a tangle.
ping #139 #141