ffsend segfaults on upload
When attempting to upload a file using ffsend upload, ffsend segfaults. Sample output:
$ ffsend upload Pictures/Saved/oh-yeah-kool-aid-man-3596919834.gif
Upload complete
Segmentation fault
Same result with ffsend debug:
$ ffsend debug
Segmentation fault
I am using void linux with the ffsend package provided in the repos, which is up to date 0.2.76.
I've noticed the same on Alpine Linux too, and have opened an issue on aports too: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15158
same issue on m1 pro.
Same issue on Fedora 39, using the cargo install version of ffsend. The new static binary does not have this issue.
just and fyi, i have observed this too from the version installed via cargo install ffsend, but if i compile directly from master i do not see a crash.
Stacktrace of the crash:
(gdb) info stack
#0 0x000055ded771cf66 in prettytable::TableSlice::get_all_column_width ()
#1 0x000055ded771d382 in prettytable::TableSlice::print_tty ()
#2 0x000055ded76c5180 in ffsend::action::upload::Upload::invoke ()
#3 0x000055ded76d32a0 in ffsend::main ()
#4 0x000055ded76b5ed3 in std::sys_common::backtrace::__rust_begin_short_backtrace ()
#5 0x000055ded76cd639 in std::rt::lang_start::{{closure}} ()
#6 0x000055ded7b09e90 in std::rt::lang_start_internal ()
#7 0x000055ded76d4365 in main ()
This makes me guess that this is caused by https://github.com/phsym/prettytable-rs/issues/145.
That would fit the observation that the segfault doesn't happen with ffsend built from git: That one uses prettytable 0.10.0, which contains a fix for the linked issue.
Oh, there's also https://github.com/timvisee/ffsend/pull/154 and https://github.com/timvisee/ffsend/issues/153, so this is just a duplicate of a known and fixed issue.
Confirmed on my system as well: Linux 6.1.0-22-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.94-1 (2024-06-21) x86_64 GNU/Linux.
Installation with cargo install ffsend was leading to a segmentation fault after upload, whereas using the compiled version was running smoothly with the identical input data.