You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(58) |
Apr
(261) |
May
(169) |
Jun
(214) |
Jul
(201) |
Aug
(219) |
Sep
(198) |
Oct
(203) |
Nov
(241) |
Dec
(94) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(137) |
Feb
(149) |
Mar
(150) |
Apr
(193) |
May
(95) |
Jun
(173) |
Jul
(137) |
Aug
(236) |
Sep
(157) |
Oct
(150) |
Nov
(136) |
Dec
(90) |
2005 |
Jan
(139) |
Feb
(130) |
Mar
(274) |
Apr
(138) |
May
(184) |
Jun
(152) |
Jul
(261) |
Aug
(409) |
Sep
(239) |
Oct
(241) |
Nov
(260) |
Dec
(137) |
2006 |
Jan
(191) |
Feb
(142) |
Mar
(169) |
Apr
(75) |
May
(141) |
Jun
(169) |
Jul
(131) |
Aug
(141) |
Sep
(192) |
Oct
(176) |
Nov
(142) |
Dec
(95) |
2007 |
Jan
(98) |
Feb
(120) |
Mar
(93) |
Apr
(96) |
May
(95) |
Jun
(65) |
Jul
(62) |
Aug
(56) |
Sep
(53) |
Oct
(95) |
Nov
(106) |
Dec
(87) |
2008 |
Jan
(58) |
Feb
(149) |
Mar
(175) |
Apr
(110) |
May
(106) |
Jun
(72) |
Jul
(55) |
Aug
(89) |
Sep
(26) |
Oct
(96) |
Nov
(83) |
Dec
(93) |
2009 |
Jan
(97) |
Feb
(106) |
Mar
(74) |
Apr
(64) |
May
(115) |
Jun
(83) |
Jul
(137) |
Aug
(103) |
Sep
(56) |
Oct
(59) |
Nov
(61) |
Dec
(37) |
2010 |
Jan
(94) |
Feb
(71) |
Mar
(53) |
Apr
(105) |
May
(79) |
Jun
(111) |
Jul
(110) |
Aug
(81) |
Sep
(50) |
Oct
(82) |
Nov
(49) |
Dec
(21) |
2011 |
Jan
(87) |
Feb
(105) |
Mar
(108) |
Apr
(99) |
May
(91) |
Jun
(94) |
Jul
(114) |
Aug
(77) |
Sep
(58) |
Oct
(58) |
Nov
(131) |
Dec
(62) |
2012 |
Jan
(76) |
Feb
(93) |
Mar
(68) |
Apr
(95) |
May
(62) |
Jun
(109) |
Jul
(90) |
Aug
(87) |
Sep
(49) |
Oct
(54) |
Nov
(66) |
Dec
(84) |
2013 |
Jan
(67) |
Feb
(52) |
Mar
(93) |
Apr
(65) |
May
(33) |
Jun
(34) |
Jul
(52) |
Aug
(42) |
Sep
(52) |
Oct
(48) |
Nov
(66) |
Dec
(14) |
2014 |
Jan
(66) |
Feb
(51) |
Mar
(34) |
Apr
(47) |
May
(58) |
Jun
(27) |
Jul
(52) |
Aug
(41) |
Sep
(78) |
Oct
(30) |
Nov
(28) |
Dec
(26) |
2015 |
Jan
(41) |
Feb
(42) |
Mar
(20) |
Apr
(73) |
May
(31) |
Jun
(48) |
Jul
(23) |
Aug
(55) |
Sep
(36) |
Oct
(47) |
Nov
(48) |
Dec
(41) |
2016 |
Jan
(32) |
Feb
(34) |
Mar
(33) |
Apr
(22) |
May
(14) |
Jun
(31) |
Jul
(29) |
Aug
(41) |
Sep
(17) |
Oct
(27) |
Nov
(38) |
Dec
(28) |
2017 |
Jan
(28) |
Feb
(30) |
Mar
(16) |
Apr
(9) |
May
(27) |
Jun
(57) |
Jul
(28) |
Aug
(43) |
Sep
(31) |
Oct
(20) |
Nov
(24) |
Dec
(18) |
2018 |
Jan
(34) |
Feb
(50) |
Mar
(18) |
Apr
(26) |
May
(13) |
Jun
(31) |
Jul
(13) |
Aug
(11) |
Sep
(15) |
Oct
(12) |
Nov
(18) |
Dec
(13) |
2019 |
Jan
(12) |
Feb
(29) |
Mar
(51) |
Apr
(22) |
May
(13) |
Jun
(20) |
Jul
(13) |
Aug
(12) |
Sep
(21) |
Oct
(6) |
Nov
(9) |
Dec
(5) |
2020 |
Jan
(13) |
Feb
(5) |
Mar
(25) |
Apr
(4) |
May
(40) |
Jun
(27) |
Jul
(5) |
Aug
(17) |
Sep
(21) |
Oct
(1) |
Nov
(5) |
Dec
(15) |
2021 |
Jan
(28) |
Feb
(6) |
Mar
(11) |
Apr
(5) |
May
(7) |
Jun
(8) |
Jul
(5) |
Aug
(5) |
Sep
(11) |
Oct
(9) |
Nov
(10) |
Dec
(12) |
2022 |
Jan
(7) |
Feb
(13) |
Mar
(8) |
Apr
(7) |
May
(12) |
Jun
(27) |
Jul
(14) |
Aug
(27) |
Sep
(27) |
Oct
(17) |
Nov
(17) |
Dec
|
2023 |
Jan
(10) |
Feb
(18) |
Mar
(9) |
Apr
(26) |
May
|
Jun
(13) |
Jul
(18) |
Aug
(5) |
Sep
(12) |
Oct
(16) |
Nov
(1) |
Dec
|
2024 |
Jan
(4) |
Feb
(3) |
Mar
(6) |
Apr
(17) |
May
(2) |
Jun
(33) |
Jul
(13) |
Aug
(1) |
Sep
(6) |
Oct
(8) |
Nov
(6) |
Dec
(15) |
2025 |
Jan
(5) |
Feb
(11) |
Mar
(8) |
Apr
(20) |
May
(1) |
Jun
|
Jul
|
Aug
(9) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Alan C. <ala...@gm...> - 2020-03-23 03:35:57
|
Those happen, don't take it personally. They used to be real common in ARM. Sounds like you hit a code that's not covered. Not that I'm one that can add it. See the "==466== Your program just tried to execute an instruction that Valgrind ==466== did not recognise." section of the error message. OTOH somewhere it looks like it jumped to a null. On 3/22/20, MP <mx...@gm...> wrote: > I'm trying to use Valgrind on an embedded PowerPC system but I'm > getting the following errors: > > ./testprog: symbol lookup error: > /usr/local/lib/valgrind/vgpreload_memcheck-ppc32-linux.so: undefined > symbol: _restgpr_30_x > disInstr(ppc): unhandled instruction: 0x0 > primary 0(0x0), secondary 0(0x0) > ==466== valgrind: Unrecognised instruction at address 0xffefa74. > ==466== at 0xFFEFA74: ??? (in > /usr/local/lib/valgrind/vgpreload_core-ppc32-linux.so) > > The target setup is: > CPU: MPC8280 (PowerPC 603e core) > Linux Kernel 4.9.59 > gcc 6.3.0 > glibc 2.25 > valgrind 3.15.0 > The toolchain was generated using crosstool-NG 1.23 with a target of > "powerpc-generic-linux-gnu". > > Test program is: > int main (int argc, char **argv) { return argc; } > > It was compiled with: > powerpc-generic-linux-gnu-gcc -o testprog testprog.c > > Valgrind was compiled like this: > ./configure --host=powerpc-generic-linux-gnu > make > > The full program output is as follows: > > # valgrind -v ./testprog > ==466== Memcheck, a memory error detector > ==466== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. > ==466== Using Valgrind-3.15.0-608cb11914-20190413 and LibVEX; rerun > with -h for copyright info > ==466== Command: ./testprog > ==466== > --466-- Valgrind options: > --466-- -v > --466-- Contents of /proc/version: > --466-- Linux version 4.9.59 (build@engdev) (gcc version 6.3.0 > (crosstool-NG crosstool-ng-1.23.0) ) #0 PREEMPT Mon Mar 9 10:36:51 EDT > 2020 > --466-- > --466-- Arch and hwcaps: PPC32, BigEndian, ppc32-int-flt-GX > --466-- Page sizes: currently 4096, max supported 65536 > --466-- Valgrind library directory: /usr/local/lib/valgrind > --466-- Reading syms from /lib/ld-2.25.so > --466-- Reading syms from /tmp/testprog > --466-- Reading syms from /usr/local/lib/valgrind/memcheck-ppc32-linux > --466-- object doesn't have a dynamic symbol table > --466-- Scheduler: using generic scheduler lock implementation. > --466-- Reading suppressions file: /usr/local/lib/valgrind/default.supp > ==466== embedded gdbserver: reading from > /tmp/vgdb-pipe-from-vgdb-to-466-by-root-on-??? > ==466== embedded gdbserver: writing to > /tmp/vgdb-pipe-to-vgdb-from-466-by-root-on-??? > ==466== embedded gdbserver: shared mem > /tmp/vgdb-pipe-shared-mem-vgdb-466-by-root-on-??? > ==466== > ==466== TO CONTROL THIS PROCESS USING vgdb (which you probably > ==466== don't want to do, unless you know exactly what you're doing, > ==466== or are doing some strange experiment): > ==466== /usr/local/lib/valgrind/../../bin/vgdb --pid=466 ...command... > ==466== > ==466== TO DEBUG THIS PROCESS USING GDB: start GDB like this > ==466== /path/to/gdb ./testprog > ==466== and then give GDB the following command > ==466== target remote | /usr/local/lib/valgrind/../../bin/vgdb --pid=466 > ==466== --pid is optional if only one valgrind process is running > ==466== > --466-- REDIR: 0x401b250 (ld.so.1:strcmp) redirected to 0x58116d7c > (vgPlain_ppc32_linux_REDIR_FOR_strcmp) > --466-- REDIR: 0x401b3b4 (ld.so.1:strlen) redirected to 0x58116d54 > (vgPlain_ppc32_linux_REDIR_FOR_strlen) > --466-- REDIR: 0x401b174 (ld.so.1:index) redirected to 0x58116df0 > (vgPlain_ppc32_linux_REDIR_FOR_strchr) > --466-- Reading syms from > /usr/local/lib/valgrind/vgpreload_core-ppc32-linux.so > --466-- Reading syms from > /usr/local/lib/valgrind/vgpreload_memcheck-ppc32-linux.so > --466-- REDIR: 0x401bec8 (ld.so.1:memcpy) redirected to 0xffba7e8 (memcpy) > --466-- REDIR: 0x401b820 (ld.so.1:bcmp) redirected to 0xffbb8c4 (bcmp) > --466-- Reading syms from /lib/libc-2.25.so > ./testprog: symbol lookup error: > /usr/local/lib/valgrind/vgpreload_memcheck-ppc32-linux.so: undefined > symbol: _restgpr_30_x > disInstr(ppc): unhandled instruction: 0x0 > primary 0(0x0), secondary 0(0x0) > ==466== valgrind: Unrecognised instruction at address 0xffefa74. > ==466== at 0xFFEFA74: ??? (in > /usr/local/lib/valgrind/vgpreload_core-ppc32-linux.so) > ==466== by 0x404082F: ??? (in /lib/ld-2.25.so) > ==466== by 0x4018D27: _dl_signal_error (dl-error-skeleton.c:134) > ==466== by 0x4018E67: _dl_signal_cerror (dl-error-skeleton.c:166) > ==466== by 0x400AECF: _dl_lookup_symbol_x (dl-lookup.c:874) > ==466== by 0x400C977: elf_machine_rela (dl-machine.h:315) > ==466== by 0x400C977: elf_dynamic_do_Rela (do-rel.h:170) > ==466== by 0x400C977: _dl_relocate_object (dl-reloc.c:259) > ==466== by 0x4004923: dl_main (rtld.c:2051) > ==466== by 0x4017B73: _dl_sysdep_start (dl-sysdep.c:253) > ==466== by 0x4005A3F: _dl_start_final (rtld.c:305) > ==466== by 0x4005DD3: _dl_start (rtld.c:413) > ==466== by 0x401997B: _start (dl-start.S:38) > ==466== Your program just tried to execute an instruction that Valgrind > ==466== did not recognise. There are two possible reasons for this. > ==466== 1. Your program has a bug and erroneously jumped to a non-code > ==466== location. If you are running Memcheck and you just saw a > ==466== warning about a bad jump, it's probably your program's fault. > ==466== 2. The instruction is legitimate but Valgrind doesn't handle it, > ==466== i.e. it's Valgrind's fault. If you think this is the case or > ==466== you are not sure, please let us know and we'll try to fix it. > ==466== Either way, Valgrind will now raise a SIGILL signal which will > ==466== probably kill your program. > ==466== > ==466== Process terminating with default action of signal 4 (SIGILL): > dumping core > ==466== Illegal opcode at address 0xFFEFA74 > ==466== at 0xFFEFA74: ??? (in > /usr/local/lib/valgrind/vgpreload_core-ppc32-linux.so) > ==466== by 0x404082F: ??? (in /lib/ld-2.25.so) > ==466== by 0x4018D27: _dl_signal_error (dl-error-skeleton.c:134) > ==466== by 0x4018E67: _dl_signal_cerror (dl-error-skeleton.c:166) > ==466== by 0x400AECF: _dl_lookup_symbol_x (dl-lookup.c:874) > ==466== by 0x400C977: elf_machine_rela (dl-machine.h:315) > ==466== by 0x400C977: elf_dynamic_do_Rela (do-rel.h:170) > ==466== by 0x400C977: _dl_relocate_object (dl-reloc.c:259) > ==466== by 0x4004923: dl_main (rtld.c:2051) > ==466== by 0x4017B73: _dl_sysdep_start (dl-sysdep.c:253) > ==466== by 0x4005A3F: _dl_start_final (rtld.c:305) > ==466== by 0x4005DD3: _dl_start (rtld.c:413) > ==466== by 0x401997B: _start (dl-start.S:38) > ==466== > ==466== HEAP SUMMARY: > ==466== in use at exit: 0 bytes in 0 blocks > ==466== total heap usage: 0 allocs, 0 frees, 0 bytes allocated > ==466== > ==466== All heap blocks were freed -- no leaks are possible > ==466== > ==466== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) > > > What am I doing wrong? Could there be a problem with my toolchain? > > > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > -- ------------- No, I won't call it "climate change", do you have a "reality problem"? - AB1JX Cities are cages built to contain excess people and keep them from cluttering up nature. Impeach Impeach Impeach Impeach Impeach Impeach Impeach Impeach |
From: MP <mx...@gm...> - 2020-03-23 03:01:00
|
I'm trying to use Valgrind on an embedded PowerPC system but I'm getting the following errors: ./testprog: symbol lookup error: /usr/local/lib/valgrind/vgpreload_memcheck-ppc32-linux.so: undefined symbol: _restgpr_30_x disInstr(ppc): unhandled instruction: 0x0 primary 0(0x0), secondary 0(0x0) ==466== valgrind: Unrecognised instruction at address 0xffefa74. ==466== at 0xFFEFA74: ??? (in /usr/local/lib/valgrind/vgpreload_core-ppc32-linux.so) The target setup is: CPU: MPC8280 (PowerPC 603e core) Linux Kernel 4.9.59 gcc 6.3.0 glibc 2.25 valgrind 3.15.0 The toolchain was generated using crosstool-NG 1.23 with a target of "powerpc-generic-linux-gnu". Test program is: int main (int argc, char **argv) { return argc; } It was compiled with: powerpc-generic-linux-gnu-gcc -o testprog testprog.c Valgrind was compiled like this: ./configure --host=powerpc-generic-linux-gnu make The full program output is as follows: # valgrind -v ./testprog ==466== Memcheck, a memory error detector ==466== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==466== Using Valgrind-3.15.0-608cb11914-20190413 and LibVEX; rerun with -h for copyright info ==466== Command: ./testprog ==466== --466-- Valgrind options: --466-- -v --466-- Contents of /proc/version: --466-- Linux version 4.9.59 (build@engdev) (gcc version 6.3.0 (crosstool-NG crosstool-ng-1.23.0) ) #0 PREEMPT Mon Mar 9 10:36:51 EDT 2020 --466-- --466-- Arch and hwcaps: PPC32, BigEndian, ppc32-int-flt-GX --466-- Page sizes: currently 4096, max supported 65536 --466-- Valgrind library directory: /usr/local/lib/valgrind --466-- Reading syms from /lib/ld-2.25.so --466-- Reading syms from /tmp/testprog --466-- Reading syms from /usr/local/lib/valgrind/memcheck-ppc32-linux --466-- object doesn't have a dynamic symbol table --466-- Scheduler: using generic scheduler lock implementation. --466-- Reading suppressions file: /usr/local/lib/valgrind/default.supp ==466== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-466-by-root-on-??? ==466== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-466-by-root-on-??? ==466== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-466-by-root-on-??? ==466== ==466== TO CONTROL THIS PROCESS USING vgdb (which you probably ==466== don't want to do, unless you know exactly what you're doing, ==466== or are doing some strange experiment): ==466== /usr/local/lib/valgrind/../../bin/vgdb --pid=466 ...command... ==466== ==466== TO DEBUG THIS PROCESS USING GDB: start GDB like this ==466== /path/to/gdb ./testprog ==466== and then give GDB the following command ==466== target remote | /usr/local/lib/valgrind/../../bin/vgdb --pid=466 ==466== --pid is optional if only one valgrind process is running ==466== --466-- REDIR: 0x401b250 (ld.so.1:strcmp) redirected to 0x58116d7c (vgPlain_ppc32_linux_REDIR_FOR_strcmp) --466-- REDIR: 0x401b3b4 (ld.so.1:strlen) redirected to 0x58116d54 (vgPlain_ppc32_linux_REDIR_FOR_strlen) --466-- REDIR: 0x401b174 (ld.so.1:index) redirected to 0x58116df0 (vgPlain_ppc32_linux_REDIR_FOR_strchr) --466-- Reading syms from /usr/local/lib/valgrind/vgpreload_core-ppc32-linux.so --466-- Reading syms from /usr/local/lib/valgrind/vgpreload_memcheck-ppc32-linux.so --466-- REDIR: 0x401bec8 (ld.so.1:memcpy) redirected to 0xffba7e8 (memcpy) --466-- REDIR: 0x401b820 (ld.so.1:bcmp) redirected to 0xffbb8c4 (bcmp) --466-- Reading syms from /lib/libc-2.25.so ./testprog: symbol lookup error: /usr/local/lib/valgrind/vgpreload_memcheck-ppc32-linux.so: undefined symbol: _restgpr_30_x disInstr(ppc): unhandled instruction: 0x0 primary 0(0x0), secondary 0(0x0) ==466== valgrind: Unrecognised instruction at address 0xffefa74. ==466== at 0xFFEFA74: ??? (in /usr/local/lib/valgrind/vgpreload_core-ppc32-linux.so) ==466== by 0x404082F: ??? (in /lib/ld-2.25.so) ==466== by 0x4018D27: _dl_signal_error (dl-error-skeleton.c:134) ==466== by 0x4018E67: _dl_signal_cerror (dl-error-skeleton.c:166) ==466== by 0x400AECF: _dl_lookup_symbol_x (dl-lookup.c:874) ==466== by 0x400C977: elf_machine_rela (dl-machine.h:315) ==466== by 0x400C977: elf_dynamic_do_Rela (do-rel.h:170) ==466== by 0x400C977: _dl_relocate_object (dl-reloc.c:259) ==466== by 0x4004923: dl_main (rtld.c:2051) ==466== by 0x4017B73: _dl_sysdep_start (dl-sysdep.c:253) ==466== by 0x4005A3F: _dl_start_final (rtld.c:305) ==466== by 0x4005DD3: _dl_start (rtld.c:413) ==466== by 0x401997B: _start (dl-start.S:38) ==466== Your program just tried to execute an instruction that Valgrind ==466== did not recognise. There are two possible reasons for this. ==466== 1. Your program has a bug and erroneously jumped to a non-code ==466== location. If you are running Memcheck and you just saw a ==466== warning about a bad jump, it's probably your program's fault. ==466== 2. The instruction is legitimate but Valgrind doesn't handle it, ==466== i.e. it's Valgrind's fault. If you think this is the case or ==466== you are not sure, please let us know and we'll try to fix it. ==466== Either way, Valgrind will now raise a SIGILL signal which will ==466== probably kill your program. ==466== ==466== Process terminating with default action of signal 4 (SIGILL): dumping core ==466== Illegal opcode at address 0xFFEFA74 ==466== at 0xFFEFA74: ??? (in /usr/local/lib/valgrind/vgpreload_core-ppc32-linux.so) ==466== by 0x404082F: ??? (in /lib/ld-2.25.so) ==466== by 0x4018D27: _dl_signal_error (dl-error-skeleton.c:134) ==466== by 0x4018E67: _dl_signal_cerror (dl-error-skeleton.c:166) ==466== by 0x400AECF: _dl_lookup_symbol_x (dl-lookup.c:874) ==466== by 0x400C977: elf_machine_rela (dl-machine.h:315) ==466== by 0x400C977: elf_dynamic_do_Rela (do-rel.h:170) ==466== by 0x400C977: _dl_relocate_object (dl-reloc.c:259) ==466== by 0x4004923: dl_main (rtld.c:2051) ==466== by 0x4017B73: _dl_sysdep_start (dl-sysdep.c:253) ==466== by 0x4005A3F: _dl_start_final (rtld.c:305) ==466== by 0x4005DD3: _dl_start (rtld.c:413) ==466== by 0x401997B: _start (dl-start.S:38) ==466== ==466== HEAP SUMMARY: ==466== in use at exit: 0 bytes in 0 blocks ==466== total heap usage: 0 allocs, 0 frees, 0 bytes allocated ==466== ==466== All heap blocks were freed -- no leaks are possible ==466== ==466== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) What am I doing wrong? Could there be a problem with my toolchain? |
From: Derrick M. <der...@gm...> - 2020-03-16 20:59:55
|
Hi, I am writing a tool that is trying to execute an arbitrary function in the client and report the program state immediately after finishing. I have been able to get the client to jump to the function I want and execute. However to get that to work, I have registered a function via VG_(track_pre_thread_ll_create) that calls VG_(fork), after which only the child process continues to execute the client code. The parent waits on the child to exit via VG_(waitpid), and reads the program state reported by the child on a pipe. The parent then waits for an external process to issue the command to execute the same function again. If the forks and the child runs the same function, the child process hangs while trying to acquire the BigLock. I was able to solve the issue by having my child manually call VG_(release_BigLock_LL)(NULL) before VG_(exit)(). This seems like a bug, as I would assume the VG_(exit) would release any held locks, however I am not sure if there is a reason for not doing this. If it is a bug, I would be happy to make a bug report for this, along with a minimal example. -- Derrick McKee Phone: (703) 957-9362 Email: der...@gm... |
From: Mark W. <ma...@kl...> - 2020-03-16 10:54:36
|
Hi Bhargav, On Mon, Mar 16, 2020 at 10:44:42AM +0530, bhargav p wrote: > I am trying to start a process with valgrind. In my code, I am using setns > call. > > When I start process with valgrind, seeing below error and process is > getting exited. > > "Failed to switch to namespace ns1: Function not implemented" > > > If I start process without valgrind, I am not seeing this error message. > > > Can someone please help me how to resolve this? There is a bug report about this already: https://bugs.kde.org/show_bug.cgi?id=343099 It does have a patch attached. Maybe you can test it? Cheers, Mark |
From: bhargav p <bha...@gm...> - 2020-03-16 05:15:03
|
Hi Team, I am trying to start a process with valgrind. In my code, I am using setns call. When I start process with valgrind, seeing below error and process is getting exited. "Failed to switch to namespace ns1: Function not implemented" If I start process without valgrind, I am not seeing this error message. Can someone please help me how to resolve this? -Bhargav |
From: ashish y. <ash...@gm...> - 2020-03-07 18:52:36
|
Hi, I am using valgrind-3.15.0 on the cpu e500v2. Linux kernel version is 2.6.27.47 . # LD_SHOW_AUXV=1 /bin/true | grep AT_HWCAP AT_HWCAP: booke efpdouble efpsingle spe mmu ppc32 While using valgrind, its throwing Illegal instruction error: disInstr(ppc): unhandled instruction: 0x10E40301 primary 4(0x4), secondary 769(0x301) ==13854== valgrind: Unrecognised instruction at address 0xffd9510. ==13854== at 0xFFD9510: memcpy (in /lib/ld-2.8.so) ==13854== by 0xFFC21BF: _dl_start_final (rtld.c:287) ==13854== by 0xFFD62C7: _start (in /lib/ld-2.8.so) Could you please provide me steps to resolve this issue. Please let me know if you need more information from my side. Thanks & Regards Ashish Yadav |
From: Derrick M. <der...@gm...> - 2020-03-05 21:59:20
|
Thanks for the tip. I saw that code while grepping for VG_(set_IP), and I thought I was doing what that function was doing. However, looking closer, I see that the IP is being set to the result of VG_(client_freeres) which contains the address of the client function that is called. I am pretty sure that I am not getting the correct address of the client function I want to call. I've searched around for some function that can provide me the client address given a function name, and there doesn't appear to be one. Any other way I can get a client function address? As an aside, I am interested in why the client program executes normally, despite me calling VG_(set_IP) with an invalid address from SE_(start_client_code) above. I read that function executes in the client context, but nothing seemingly changes when I call VG_(set_IP) in a function tracking thread creation, which runs in the tool's context. I would expect the tool or the client to crash when I set an invalid IP, but the client executes as if the IP is correct. On Thu, Mar 5, 2020 at 3:58 PM Philippe Waroquiers <phi...@sk...> wrote: > > You might find some inspiration by reading the function final_tidyup > in coregrind/m_main.c. > > final_tidyup is calling some client code part of malloc library. > > Philippe > > > On Thu, 2020-03-05 at 11:27 -0500, Derrick McKee wrote: > > My intent is to write a tool that waits for another process to write > > client addresses to a pipe, and then execute the specified function > > with a fixed number of arguments. I'm unconcerned about whether the > > specified function actually has the assumed arity or not, though. I > > tried the following, but it seems that the function is not called. > > However, this is what I am wanting to do. > > --------------------------------------------- > > static void SE_(start_client_code)(ThreadId tid, ULong blocks_dispatched) { > > if (!client_running && tid == client_thread_id) { > > VG_(umsg) > > ("Thread %u is starting executing at instruction 0x%lx with " > > "blocks_dispatched=%llu\n", > > tid, VG_(get_IP)(tid), blocks_dispatched); > > client_running = True; > > VG_(umsg)("Thread %u is about to call target function\n", tid); > > OrigFn fn; > > fn.nraddr = (Addr)0x401145; // Function address in client > > CALL_FN_v_v(fn); // Assume no arguments are passed in > > VG_(umsg)("Thread %u returned\n", tid); > > client_running = False; > > } > > } > > > > static void SE_(pre_clo_init)(void) { > > .... > > VG_(track_start_client_code)(SE_(start_client_code)); > > } > > > > VG_DETERMINE_INTERFACE_VERSION(SE_(pre_clo_init)) > > -------------------------------------- > > Reading the documentation, it seems that CALL_FN_v_v should be called > > from the client code, but I want to use my tool with any binary. I > > also tried using the VG_(set_IP) function (admittedly against the > > valgrind tool contract), but that seemingly didn't work either. Any > > other thoughts, or is this just something I cannot do with valgrind? > > > > On Tue, Mar 3, 2020 at 11:01 AM Derrick McKee <der...@gm...> wrote: > > > I am also interested in instrumenting the guest binary, as well as > > > change which guest function I execute at run time. So LD_PRELOAD > > > won't help me here. > > > > > > On Tue, Mar 3, 2020 at 10:41 AM John Reiser <jr...@bi...> wrote: > > > > > I am trying to make a tool that intercepts the call to main, and then > > > > > call an arbitrary function within the guest with arbitrary function > > > > > arguments. > > > > > > > > This can be done without valgrind by using LD_PRELOAD environment variable > > > > and RTLD_NEXT (see "man dlsym"): > > > > > > > > LD_PRELOAD=main_interceptor.so ./my_app args... > > > > > > > > where main_interceptor.so is a shared library that has a function main() > > > > and that can call the original main() by using dlsym(RTLD_NEXT, "main"). > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Valgrind-users mailing list > > > > Val...@li... > > > > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > > > > > > > > -- > > > Derrick McKee > > > Phone: (703) 957-9362 > > > Email: der...@gm... > > > > > -- Derrick McKee Phone: (703) 957-9362 Email: der...@gm... |
From: Philippe W. <phi...@sk...> - 2020-03-05 20:58:19
|
You might find some inspiration by reading the function final_tidyup in coregrind/m_main.c. final_tidyup is calling some client code part of malloc library. Philippe On Thu, 2020-03-05 at 11:27 -0500, Derrick McKee wrote: > My intent is to write a tool that waits for another process to write > client addresses to a pipe, and then execute the specified function > with a fixed number of arguments. I'm unconcerned about whether the > specified function actually has the assumed arity or not, though. I > tried the following, but it seems that the function is not called. > However, this is what I am wanting to do. > --------------------------------------------- > static void SE_(start_client_code)(ThreadId tid, ULong blocks_dispatched) { > if (!client_running && tid == client_thread_id) { > VG_(umsg) > ("Thread %u is starting executing at instruction 0x%lx with " > "blocks_dispatched=%llu\n", > tid, VG_(get_IP)(tid), blocks_dispatched); > client_running = True; > VG_(umsg)("Thread %u is about to call target function\n", tid); > OrigFn fn; > fn.nraddr = (Addr)0x401145; // Function address in client > CALL_FN_v_v(fn); // Assume no arguments are passed in > VG_(umsg)("Thread %u returned\n", tid); > client_running = False; > } > } > > static void SE_(pre_clo_init)(void) { > .... > VG_(track_start_client_code)(SE_(start_client_code)); > } > > VG_DETERMINE_INTERFACE_VERSION(SE_(pre_clo_init)) > -------------------------------------- > Reading the documentation, it seems that CALL_FN_v_v should be called > from the client code, but I want to use my tool with any binary. I > also tried using the VG_(set_IP) function (admittedly against the > valgrind tool contract), but that seemingly didn't work either. Any > other thoughts, or is this just something I cannot do with valgrind? > > On Tue, Mar 3, 2020 at 11:01 AM Derrick McKee <der...@gm...> wrote: > > I am also interested in instrumenting the guest binary, as well as > > change which guest function I execute at run time. So LD_PRELOAD > > won't help me here. > > > > On Tue, Mar 3, 2020 at 10:41 AM John Reiser <jr...@bi...> wrote: > > > > I am trying to make a tool that intercepts the call to main, and then > > > > call an arbitrary function within the guest with arbitrary function > > > > arguments. > > > > > > This can be done without valgrind by using LD_PRELOAD environment variable > > > and RTLD_NEXT (see "man dlsym"): > > > > > > LD_PRELOAD=main_interceptor.so ./my_app args... > > > > > > where main_interceptor.so is a shared library that has a function main() > > > and that can call the original main() by using dlsym(RTLD_NEXT, "main"). > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Valgrind-users mailing list > > > Val...@li... > > > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > > > > > -- > > Derrick McKee > > Phone: (703) 957-9362 > > Email: der...@gm... > > |
From: Austin G. <aga...@aa...> - 2020-03-05 17:35:21
|
Hello! I am trying to call the function vsnprintf from within a wrapper for vnsprintf using the I_WRAP and CALL_FN macros provided by Valgrind. However, all of the CALL_FN macros only take longs as parameters. vsnprintf takes a va_list struct as one of its parameters. Is there a way to use call functions that take va_lists (or any sort of struct) as parameters from inside a wrapper? Best Regards, Austin Gadient |
From: Derrick M. <der...@gm...> - 2020-03-05 16:27:34
|
My intent is to write a tool that waits for another process to write client addresses to a pipe, and then execute the specified function with a fixed number of arguments. I'm unconcerned about whether the specified function actually has the assumed arity or not, though. I tried the following, but it seems that the function is not called. However, this is what I am wanting to do. --------------------------------------------- static void SE_(start_client_code)(ThreadId tid, ULong blocks_dispatched) { if (!client_running && tid == client_thread_id) { VG_(umsg) ("Thread %u is starting executing at instruction 0x%lx with " "blocks_dispatched=%llu\n", tid, VG_(get_IP)(tid), blocks_dispatched); client_running = True; VG_(umsg)("Thread %u is about to call target function\n", tid); OrigFn fn; fn.nraddr = (Addr)0x401145; // Function address in client CALL_FN_v_v(fn); // Assume no arguments are passed in VG_(umsg)("Thread %u returned\n", tid); client_running = False; } } static void SE_(pre_clo_init)(void) { .... VG_(track_start_client_code)(SE_(start_client_code)); } VG_DETERMINE_INTERFACE_VERSION(SE_(pre_clo_init)) -------------------------------------- Reading the documentation, it seems that CALL_FN_v_v should be called from the client code, but I want to use my tool with any binary. I also tried using the VG_(set_IP) function (admittedly against the valgrind tool contract), but that seemingly didn't work either. Any other thoughts, or is this just something I cannot do with valgrind? On Tue, Mar 3, 2020 at 11:01 AM Derrick McKee <der...@gm...> wrote: > > I am also interested in instrumenting the guest binary, as well as > change which guest function I execute at run time. So LD_PRELOAD > won't help me here. > > On Tue, Mar 3, 2020 at 10:41 AM John Reiser <jr...@bi...> wrote: > > > > > I am trying to make a tool that intercepts the call to main, and then > > > call an arbitrary function within the guest with arbitrary function > > > arguments. > > > > This can be done without valgrind by using LD_PRELOAD environment variable > > and RTLD_NEXT (see "man dlsym"): > > > > LD_PRELOAD=main_interceptor.so ./my_app args... > > > > where main_interceptor.so is a shared library that has a function main() > > and that can call the original main() by using dlsym(RTLD_NEXT, "main"). > > > > > > > > > > > > > > > > _______________________________________________ > > Valgrind-users mailing list > > Val...@li... > > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > > > -- > Derrick McKee > Phone: (703) 957-9362 > Email: der...@gm... -- Derrick McKee Phone: (703) 957-9362 Email: der...@gm... |
From: Derrick M. <der...@gm...> - 2020-03-04 15:29:57
|
Thanks for the response. That's what I am seeing in my initial test, as I am getting undefined reference errors to std::cout during linking. On Wed, Mar 4, 2020 at 10:16 AM Tom Hughes <to...@co...> wrote: > > On 04/03/2020 14:46, Derrick McKee wrote: > > > Is it possible to write a tool using C++ instead of just C? > > In theory, maybe, but the problem you're going to have is that > you have no run time library support - no libstdc+++ and not even > any libc. So there are probably various things that need run time > support that just aren't going to work and you're not going to have > any of the normal library data structures and things. > > Tom > > -- > Tom Hughes (to...@co...) > http://compton.nu/ -- Derrick McKee Phone: (703) 957-9362 Email: der...@gm... |
From: Tom H. <to...@co...> - 2020-03-04 15:17:09
|
On 04/03/2020 14:46, Derrick McKee wrote: > Is it possible to write a tool using C++ instead of just C? In theory, maybe, but the problem you're going to have is that you have no run time library support - no libstdc+++ and not even any libc. So there are probably various things that need run time support that just aren't going to work and you're not going to have any of the normal library data structures and things. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |
From: Derrick M. <der...@gm...> - 2020-03-04 14:46:39
|
Hi, Is it possible to write a tool using C++ instead of just C? -- Derrick McKee Phone: (703) 957-9362 Email: der...@gm... |
From: Deene D. <dd...@ma...> - 2020-03-03 18:51:18
|
Hi, I'm running some Valgrind test programs (using 3.15.0) that trigger all of the Memcheck errors and have noticed that a suppression file (I was accidently loading) was suppressing a bunch of the issues, but on the surface the match was 'obj:*' for 'fun:*' which is not what I expected. e.g. without adding the suppression file I get the nice simple Definite Leak ==241898== 8 bytes in 1 blocks are definitely lost in loss record 1 of 2 ==241898== at 0x4C2BF0D: malloc (/valgrind/valgrind-3.15.0/src/valgrind-3.15.0/coregrind/m_replacemalloc/vg_replace_malloc.c:309) ==241898== by 0x400884: LDL_2() (/src/test_valgrind/test_ldl.cpp:72) ==241898== by 0x4008AE: main (/src/test_valgrind/test_ldl.cpp:80) ==241898== { <insert_a_suppression_name_here> Memcheck:Leak match-leak-kinds: definite fun:malloc fun:_Z5LDL_2v fun:main } Adding in the suppression file the issue is suppressed: --243931-- used_suppression: 1 <insert_a_suppression_name_here> /devel/valgrind_glnxa64.supp:17391 suppressed: 8 bytes in 1 blocks e.g. <insert_a_suppression_name_here> Memcheck:Leak match-leak-kinds:definite fun:malloc obj:* obj:* obj:* } After reading '2.5. Suppressing errors' from the user manual I would assume using an 'obj:' or a 'fun:' implied there had to be a match of that type, and that any wildcard kicked in after the type (i.e. shared lib or function) was matched. Is that not the case? i.e. is the above suppression really the same as { <insert_a_suppression_name_here> Memcheck:Leak match-leak-kinds:definite fun:malloc } Thanks |
From: Ben W. <ben...@co...> - 2020-03-03 16:10:02
|
Thanks. Obviously, I should have tried that before posting my question, although I would not have known how to obtain the answer without seeing your answer below. Not being familiar with the x86 asm language, I modified the foo.cpp program (explicitly assign y=0) and then g++ again, so I could compare the two asm lang outputs. After that, it was fairly clear that the compiler is not initializing y. Ben -----Original Message----- From: John Reiser <jr...@bi...> Sent: Monday, March 2, 2020 7:20 PM To: val...@li... Subject: Re: [Valgrind-users] detecting uninitialized values in debug builds On 3/2/20 22:02 UTC, Ben White wrote: > I've also been told that the g++ compiler will initialize all stack > objects to zero when compiling for debug (the -g option). Obviously you didn't try it. g++ 9.2.1 does not do that. $ cat foo.cpp int g(int x, int y); int f(int x) { int y; return g(x, y); // uninit use of y } $ g++ -g -S foo.cpp $ cat foo.s .file "foo.cpp" .text .Ltext0: .globl _Z1fi .type _Z1fi, @function _Z1fi: .LFB0: .file 1 "foo.cpp" .loc 1 4 1 .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $32, %rsp movl %edi, -20(%rbp) .loc 1 6 17 movl -4(%rbp), %edx // -4(%rbp) is never initialized movl -20(%rbp), %eax movl %edx, %esi // 2nd parameter to g movl %eax, %edi call _Z1gii .loc 1 7 1 leave .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE0: .size _Z1fi, .-_Z1fi [[snip]] .section .debug_str,"MS",@progbits,1 .LASF1: .string "foo.cpp" .LASF0: .string "GNU C++14 9.2.1 20190827 (Red Hat 9.2.1-1) -mtune=generic -march=x86-64 -g" .LASF3: .string "_Z1fi" .LASF2: .string "/home/user" .ident "GCC: (GNU) 9.2.1 20190827 (Red Hat 9.2.1-1)" .section .note.GNU-stack,"",@progbits $ _______________________________________________ Valgrind-users mailing list Val...@li... https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fvalgrind-users&data=02%7C01%7Cben.white%40cohu.com%7C4af3d19203134610feef08d7bf220529%7Ceacc2a35149847488d1f03fb953672f8%7C0%7C0%7C637188025165390441&sdata=CkROtsN2ADGpGORSPKlYSEqmibqd3VLSA0LfO8U2giU%3D&reserved=0 |
From: Derrick M. <der...@gm...> - 2020-03-03 16:01:46
|
I am also interested in instrumenting the guest binary, as well as change which guest function I execute at run time. So LD_PRELOAD won't help me here. On Tue, Mar 3, 2020 at 10:41 AM John Reiser <jr...@bi...> wrote: > > > I am trying to make a tool that intercepts the call to main, and then > > call an arbitrary function within the guest with arbitrary function > > arguments. > > This can be done without valgrind by using LD_PRELOAD environment variable > and RTLD_NEXT (see "man dlsym"): > > LD_PRELOAD=main_interceptor.so ./my_app args... > > where main_interceptor.so is a shared library that has a function main() > and that can call the original main() by using dlsym(RTLD_NEXT, "main"). > > > > > > > > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users -- Derrick McKee Phone: (703) 957-9362 Email: der...@gm... |
From: John R. <jr...@bi...> - 2020-03-03 15:39:09
|
> I am trying to make a tool that intercepts the call to main, and then > call an arbitrary function within the guest with arbitrary function > arguments. This can be done without valgrind by using LD_PRELOAD environment variable and RTLD_NEXT (see "man dlsym"): LD_PRELOAD=main_interceptor.so ./my_app args... where main_interceptor.so is a shared library that has a function main() and that can call the original main() by using dlsym(RTLD_NEXT, "main"). |
From: Derrick M. <der...@gm...> - 2020-03-03 14:45:12
|
Hi, I am trying to make a tool that intercepts the call to main, and then call an arbitrary function within the guest with arbitrary function arguments. Is this possible? Thanks. -- Derrick McKee Phone: (703) 957-9362 Email: der...@gm... |
From: Dallman, J. <joh...@si...> - 2020-03-03 12:39:52
|
> However, I've also been told that the g++ compiler will initialize all stack objects to zero when compiling for debug (the -g option). Yet, valgrind still detects the un-init condition. I think whoever told you that was confusing it with Microsoft Visual Studio. The default debug-build configuration for that IDE does initialise all variables. -- John Dallman ----------------- Siemens Industry Software Limited is a limited company registered in England and Wales. Registered number: 3476850. Registered office: Faraday House, Sir William Siemens Square, Frimley, Surrey, GU16 8QD. |
From: John R. <jr...@bi...> - 2020-03-03 03:20:23
|
On 3/2/20 22:02 UTC, Ben White wrote: > I’ve also been told that the g++ compiler will initialize all stack > objects to zero when compiling for debug (the -g option). Obviously you didn't try it. g++ 9.2.1 does not do that. $ cat foo.cpp int g(int x, int y); int f(int x) { int y; return g(x, y); // uninit use of y } $ g++ -g -S foo.cpp $ cat foo.s .file "foo.cpp" .text .Ltext0: .globl _Z1fi .type _Z1fi, @function _Z1fi: .LFB0: .file 1 "foo.cpp" .loc 1 4 1 .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $32, %rsp movl %edi, -20(%rbp) .loc 1 6 17 movl -4(%rbp), %edx // -4(%rbp) is never initialized movl -20(%rbp), %eax movl %edx, %esi // 2nd parameter to g movl %eax, %edi call _Z1gii .loc 1 7 1 leave .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE0: .size _Z1fi, .-_Z1fi [[snip]] .section .debug_str,"MS",@progbits,1 .LASF1: .string "foo.cpp" .LASF0: .string "GNU C++14 9.2.1 20190827 (Red Hat 9.2.1-1) -mtune=generic -march=x86-64 -g" .LASF3: .string "_Z1fi" .LASF2: .string "/home/user" .ident "GCC: (GNU) 9.2.1 20190827 (Red Hat 9.2.1-1)" .section .note.GNU-stack,"",@progbits $ |
From: Ben W. <ben...@co...> - 2020-03-03 01:37:14
|
Hello, I have seen cases where valgrind (memcheck) will report conditional jump or move based on uninitialized value, and when examining the relevant source code, I can see that the value or variable is indeed uninitialized. However, I've also been told that the g++ compiler will initialize all stack objects to zero when compiling for debug (the -g option). Yet, valgrind still detects the un-init condition. Does anybody know how this works behind the scenes? This is mainly a curiosity question, no need to research it. Ben White Diagnostics, Calibration, and Verification (DCV) Cohu Inc. |
From: Jeff H. <jef...@gm...> - 2020-03-02 06:05:24
|
The attached patches address these issues, which are caused by the correct implementation of deprecated function deletion in Open-MPI 4. https://www.open-mpi.org/faq/?category=mpi-removed has details. This is my first attempted contribution to Valgrind so please let me know if the patches need modifications to be accepted. Do I need to state that I license them as "GPLv2, or (at your option) any later version," in the patches? I would not object at all if someone wants the MPI_UB/MPI_LB workaround to be different, since there are a bunch of valid ways to implement it. I suppose "#ifdef MPI_UB" etc. is simpler, but I can't remember off the top of my head if the MPI standard requires that identifier to be a preprocessor symbol or if that is merely common practice, so I did not want to use a direct preprocessor test on it. Best, Jeff On Sun, Mar 1, 2020 at 1:35 PM Derrick McKee <der...@gm...> wrote: > I am having a problem compiling Valgrind using OpenMPI 4.0.2. The > error is listed below. It seems it is the same bug logged in [1]. > Has there been any patch made that resolves the issue? Thanks. > > - Derrick > > [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946329 > > Error > ----------------------------------------------------------------------- > mkdir -p ../.in_place; \ > for f in ; do \ > rm -f ../.in_place/$f.dSYM; \ > ln -f -s ../mpi/$f.dSYM ../.in_place; \ > done > In file included from ../../mpi/libmpiwrap.c:116: > ../../mpi/libmpiwrap.c: In function ‘showTy’: > ../../mpi/libmpiwrap.c:281:19: error: expected expression before > ‘_Static_assert’ > 281 | else if (ty == MPI_UB) fprintf(f,"UB"); > | ^~~~~~ > ../../mpi/libmpiwrap.c:282:19: error: expected expression before > ‘_Static_assert’ > 282 | else if (ty == MPI_LB) fprintf(f,"LB"); > | ^~~~~~ > ../../mpi/libmpiwrap.c: In function ‘showCombiner’: > ../../mpi/libmpiwrap.c:354:12: error: expected expression before > ‘_Static_assert’ > 354 | case MPI_COMBINER_HVECTOR_INTEGER: fprintf(f, > "HVECTOR_INTEGER"); break; > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../../mpi/libmpiwrap.c:354:12: error: expected expression before > ‘_Static_assert’ > ../../mpi/libmpiwrap.c:354:40: error: expected expression before ‘:’ token > 354 | case MPI_COMBINER_HVECTOR_INTEGER: fprintf(f, > "HVECTOR_INTEGER"); break; > | ^ > In file included from ../../mpi/libmpiwrap.c:116: > ../../mpi/libmpiwrap.c:359:12: error: expected expression before > ‘_Static_assert’ > 359 | case MPI_COMBINER_HINDEXED_INTEGER: fprintf(f, > "HINDEXED_INTEGER"); break; > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../../mpi/libmpiwrap.c:359:12: error: expected expression before > ‘_Static_assert’ > ../../mpi/libmpiwrap.c:359:41: error: expected expression before ‘:’ token > 359 | case MPI_COMBINER_HINDEXED_INTEGER: fprintf(f, > "HINDEXED_INTEGER"); break; > | ^ > In file included from ../../mpi/libmpiwrap.c:116: > ../../mpi/libmpiwrap.c:366:12: error: expected expression before > ‘_Static_assert’ > 366 | case MPI_COMBINER_STRUCT_INTEGER: fprintf(f, > "STRUCT_INTEGER"); break; > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../../mpi/libmpiwrap.c:366:12: error: expected expression before > ‘_Static_assert’ > ../../mpi/libmpiwrap.c:366:39: error: expected expression before ‘:’ token > 366 | case MPI_COMBINER_STRUCT_INTEGER: fprintf(f, > "STRUCT_INTEGER"); break; > | ^ > ../../mpi/libmpiwrap.c: In function ‘extentOfTy’: > ../../mpi/libmpiwrap.c:462:8: warning: implicit declaration of > function ‘PMPI_Type_extent’; did you mean ‘MPI_Type_extent’? > [-Wimplicit-function-declaration] > 462 | r = PMPI_Type_extent(ty, &n); > | ^~~~~~~~~~~~~~~~ > | MPI_Type_extent > In file included from ../../mpi/libmpiwrap.c:116: > ../../mpi/libmpiwrap.c: In function ‘walk_type’: > ../../mpi/libmpiwrap.c:736:17: error: expected expression before > ‘_Static_assert’ > 736 | if (ty == MPI_LB || ty == MPI_UB) > > -- > Derrick McKee > Phone: (703) 957-9362 > Email: der...@gm... > > > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > -- Jeff Hammond jef...@gm... http://jeffhammond.github.io/ |
From: Jeff H. <jef...@gm...> - 2020-03-01 23:31:56
|
_Static_assert is C11. Are you using a compiler that supports C11 and are you using the correct flags to activate that support? Jeff On Sun, Mar 1, 2020 at 1:35 PM Derrick McKee <der...@gm...> wrote: > I am having a problem compiling Valgrind using OpenMPI 4.0.2. The > error is listed below. It seems it is the same bug logged in [1]. > Has there been any patch made that resolves the issue? Thanks. > > - Derrick > > [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946329 > > Error > ----------------------------------------------------------------------- > mkdir -p ../.in_place; \ > for f in ; do \ > rm -f ../.in_place/$f.dSYM; \ > ln -f -s ../mpi/$f.dSYM ../.in_place; \ > done > In file included from ../../mpi/libmpiwrap.c:116: > ../../mpi/libmpiwrap.c: In function ‘showTy’: > ../../mpi/libmpiwrap.c:281:19: error: expected expression before > ‘_Static_assert’ > 281 | else if (ty == MPI_UB) fprintf(f,"UB"); > | ^~~~~~ > ../../mpi/libmpiwrap.c:282:19: error: expected expression before > ‘_Static_assert’ > 282 | else if (ty == MPI_LB) fprintf(f,"LB"); > | ^~~~~~ > ../../mpi/libmpiwrap.c: In function ‘showCombiner’: > ../../mpi/libmpiwrap.c:354:12: error: expected expression before > ‘_Static_assert’ > 354 | case MPI_COMBINER_HVECTOR_INTEGER: fprintf(f, > "HVECTOR_INTEGER"); break; > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../../mpi/libmpiwrap.c:354:12: error: expected expression before > ‘_Static_assert’ > ../../mpi/libmpiwrap.c:354:40: error: expected expression before ‘:’ token > 354 | case MPI_COMBINER_HVECTOR_INTEGER: fprintf(f, > "HVECTOR_INTEGER"); break; > | ^ > In file included from ../../mpi/libmpiwrap.c:116: > ../../mpi/libmpiwrap.c:359:12: error: expected expression before > ‘_Static_assert’ > 359 | case MPI_COMBINER_HINDEXED_INTEGER: fprintf(f, > "HINDEXED_INTEGER"); break; > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../../mpi/libmpiwrap.c:359:12: error: expected expression before > ‘_Static_assert’ > ../../mpi/libmpiwrap.c:359:41: error: expected expression before ‘:’ token > 359 | case MPI_COMBINER_HINDEXED_INTEGER: fprintf(f, > "HINDEXED_INTEGER"); break; > | ^ > In file included from ../../mpi/libmpiwrap.c:116: > ../../mpi/libmpiwrap.c:366:12: error: expected expression before > ‘_Static_assert’ > 366 | case MPI_COMBINER_STRUCT_INTEGER: fprintf(f, > "STRUCT_INTEGER"); break; > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../../mpi/libmpiwrap.c:366:12: error: expected expression before > ‘_Static_assert’ > ../../mpi/libmpiwrap.c:366:39: error: expected expression before ‘:’ token > 366 | case MPI_COMBINER_STRUCT_INTEGER: fprintf(f, > "STRUCT_INTEGER"); break; > | ^ > ../../mpi/libmpiwrap.c: In function ‘extentOfTy’: > ../../mpi/libmpiwrap.c:462:8: warning: implicit declaration of > function ‘PMPI_Type_extent’; did you mean ‘MPI_Type_extent’? > [-Wimplicit-function-declaration] > 462 | r = PMPI_Type_extent(ty, &n); > | ^~~~~~~~~~~~~~~~ > | MPI_Type_extent > In file included from ../../mpi/libmpiwrap.c:116: > ../../mpi/libmpiwrap.c: In function ‘walk_type’: > ../../mpi/libmpiwrap.c:736:17: error: expected expression before > ‘_Static_assert’ > 736 | if (ty == MPI_LB || ty == MPI_UB) > > -- > Derrick McKee > Phone: (703) 957-9362 > Email: der...@gm... > > > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > -- Jeff Hammond jef...@gm... http://jeffhammond.github.io/ |
From: Derrick M. <der...@gm...> - 2020-03-01 21:34:07
|
I am having a problem compiling Valgrind using OpenMPI 4.0.2. The error is listed below. It seems it is the same bug logged in [1]. Has there been any patch made that resolves the issue? Thanks. - Derrick [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946329 Error ----------------------------------------------------------------------- mkdir -p ../.in_place; \ for f in ; do \ rm -f ../.in_place/$f.dSYM; \ ln -f -s ../mpi/$f.dSYM ../.in_place; \ done In file included from ../../mpi/libmpiwrap.c:116: ../../mpi/libmpiwrap.c: In function ‘showTy’: ../../mpi/libmpiwrap.c:281:19: error: expected expression before ‘_Static_assert’ 281 | else if (ty == MPI_UB) fprintf(f,"UB"); | ^~~~~~ ../../mpi/libmpiwrap.c:282:19: error: expected expression before ‘_Static_assert’ 282 | else if (ty == MPI_LB) fprintf(f,"LB"); | ^~~~~~ ../../mpi/libmpiwrap.c: In function ‘showCombiner’: ../../mpi/libmpiwrap.c:354:12: error: expected expression before ‘_Static_assert’ 354 | case MPI_COMBINER_HVECTOR_INTEGER: fprintf(f, "HVECTOR_INTEGER"); break; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../mpi/libmpiwrap.c:354:12: error: expected expression before ‘_Static_assert’ ../../mpi/libmpiwrap.c:354:40: error: expected expression before ‘:’ token 354 | case MPI_COMBINER_HVECTOR_INTEGER: fprintf(f, "HVECTOR_INTEGER"); break; | ^ In file included from ../../mpi/libmpiwrap.c:116: ../../mpi/libmpiwrap.c:359:12: error: expected expression before ‘_Static_assert’ 359 | case MPI_COMBINER_HINDEXED_INTEGER: fprintf(f, "HINDEXED_INTEGER"); break; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../mpi/libmpiwrap.c:359:12: error: expected expression before ‘_Static_assert’ ../../mpi/libmpiwrap.c:359:41: error: expected expression before ‘:’ token 359 | case MPI_COMBINER_HINDEXED_INTEGER: fprintf(f, "HINDEXED_INTEGER"); break; | ^ In file included from ../../mpi/libmpiwrap.c:116: ../../mpi/libmpiwrap.c:366:12: error: expected expression before ‘_Static_assert’ 366 | case MPI_COMBINER_STRUCT_INTEGER: fprintf(f, "STRUCT_INTEGER"); break; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../mpi/libmpiwrap.c:366:12: error: expected expression before ‘_Static_assert’ ../../mpi/libmpiwrap.c:366:39: error: expected expression before ‘:’ token 366 | case MPI_COMBINER_STRUCT_INTEGER: fprintf(f, "STRUCT_INTEGER"); break; | ^ ../../mpi/libmpiwrap.c: In function ‘extentOfTy’: ../../mpi/libmpiwrap.c:462:8: warning: implicit declaration of function ‘PMPI_Type_extent’; did you mean ‘MPI_Type_extent’? [-Wimplicit-function-declaration] 462 | r = PMPI_Type_extent(ty, &n); | ^~~~~~~~~~~~~~~~ | MPI_Type_extent In file included from ../../mpi/libmpiwrap.c:116: ../../mpi/libmpiwrap.c: In function ‘walk_type’: ../../mpi/libmpiwrap.c:736:17: error: expected expression before ‘_Static_assert’ 736 | if (ty == MPI_LB || ty == MPI_UB) -- Derrick McKee Phone: (703) 957-9362 Email: der...@gm... |
From: Volker W. <vol...@gm...> - 2020-02-16 22:02:09
|
Hello, Valgrind reports "invalid read" in my program, but only if I compile it with -O3 and not if I compile it with -O2, -O1 or -O0. The -g option doesn't change this. Is it possible that valgrind reports false positives if the -O3 option is used? If yes, how can I confirm this message is indeed a false positive? I couldn't find anything in the documentation except for this quote from https://valgrind.org/docs/manual/quick-start.html: Compile your program with |-g| to include debugging information so that Memcheck's error messages include exact line numbers. Using |-O0| is also a good idea, if you can tolerate the slowdown. With |-O1| line numbers in error messages can be inaccurate, although generally speaking running Memcheck on code compiled at |-O1| works fairly well, and the speed improvement compared to running |-O0| is quite significant. Use of |-O2| and above is not recommended as Memcheck occasionally reports uninitialised-value errors which don't really exist. But here, they only talk about uninitialised-value's and not about invalid-reed's. Greetings Volker Weißmann |