I am trying to debug an mpi application, but I am getting a SIGILL from valgrind:
==98948== Your program just tried to execute an instruction that Valgrind
==98948== did not recognise. There are two possible reasons for this.
==98948== 1. Your program has a bug and erroneously jumped to a non-code
==98948== location. If you are running Memcheck and you just saw a
==98948== warning about a bad jump, it's probably your program's fault.
==98948== 2. The instruction is legitimate but Valgrind doesn't handle it,
==98948== i.e. it's Valgrind's fault. If you think this is the case or
==98948== you are not sure, please let us know and we'll try to fix it.
==98948== Either way, Valgrind will now raise a SIGILL signal which will
==98948== probably kill your program.
vex amd64->IR: unhandled instruction bytes: 0x62 0xF1 0x7F 0x8 0x7F 0x45 0x4 0x4D 0x85 0xED
vex amd64->IR: REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR: VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=NONE
vex amd64->IR: PFX.66=0 PFX.F2=0 PFX.F3=0
==98947== valgrind: Unrecognised instruction at address 0x48e424d.
I failed to find a list of instructions, thus I am not sure whether this is a bug in valgrind, and that should be a valid instruction on x86_64, or whether for some reason that illegal instruction is handled differently / is only executed with valgrind, as without valgrind the program startups fine.
This is on a Intel(R) Xeon(R) Platinum 8360Y CPU @ 2.40GHz
, compiled with gcc14 and -march=native
. If I compile with less optimisations, the SIGILL is not triggered, whicht makes me think it could really be a valid instruction that valgrind is not aware yet, but I could not find a source where I could look up this instruction.