pcloudcom / console-client

428 stars 130 forks source link

Segmentation fault on CentOS #120

Open Josh5A opened 4 years ago

Josh5A commented 4 years ago

First, wow, I was finally able to compile this on CentOS with no issues. That is positive progress!

But I can't run the thing without a segfault.

pcloudcc --help will run, but pcloudcc -u myemail -p will not.

Don't know if this is helpful, but here is valgrind output:

valgrind -v pcloudcc -u -p ==3447== Memcheck, a memory error detector ==3447== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==3447== Using Valgrind-3.14.0-353a3587bb-20181007X and LibVEX; rerun with -h for copyright info ==3447== Command: pcloudcc -u -p ==3447== --3447-- Valgrind options: --3447-- -v --3447-- Contents of /proc/version: --3447-- Linux version 3.10.0-693.2.2.el7.centos.plus.x86_64 (mockbuild@c1bm.rdu2.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Tue Sep 12 23:18:54 UTC 2017 --3447-- --3447-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-sse3-avx --3447-- Page sizes: currently 4096, max supported 4096 --3447-- Valgrind library directory: /usr/lib64/valgrind --3447-- Reading syms from /usr/local/bin/pcloudcc --3447-- Reading syms from /usr/lib64/ld-2.17.so --3447-- Reading syms from /usr/lib64/valgrind/memcheck-amd64-linux --3447-- object doesn't have a symbol table --3447-- object doesn't have a dynamic symbol table --3447-- Scheduler: using generic scheduler lock implementation. --3447-- Reading suppressions file: /usr/lib64/valgrind/default.supp ==3447== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-3447-by-root-on-server.myservername.com ==3447== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-3447-by-root-on-server.myservername.com ==3447== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-3447-by-root-on-server.myservername.com ==3447== ==3447== TO CONTROL THIS PROCESS USING vgdb (which you probably ==3447== don't want to do, unless you know exactly what you're doing, ==3447== or are doing some strange experiment): ==3447== /usr/lib64/valgrind/../../bin/vgdb --pid=3447 ...command... ==3447== ==3447== TO DEBUG THIS PROCESS USING GDB: start GDB like this ==3447== /path/to/gdb pcloudcc ==3447== and then give GDB the following command ==3447== target remote | /usr/lib64/valgrind/../../bin/vgdb --pid=3447 ==3447== --pid is optional if only one valgrind process is running ==3447== --3447-- REDIR: 0x4019df0 (ld-linux-x86-64.so.2:strlen) redirected to 0x580c66c5 (???) --3447-- REDIR: 0x4019bc0 (ld-linux-x86-64.so.2:index) redirected to 0x580c66df (???) --3447-- Reading syms from /usr/lib64/valgrind/vgpreload_core-amd64-linux.so --3447-- Reading syms from /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so ==3447== WARNING: new redirection conflicts with existing -- ignoring it --3447-- old: 0x04019df0 (strlen ) R-> (0000.0) 0x580c66c5 ??? --3447-- new: 0x04019df0 (strlen ) R-> (2007.0) 0x04c2d0e0 strlen --3447-- REDIR: 0x4019d70 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4c2e230 (strcmp) --3447-- REDIR: 0x401aa30 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4c31de0 (mempcpy) --3447-- Reading syms from /usr/lib/libpcloudcc_lib.so --3447-- Reading syms from /usr/lib64/libfuse.so.2.9.2 --3447-- object doesn't have a symbol table --3447-- Reading syms from /usr/lib64/libpthread-2.17.so --3447-- Reading syms from /usr/lib64/libz.so.1.2.7 --3447-- object doesn't have a symbol table --3447-- Reading syms from /usr/lib64/libdl-2.17.so --3447-- Reading syms from /usr/lib64/libstdc++.so.6.0.19 --3447-- object doesn't have a symbol table --3447-- Reading syms from /usr/lib64/libm-2.17.so --3447-- Reading syms from /usr/lib64/libgcc_s-4.8.5-20150702.so.1 --3447-- object doesn't have a symbol table --3447-- Reading syms from /usr/lib64/libc-2.17.so --3447-- Reading syms from /usr/lib64/libudev.so.1.6.2 --3447-- object doesn't have a symbol table --3447-- Reading syms from /usr/lib64/librt-2.17.so --3447-- Reading syms from /usr/lib64/libcap.so.2.22 --3447-- object doesn't have a symbol table --3447-- Reading syms from /usr/lib64/libdw-0.176.so --3447-- object doesn't have a symbol table --3447-- Reading syms from /usr/lib64/libattr.so.1.1.0 --3447-- object doesn't have a symbol table --3447-- Reading syms from /usr/lib64/libelf-0.176.so --3447-- object doesn't have a symbol table --3447-- Reading syms from /usr/lib64/liblzma.so.5.2.2 --3447-- object doesn't have a symbol table --3447-- Reading syms from /usr/lib64/libbz2.so.1.0.6 --3447-- object doesn't have a symbol table --3447-- REDIR: 0x64ba0e0 (libc.so.6:strcasecmp) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b6e60 (libc.so.6:strnlen) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64bc3b0 (libc.so.6:strncasecmp) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b98c0 (libc.so.6:memset) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b9870 (libc.so.6:memcpy@GLIBC_2.2.5) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b6770 (libc.so.6:strcpy) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b6d30 (libc.so.6:strlen) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64bea80 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b5020 (libc.so.6:strcat) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b6f40 (libc.so.6:strncmp) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b5220 (libc.so.6:index) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b8810 (libc.so.6:rindex) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b92a0 (libc.so.6:bcmp) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b52e0 (libc.so.6:strcmp) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64c0130 (libc.so.6:rawmemchr) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b9a20 (libc.so.6:mempcpy) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64cfe90 (libc.so.6:strstr) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b87d0 (libc.so.6:strncpy) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b9f40 (libc.so.6:stpcpy) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x653f1a0 (libc.so.6:memcpy_chk) redirected to 0x4a247a0 (_vgnU_ifunc_wrapper) --3447-- REDIR: 0x64b6d80 (libc.so.6:GI_strlen) redirected to 0x4c2d040 (GI_strlen) --3447-- REDIR: 0x64b8850 (libc.so.6:__GI_strrchr) redirected to 0x4c2caa0 (GI_strrchr) --3447-- REDIR: 0x64b92e0 (libc.so.6:GI_memcmp) redirected to 0x4c30380 (__GI_memcmp) --3447-- REDIR: 0x6568d40 (libc.so.6:strcmp_sse42) redirected to 0x4c2e1e0 (strcmp_sse42) --3447-- REDIR: 0x6599630 (libc.so.6:strlen_sse2_pminub) redirected to 0x4c2d020 (strlen) --3447-- REDIR: 0x5c69eb0 (libstdc++.so.6:operator new(unsigned long)) redirected to 0x4c2a43c (operator new(unsigned long)) --3447-- REDIR: 0x657e9f0 (libc.so.6:memcpy_ssse3_back) redirected to 0x4c2e6e0 (memcpy@@GLIBC_2.14) --3447-- REDIR: 0x64b9a90 (libc.so.6:GI_mempcpy) redirected to 0x4c31b10 (GI_mempcpy) --3447-- REDIR: 0x6593f60 (libc.so.6:memcmp_sse4_1) redirected to 0x4c304c0 (memcmp_sse4_1) pCloud console client v.2.0.1 --3447-- REDIR: 0x5c68020 (libstdc++.so.6:operator delete(void)) redirected to 0x4c2b3c6 (operator delete(void)) --3447-- REDIR: 0x64b8f50 (libc.so.6:memchr) redirected to 0x4c2e2d0 (memchr) --3447-- REDIR: 0x64b9920 (libc.so.6:__GI_memset) redirected to 0x4c30d30 (memset) --3447-- REDIR: 0x64c4cc0 (libc.so.6:strncpy_sse2_unaligned) redirected to 0x4c2d6b0 (__strncpy_sse2_unaligned) ==3447== Invalid read of size 4 ==3447== at 0x5C662AD: ??? (in /usr/lib64/libstdc++.so.6.0.19) ==3447== by 0x5CC9DBD: std::string::assign(std::string const&) (in /usr/lib64/libstdc++.so.6.0.19) ==3447== by 0x429D6E: console_client::clibrary::pclsync_lib::set_username(std::string const&) (in /usr/local/bin/pcloudcc) ==3447== by 0x428E51: main (in /usr/local/bin/pcloudcc) ==3447== Address 0xfffffffffffffff8 is not stack'd, malloc'd or (recently) free'd ==3447== ==3447== ==3447== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==3447== Access not within mapped region at address 0xFFFFFFFFFFFFFFF8 ==3447== at 0x5C662AD: ??? (in /usr/lib64/libstdc++.so.6.0.19) ==3447== by 0x5CC9DBD: std::string::assign(std::string const&) (in /usr/lib64/libstdc++.so.6.0.19) ==3447== by 0x429D6E: console_client::clibrary::pclsync_lib::set_username(std::string const&) (in /usr/local/bin/pcloudcc) ==3447== by 0x428E51: main (in /usr/local/bin/pcloudcc) ==3447== If you believe this happened as a result of a stack ==3447== overflow in your program's main thread (unlikely but ==3447== possible), you can try to increase the size of the ==3447== main thread stack using the --main-stacksize= flag. ==3447== The main thread stack size used in this run was 8388608. --3447-- REDIR: 0x64afeb0 (libc.so.6:free) redirected to 0x4c2af16 (free) ==3447== ==3447== HEAP SUMMARY: ==3447== in use at exit: 4,983 bytes in 116 blocks ==3447== total heap usage: 322 allocs, 206 frees, 11,322 bytes allocated ==3447== ==3447== Searching for pointers to 116 not-freed blocks ==3447== Checked 1,413,104 bytes ==3447== ==3447== LEAK SUMMARY: ==3447== definitely lost: 0 bytes in 0 blocks ==3447== indirectly lost: 0 bytes in 0 blocks ==3447== possibly lost: 0 bytes in 0 blocks ==3447== still reachable: 4,983 bytes in 116 blocks ==3447== of which reachable via heuristic: ==3447== stdstring : 1,575 bytes in 43 blocks ==3447== suppressed: 0 bytes in 0 blocks ==3447== Rerun with --leak-check=full to see details of leaked memory ==3447== ==3447== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) ==3447== ==3447== 1 errors in context 1 of 1: ==3447== Invalid read of size 4 ==3447== at 0x5C662AD: ??? (in /usr/lib64/libstdc++.so.6.0.19) ==3447== by 0x5CC9DBD: std::string::assign(std::string const&) (in /usr/lib64/libstdc++.so.6.0.19) ==3447== by 0x429D6E: console_client::clibrary::pclsync_lib::set_username(std::string const&) (in /usr/local/bin/pcloudcc) ==3447== by 0x428E51: main (in /usr/local/bin/pcloudcc) ==3447== Address 0xfffffffffffffff8 is not stack'd, malloc'd or (recently) free'd ==3447== ==3447== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Kirutian commented 2 years ago

Have you had any luck my friend?