drcpusim tests of recent cpu models fail on bot due to libc thinking it has recent features
These two tests fail on the bot:
code_api|tool.drcpusim.cpuid-Sandybridge
code_api|tool.drcpusim.cpuid-Ivybridge
Investigating:
(gdb) x/10i $pc
=> 0x48dea87a: xgetbv
(gdb) x/5i 0x48e0577a
0x48e0577a: addr16 mov %eax,%fs:0x0
0x48e0577f: mov $0x48e7ffd8,%eax
0x48e05784: jmp 0x48dd9f00
(gdb) x/10wx 0x48e7ffd8-sizeof(fragment_t) 0x48e7ffb4: 0xf6e2c8bf 0x09000630 0x06000016 0x48dea878
(gdb) x/10i 0xf6e2c8bf
0xf6e2c8bf: xor %ecx,%ecx
0xf6e2c8c1: xgetbv
0xf6e2c8c4: and $0x6,%eax
f6e13000-f6fb6000 r-xp 00000000 08:02 396442 /lib/i386-linux-gnu/libc-2.15.so
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 46
model name : Intel(R) Xeon(R) CPU E7540 @ 2.00GHz
stepping : 6
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf pni ssse3 cx16 sse4_1 sse4_2 popcnt hypervisor lahf_lm ida dtherm
So for these Sandybridge + Ivybridge cpuid tests, we have some choices:
- Just remove them from the suite
- Make the client fancy and have it check up front and bail if it thinks libs might break: but in a way that works for the tests and end users
- Implement the lib filters and only fool cpuid in app (though this may not be a good idea as the app might call a lib routine to get cpuid info)
- Try to figure out cpuid info at config time via sthg like
execute_process(
grep /proc/cpuinfo
) and selectively enable these tests
Solution 4 is best.