-
Notifications
You must be signed in to change notification settings - Fork 27
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
Segment fault on Debian when listing archive files with Chinese characters #100
Comments
YaxinCheng
changed the title
Segment fault on Debian when list archives with Chinese characters
Segment fault on Debian when listing archive files with Chinese characters
Jan 8, 2023
Could you try to create a small test case in the form of a PR so we can have something to use as a base? |
Test case added in PR #101 |
otavio
added a commit
that referenced
this issue
Jan 9, 2023
If operating system doesn't has support for the required locale, `ffi::archive_entry_pathname(...)` returns NULL and we need to error out accordingly. Fixes: #100 Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
The error is because the Docker image lacks a default locale. Use: LC_ALL=C.UTF-8 cargo test However #103 address the segfault. Now it error out. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Segment fault happens on Debian when
list_archive_files
orlist_archive_files_with_encoding
is called for archives whose files contain Chinese characters.The two functions work fine on macOS when listing files with or without Chinese characters.
Error message:
I realized the problem when I put my binary into docker. I don't have a Debian environment except docker, so the reproduce steps are using docker. Sorry about that.
Reproduce:
docker build . -t compress-tools-test
docker run --rm -it --entrypoint sh compress-tools-test
cargo run
The zip used for the test is included in the zip above, but if you want to download it separately, here it is: test.zip
The text was updated successfully, but these errors were encountered: