Bug 354931 - Analyze of qt app results in incompatible processor message
Summary: Analyze of qt app results in incompatible processor message
Status: RESOLVED INTENTIONAL
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-06 09:14 UTC by khorloogiinchoibalsan
Modified: 2016-09-15 12:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description khorloogiinchoibalsan 2015-11-06 09:14:32 UTC
Qt-5.4.2 app, Gentoo amd64, valgrind-3.11

Memcheck shows:
 Incompatible processor. This Qt build requires the following features:
 rtm
Aborted. Incompatible processor: missing feature 0x400 - rtm.

Processor: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
Qt and app both compiled with that proc.
Comment 1 mcheshkov 2015-12-08 19:44:40 UTC
I have same thing.

Gentoo amd64
Qt 5.4.2
Intel(R) Core(TM) i7-4600M CPU @ 2.90GHz

What I found:
I have -march=native in CFLAGS, that cause gcc to enable -mrtm on my CPU

$ LANG=C gcc -march=native -Q --help=target | grep rtm
  -mrtm                       		[enabled]

It reflects __RTM__ define, and qCompilerCpuFeatures now includes RTM (http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/tools/qsimd_p.h?id=fae33bfbe35f8d082b420ee09662ff60634cb355&h=5.4#n264), and requires it in runtime.

But all amd64 CPUID helpers have nothing set in RBX if EAX is 0x80000007.

That does not hit HLE, because Qt disable check in runtime (http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/tools/qsimd.cpp?id=fae33bfbe35f8d082b420ee09662ff60634cb355&h=5.4#n499)
Comment 2 Julian Seward 2016-09-15 12:11:26 UTC
Well .. there's not a lot we can do about this.  These kinds of problems often happen
with Gentoo.  The CPU that Valgrind simulates is, in general, somewhat similar to the
"real" CPU, but it is not identical.  For most distros, the compiled code probes CPUID
and then uses whatever facilities it reports are available.  The problem here is that
the code has been compiled to exactly match the capabilities of the real CPU, but 
Valgrind doesn't offer the same facilities.

Try building without -mrtm ?

Closing as WONTFIX, but really it is can't-easily-fix.