https://bugs.kde.org/show_bug.cgi?id=479600
Bug ID: 479600 Summary: Segmentation fault launching the valgrind Classification: Developer tools Product: valgrind Version: 3.22.0 Platform: Other OS: Linux Status: REPORTED Severity: crash Priority: NOR Component: memcheck Assignee: jsew...@acm.org Reporter: erikas.masai...@teltonika.lt Target Milestone: --- SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** STEPS TO REPRODUCE 1. Just launch valgrind: valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all -v <application> SOFTWARE/OS VERSIONS Linux/OPENWRT. Using 3.22 valgrind. arch all 1 arch noarch 1 arch mipsel_24kc 10 ADDITIONAL INFORMATION I tried using valgrind on ARM and it works perfectly. But on mipsel, i can't use it. Logs: valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all -v modbus_server -s modbus ==15521== Memcheck, a memory error detector ==15521== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==15521== Using Valgrind-3.22.0-bd4db67b1d-20231031 and LibVEX; rerun with -h for copyright info ==15521== Command: modbus_server -s modbus ==15521== --15521-- Valgrind options: --15521-- --tool=memcheck --15521-- --leak-check=full --15521-- --show-leak-kinds=all --15521-- -v --15521-- Contents of /proc/version: --15521-- Linux version 5.10.206 (app@runner-ju9hssqs-project-352-concurrent-0) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 8.4.0 r16279-5cc0535800) 8.4.0, GNU ld (GNU Binutils) 2.34) #0 SMP Tue Jan 9 12:59:51 2024 --15521-- --15521-- Arch and hwcaps: MIPS32, LittleEndian, MIPS-baseline-dsp --15521-- Page sizes: currently 4096, max supported 65536 --15521-- Valgrind library directory: /usr/lib/valgrind --15521-- Reading syms from /usr/sbin/modbus_server --15521-- Reading syms from /lib/libc.so --15521-- Reading syms from /usr/lib/valgrind/memcheck-mips32-linux --15521-- object doesn't have a dynamic symbol table --15521-- Scheduler: using generic scheduler lock implementation. --15521-- Reading suppressions file: /usr/lib/valgrind/default.supp ==15521== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-15521-by-root-on-??? ==15521== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-15521-by-root-on-??? ==15521== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-15521-by-root-on-??? ==15521== ==15521== TO CONTROL THIS PROCESS USING vgdb (which you probably ==15521== don't want to do, unless you know exactly what you're doing, ==15521== or are doing some strange experiment): ==15521== /usr/lib/valgrind/../../bin/vgdb --pid=15521 ...command... ==15521== ==15521== TO DEBUG THIS PROCESS USING GDB: start GDB like this ==15521== /path/to/gdb modbus_server ==15521== and then give GDB the following command ==15521== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=15521 ==15521== --pid is optional if only one valgrind process is running ==15521== --15521-- Reading syms from /usr/lib/valgrind/vgpreload_core-mips32-linux.so --15521-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-mips32-linux.so --15521-- REDIR: 0x4030398 (NONE:free) redirected to 0x48cd564 (free) ==15521== Invalid read of size 4 ==15521== at 0x48CD578: free (vg_replace_malloc.c:985) ==15521== by 0x408AFEC: map_library (dynlink.c:774) ==15521== by 0x408C8D4: load_library (dynlink.c:1090) ==15521== by 0x408DC3C: load_preload (dynlink.c:1272) ==15521== by 0x408DC3C: __dls3 (dynlink.c:1844) ==15521== by 0x408D248: __dls2 (dynlink.c:1650) ==15521== by 0x40126CC: ??? (in /lib/libc.so) ==15521== Address 0x260c8 is not stack'd, malloc'd or (recently) free'd ==15521== ==15521== ==15521== Process terminating with default action of signal 11 (SIGSEGV) ==15521== Access not within mapped region at address 0x260C8 ==15521== at 0x48CD578: free (vg_replace_malloc.c:985) ==15521== by 0x408AFEC: map_library (dynlink.c:774) ==15521== by 0x408C8D4: load_library (dynlink.c:1090) ==15521== by 0x408DC3C: load_preload (dynlink.c:1272) ==15521== by 0x408DC3C: __dls3 (dynlink.c:1844) ==15521== by 0x408D248: __dls2 (dynlink.c:1650) ==15521== by 0x40126CC: ??? (in /lib/libc.so) ==15521== If you believe this happened as a result of a stack ==15521== overflow in your program's main thread (unlikely but ==15521== possible), you can try to increase the size of the ==15521== main thread stack using the --main-stacksize= flag. ==15521== The main thread stack size used in this run was 8388608. ==15521== ==15521== HEAP SUMMARY: ==15521== in use at exit: 0 bytes in 0 blocks ==15521== total heap usage: 0 allocs, 0 frees, 0 bytes allocated ==15521== ==15521== All heap blocks were freed -- no leaks are possible ==15521== ==15521== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) ==15521== ==15521== 1 errors in context 1 of 1: ==15521== Invalid read of size 4 ==15521== at 0x48CD578: free (vg_replace_malloc.c:985) ==15521== by 0x408AFEC: map_library (dynlink.c:774) ==15521== by 0x408C8D4: load_library (dynlink.c:1090) ==15521== by 0x408DC3C: load_preload (dynlink.c:1272) ==15521== by 0x408DC3C: __dls3 (dynlink.c:1844) ==15521== by 0x408D248: __dls2 (dynlink.c:1650) ==15521== by 0x40126CC: ??? (in /lib/libc.so) ==15521== Address 0x260c8 is not stack'd, malloc'd or (recently) free'd ==15521== ==15521== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) Segmentation fault -- You are receiving this mail because: You are watching all bug changes.