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

somewhat complex path causes core dump #201

Open
aguaviva opened this issue Dec 31, 2024 · 3 comments
Open

somewhat complex path causes core dump #201

aguaviva opened this issue Dec 31, 2024 · 3 comments

Comments

@aguaviva
Copy link

aguaviva commented Dec 31, 2024

was run using:

user@nube:~/rar2fs-1.29.7/src$ ./rar2fs -f -o allow_other,debug  --seek-length=1 /media/General/torrent/Biblioteca\ 88.234\ \(EPUB\)\ \(ESP\)/Biblioteca_2021_88.234.part01.rar mydir
Segmentation fault (core dumped)

GDB output:

user@nube:~/rar2fs-1.29.7/src$ gdb ./rar2fs /var/lib/apport/coredump/core._home_user_rar2fs-1_29_7_src_rar2fs.1000.a8b30367-04ac-4e6e-b885-e757d5147d91.41685.8865118 
GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1) 15.0.50.20240403-git
[...]
Reading symbols from ./rar2fs...
[New LWP 41685]

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./rar2fs -f -o allow_other,debug --seek-length=1 /media/General/torrent/Bibliot'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00005d3761ebccd6 in wcsncpyz(wchar_t*, wchar_t const*, unsigned long) ()

note dbg shows a truncated path

update: same issue using a shorter path with no spaces

Core was generated by `/home/user/rar2fs-1.29.7/src/rar2fs Biblioteca_2021_88.234.part01.rar /tmp/1'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000060dab216acd6 in wcsncpyz(wchar_t*, wchar_t const*, unsigned long) ()
(gdb) 

update2: using a folder name instead of a filename seems to work

user@nube:~/rar2fs-1.29.7/src$ ./rar2fs -f -o allow_other,debug  --seek-length=1 . mydir
Segmentation fault (core dumped)
@hasse69
Copy link
Owner

hasse69 commented Dec 31, 2024

Any chance you can get a better stack trace with a bit more depth so that we can see who the caller is?

@RedSnt
Copy link

RedSnt commented Mar 22, 2025

I'm not sure I'm experiencing the same problem besides the very obvious error "Segmentation fault (core dumped)". Anyway, compiling using rar2fs v1.29.7 with a downgraded unrar source code version from 7.1.5 to 6.0.3 makes the segmentation fault disappear for me. I followed all the steps on the wiki to the letter, and neither unrar version produces any errors on compile.
But it would seem that something with at least 7.1.5 (perhaps all v7+ versions?) is causing issues.
Otherwise, very cool project, first time trying it and it's very cool! Saves me a lot of unpacking.

@hasse69
Copy link
Owner

hasse69 commented Mar 22, 2025

It might very well be that something broke with libunrar v7. I have not had the chance to try that version at all so I would recommend to stay on v6 until this can be further looked into.

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

No branches or pull requests

3 participants