https://bugs.kde.org/show_bug.cgi?id=489221
Bug ID: 489221
Summary: Unrecognized instruction: _mm256_cvtps_ph (vcvtps2ph)
Classification: Developer tools
Product: valgrind
Version: 3.19.0
Platform: unspecified
OS: Unspecified
Status: REPORTED
Severity: normal
Priority: NOR
Component: vex
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 171003
--> https://bugs.kde.org/attachment.cgi?id=171003&action=edit
Minimal reproducer for the issue
SUMMARY
I am working on code that uses half-precision floating point numbers as a
storage format. However, when I run Valgrind on the application, it fails with
Unrecognized instruction on the instructions that do the float to half
conversion.
STEPS TO REPRODUCE
1. Save the attached reproducer `repro.c`
2. Compile with `gcc repro.c -march=haswell`
3. Run `valgrind ./a.out`
OBSERVED RESULT
(With Valgrind 3.16 but have confirmed the same issue exists with 3.19):
$ valgrind ./a.out
==1257== Memcheck, a memory error detector
==1257== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1257== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==1257== Command: ./a.out
==1257==
vex amd64->IR: unhandled instruction bytes: 0xC4 0xE3 0x7D 0x1D 0xC0 0x0 0xC5
0xF9 0x7F 0x44
vex amd64->IR: REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR: VEX=1 VEX.L=1 VEX.nVVVV=0x0 ESC=0F3A
vex amd64->IR: PFX.66=1 PFX.F2=0 PFX.F3=0
==1257== valgrind: Unrecognised instruction at address 0x109182.
==1257== at 0x109182: FloatToHalf (in /data/vagrant/valgrind/a.out)
==1257== by 0x10922A: main (in /data/vagrant/valgrind/a.out)
==1257== Your program just tried to execute an instruction that Valgrind
==1257== did not recognise. There are two possible reasons for this.
==1257== 1. Your program has a bug and erroneously jumped to a non-code
==1257== location. If you are running Memcheck and you just saw a
==1257== warning about a bad jump, it's probably your program's fault.
==1257== 2. The instruction is legitimate but Valgrind doesn't handle it,
==1257== i.e. it's Valgrind's fault. If you think this is the case or
==1257== you are not sure, please let us know and we'll try to fix it.
==1257== Either way, Valgrind will now raise a SIGILL signal which will
==1257== probably kill your program.
==1257==
==1257== Process terminating with default action of signal 4 (SIGILL)
==1257== Illegal opcode at address 0x109182
==1257== at 0x109182: FloatToHalf (in /data/vagrant/valgrind/a.out)
==1257== by 0x10922A: main (in /data/vagrant/valgrind/a.out)
==1257==
==1257== HEAP SUMMARY:
==1257== in use at exit: 0 bytes in 0 blocks
==1257== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==1257==
==1257== All heap blocks were freed -- no leaks are possible
==1257==
==1257== For lists of detected and suppressed errors, rerun with: -s
==1257== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Illegal instruction
EXPECTED RESULT
The instruction should be correctly handled
SOFTWARE/OS VERSIONS
Windows:
macOS:
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version:
KDE Frameworks Version:
Qt Version:
ADDITIONAL INFORMATION
--
You are receiving this mail because:
You are watching all bug changes.