Skip to content
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

Core dump on Cygwin when $PWD is a Windows path #7636

Closed
thorstenkampe opened this issue Jan 17, 2021 · 4 comments
Closed

Core dump on Cygwin when $PWD is a Windows path #7636

thorstenkampe opened this issue Jan 17, 2021 · 4 comments
Labels
bug Something that's not working as intended cygwin
Milestone

Comments

@thorstenkampe
Copy link

thorstenkampe commented Jan 17, 2021

> fish --version
fish, version 3.1.2

> echo $version
3.1.2

> echo $PWD
F:\cygwin\home\thorsten

> c
assertion "!wd.empty() && wd.front() == sep && wd.back() == sep && "Invalid working directory, it must start and end with /"" failed: file "/home/ASchulma/dev/cygwin/fish/fish-3.1.2-2.x86_64/src/fish-3.1.2/src/wutil.cpp", line 482, function: wcstring path_normalize_for_cd(const wcstring&, const wcstring&)
      0 [fish] fish 9070 cygwin_exception::open_stackdumpfile: Dumping stack trace to fish.exe.stackdump

Running fish on Cygwin from a shell which sets $PWD to a Windows path (PowerShell with Starship prompt) results in a core dump (see above).

@thorstenkampe thorstenkampe changed the title Core dump on Core dump on Cygwin when $PWD is a Windows path Jan 17, 2021
@faho
Copy link
Member

faho commented Jan 17, 2021

Some more information would be useful. Like the coredump itself, what exactly you mean by "windows path", and how you get one to be $PWD.

@thorstenkampe
Copy link
Author

thorstenkampe commented Jan 17, 2021

Sorry, the initial description was sent prematurely (keyboard error). I updated and corrected the description.

@faho
Copy link
Member

faho commented Jan 17, 2021

Okay, so the issue here is that your path isn't like a unix-path starting from "/" on.

This asserts in normalizing the path, and if it didn't it would do something entirely non-sensical - for instance it doesn't handle \\, because that's not a unix thing.

We should probably just get the path again via getcwd if it doesn't start with a /.

@faho faho added bug Something that's not working as intended and removed needs more info labels Jan 17, 2021
@faho faho closed this as completed in 8b13383 Jan 17, 2021
@faho
Copy link
Member

faho commented Jan 17, 2021

Should be fixed with 8b13383 - when fish inherits a path like that it doesn't trust it and uses getcwd() instead.

Either wait for 3.2, build fish yourself or get the cygwin people to backport it.

@faho faho added this to the fish 3.2.0 milestone Jan 17, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended cygwin
Projects
None yet
Development

No branches or pull requests

2 participants