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

Fix #1768: Handle segfault when current directory was unlinked #1842

Merged

Conversation

WojciechMazur
Copy link
Contributor

Resolves #1768
I've imported fix of avdv@939a129 mentioned in issue.
I have no idea how to provide valid tests for this case. I don't think i can be done using scripted-tests either.

@WojciechMazur WojciechMazur changed the title Fix #1768 - Handle sefault when current directory was unlinked Fix #1768 - Handle segfault when current directory was unlinked Jul 9, 2020
@sjrd
Copy link
Collaborator

sjrd commented Jul 9, 2020

I have no idea how to provide valid tests for this case. I don't think i can be done using scripted-tests either.

Did you test it manually using the reproducing steps in #1768, at least?

@WojciechMazur
Copy link
Contributor Author

I have no idea how to provide valid tests for this case. I don't think i can be done using scripted-tests either.

Did you test it manually using the reproducing steps in #1768, at least?

Yes, I've check it out.
Here's stack trace that would be produced

java.nio.file.NoSuchFileException: Could not determine current working directory
        at java.lang.Throwable.fillInStackTrace(Unknown Source)
        at scala.scalanative.nio.fs.UnixException$.apply(Unknown Source)
        at scala.scalanative.nio.fs.UnixFileSystemProvider.getUserDir(Unknown Source)
        at scala.scalanative.nio.fs.UnixFileSystemProvider.fs$lzycompute(Unknown Source)
        at scala.scalanative.nio.fs.UnixFileSystemProvider.getFileSystem(Unknown Source)
        at java.nio.file.FileSystems$.fs$lzycompute(Unknown Source)
        at java.nio.file.FileSystems$.getDefault(Unknown Source)
        at java.nio.file.Paths$.fs$lzycompute(Unknown Source)
        at java.nio.file.Paths$.get(Unknown Source)
        at Test$.main(Unknown Source)
        at <none>.main(Unknown Source)
        at <none>.__libc_start_main(Unknown Source)
        at <none>._start(Unknown Source)

instead of previous

zsh: segmentation fault (core dumped)  ~/projects/scala-native/sandbox/target/scala-2.11/sandbox-out

Co-authored-by: Sébastien Doeraene <sjrdoeraene@gmail.com>
@sjrd sjrd changed the title Fix #1768 - Handle segfault when current directory was unlinked Fix #1768: Handle segfault when current directory was unlinked Jul 9, 2020
@sjrd sjrd merged commit bc4e563 into scala-native:master Jul 10, 2020
@WojciechMazur WojciechMazur deleted the fix/1768-segfault_when_dir_unlinked branch August 18, 2020 08:22
ekrich pushed a commit to ekrich/scala-native that referenced this pull request May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segfault when current directory unlinked
2 participants