You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
1
(3) |
2
|
3
(5) |
4
(9) |
5
(4) |
6
|
|
7
(1) |
8
(8) |
9
(8) |
10
(12) |
11
(12) |
12
(10) |
13
(4) |
|
14
(8) |
15
(9) |
16
(16) |
17
(12) |
18
(5) |
19
(5) |
20
(5) |
|
21
|
22
(13) |
23
(5) |
24
(13) |
25
(1) |
26
(3) |
27
(3) |
|
28
|
29
(1) |
30
(3) |
31
(9) |
|
|
|
|
From: <sv...@va...> - 2017-05-13 16:57:00
|
Author: sewardj
Date: Sat May 13 17:56:52 2017
New Revision: 16371
Log:
Update.
Modified:
trunk/NEWS
trunk/docs/internals/3_12_BUGSTATUS.txt
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sat May 13 17:56:52 2017
@@ -113,6 +113,7 @@
359202 Add musl libc configure/compile
360429 unhandled ioctl 0x530d with no size/direction hints (CDROMREADMODE1)
362223 assertion failed when .valgrindrc is a directory instead of a file
+367543 bt/btc/btr/bts x86/x86_64 instructions are poorly-handled wrt flags
367942 Segfault vgPlain_do_sys_sigaction (m_signals.c:1138)
368863 WARNING: unhandled arm64-linux syscall: 100 (get_robust_list)
368865 WARNING: unhandled arm64-linux syscall: 272 (kcmp)
@@ -128,10 +129,12 @@
371227 Clean AArch64 syscall table
371412 Rename wrap_sys_shmat to sys_shmat like other wrappers
371471 Valgrind complains about non legit memory leaks on placement new (C++)
+371491 handleAddrOverrides() is [incorrect] when ASO prefix is used
371869 support '%' in symbol Z-encoding
371916 execution tree xtree concept
372120 c++ demangler demangles symbols which are not c++
372185 Support of valgrind on ARMv8 with 32 bit executable
+372188 vex amd64->IR: 0x66 0xF 0x3A 0x62 0x4A 0x10 0x10 0x48 (PCMPxSTRx $0x10)
372195 Power PC, xxsel instruction is not always recognized.
372504 Hanging on exit_group
372600 process loops forever when fatal signals are arriving quickly
Modified: trunk/docs/internals/3_12_BUGSTATUS.txt
==============================================================================
--- trunk/docs/internals/3_12_BUGSTATUS.txt (original)
+++ trunk/docs/internals/3_12_BUGSTATUS.txt Sat May 13 17:56:52 2017
@@ -13,18 +13,8 @@
360415 amd64 instructions ADCX and ADOX are not implemented in VEX
[has patch, could possibly take it, but needs cleanup/verification]
-(carried over)
-367543 bt/btc/btr/bts x86/x86_64 instructions are poorly-handled wrt flags
- [Z flag behaviour is wrong]
-
-371491 handleAddrOverrides() is truncating the segment base address when
- ASO prefix is used
- [has patch, easy fix]
-
369409 vex amd64->IR: 0x48 0xF 0xC7 0xF0 0x72 0x2 0xE2 0xF8 (
-372188 vex amd64->IR: 0x66 0xF 0x3A 0x62 0x4A 0x10 0x10 0x48 (PCMPxSTRx $0x10)
-
372828 vex amd64->IR: 0x66 0x4D 0xF 0x38 0xF6 0xD2 0x66 0x4D
373166 vex amd64->IR: 0xFF 0xFF 0x48 0x85 0xC0 0x74 0x8 0x4D 0x89 0xE7
@@ -442,9 +432,6 @@
linked with -mcmodel=medium
(carried over)
-362223 assertion failed when .valgrindrc is a directory instead of a file
-
-(carried over)
362680 --error-exitcode not honored when file descriptor leaks are found
374963 increase valgrind's load address to prevent mmap failure
@@ -513,14 +500,6 @@
360415 amd64 instructions ADCX and ADOX are not implemented in VEX
[has a plausible patch]
== 372828 (vex amd64->IR: 0x66 0xF 0x3A 0x62 0x4A 0x10)
-**
-362223 assertion failed when .valgrindrc is a directory instead of a file
- [has patch by Ivo]
-
-**
-(carried over)
-367543 bt/btc/btr/bts x86/x86_64 instructions are poorly-handled wrt flags
- [Z flag behaviour is wrong]
**
(carried over)
@@ -541,15 +520,9 @@
(easy patch)
**
-371491 handleAddrOverrides() is truncating the segment base address when
- ASO prefix is used
- [has patch, easy fix]
-
-**
371503 disInstr(arm64): unhandled instruction 0xF89F0000
**
-372188 vex amd64->IR: 0x66 0xF 0x3A 0x62 0x4A 0x10 0x10 0x48 (PCMPxSTRx $0x10)
**
374963 increase valgrind's load address to prevent mmap failure
|
|
From: <sv...@va...> - 2017-05-13 16:52:42
|
Author: sewardj
Date: Sat May 13 17:52:33 2017
New Revision: 16370
Log:
Add a test case for flag handling for BT/BTC/BTS/BTR. Pertains to #367543.
Added:
trunk/none/tests/amd64/bt_flags.c
trunk/none/tests/amd64/bt_flags.stderr.exp
trunk/none/tests/amd64/bt_flags.stdout.exp
trunk/none/tests/amd64/bt_flags.vgtest
Modified:
trunk/none/tests/amd64/Makefile.am
Modified: trunk/none/tests/amd64/Makefile.am
==============================================================================
--- trunk/none/tests/amd64/Makefile.am (original)
+++ trunk/none/tests/amd64/Makefile.am Sat May 13 17:52:33 2017
@@ -27,6 +27,7 @@
avx2-1.vgtest avx2-1.stdout.exp avx2-1.stderr.exp \
asorep.stderr.exp asorep.stdout.exp asorep.vgtest \
bmi.stderr.exp bmi.stdout.exp bmi.vgtest \
+ bt_flags.stderr.exp bt_flags.stdout.exp bt_flags.vgtest \
fma.stderr.exp fma.stdout.exp fma.vgtest \
bug127521-64.vgtest bug127521-64.stdout.exp bug127521-64.stderr.exp \
bug132813-amd64.vgtest bug132813-amd64.stdout.exp \
@@ -90,6 +91,7 @@
check_PROGRAMS = \
allexec \
amd64locked \
+ bt_flags \
bug127521-64 bug132813-amd64 bug132918 bug137714-amd64 \
clc \
cmpxchg \
Added: trunk/none/tests/amd64/bt_flags.c
==============================================================================
--- trunk/none/tests/amd64/bt_flags.c (added)
+++ trunk/none/tests/amd64/bt_flags.c Sat May 13 17:52:33 2017
@@ -0,0 +1,88 @@
+
+#include <stdio.h>
+#include <string.h>
+
+typedef unsigned long long int ULong;
+typedef unsigned int UInt;
+
+#define CC_SHIFT_O 11
+#define CC_SHIFT_S 7
+#define CC_SHIFT_Z 6
+#define CC_SHIFT_A 4
+#define CC_SHIFT_C 0
+#define CC_SHIFT_P 2
+
+#define CC_MASK_O (1ULL << CC_SHIFT_O)
+#define CC_MASK_S (1ULL << CC_SHIFT_S)
+#define CC_MASK_Z (1ULL << CC_SHIFT_Z)
+#define CC_MASK_A (1ULL << CC_SHIFT_A)
+#define CC_MASK_C (1ULL << CC_SHIFT_C)
+#define CC_MASK_P (1ULL << CC_SHIFT_P)
+
+#define CC_MASK_OSZACP \
+ (CC_MASK_O | CC_MASK_S | CC_MASK_Z | CC_MASK_A | CC_MASK_C | CC_MASK_P)
+
+
+void showFlags(/*OUT*/char* str, int nStr, ULong flags)
+{
+ // Ignore everything except OSZACP, because V differs from real h/w in
+ // flags other than OSZACP, and we don't want that to confuse the
+ // results here
+ memset(str, 0, nStr);
+ sprintf(str, "%c%c%c%c%c%c",
+ (flags & CC_MASK_O) ? 'o' : '-',
+ (flags & CC_MASK_S) ? 's' : '-',
+ (flags & CC_MASK_Z) ? 'z' : '-',
+ (flags & CC_MASK_A) ? 'a' : '-',
+ (flags & CC_MASK_C) ? 'c' : '-',
+ (flags & CC_MASK_P) ? 'p' : '-');
+}
+
+__attribute__((noinline))
+void do_test ( ULong val, UInt ix )
+{
+ ULong o, s, z, a, c, p, flags_before;
+ for (o = 0; o < 2; o++) {
+ for (s = 0; s < 2; s++) {
+ for (z = 0; z < 2; z++) {
+ for (a = 0; a < 2; a++) {
+ for (c = 0; c < 2; c++) {
+ for (p = 0; p < 2; p++) {
+ flags_before = (o ? CC_MASK_O : 0)
+ | (s ? CC_MASK_S : 0)
+ | (z ? CC_MASK_Z : 0)
+ | (a ? CC_MASK_A : 0)
+ | (c ? CC_MASK_C : 0)
+ | (p ? CC_MASK_P : 0);
+ ULong block[4] = { flags_before, val, ix, 0 };
+ __asm__ __volatile__(
+ "movq 0(%0), %%r15" "\n\t" // flags_before
+ "pushq %%r15" "\n\t"
+ "popfq" "\n\t"
+ "movq 8(%0), %%r14" "\n\t" // val
+ "movq 16(%0), %%r13" "\n\t" // ix
+ "bt %%r13, %%r14" "\n\t"
+ "pushfq" "\n\t"
+ "popq %%r15" "\n\t"
+ "movq %%r15, 24(%0)" "\n" // block[3]
+ : : "r"(&block[0]) : "cc","memory","r13","r14","r15"
+ );
+ ULong flags_after = block[3];
+ flags_after &= CC_MASK_OSZACP;
+ char flags_after_str[100];
+ char flags_before_str[100];
+ showFlags(flags_before_str, 100, flags_before);
+ showFlags(flags_after_str, 100, flags_after);
+ printf("flags 0x%03llx(%s) val 0x%llx ix %d -> flags 0x%03llx(%s)\n",
+ flags_before, flags_before_str, val, ix,
+ flags_after, flags_after_str);
+ }}}}}}
+}
+
+int main ( void )
+{
+ do_test(0x8000, 14); // should always return C == 0
+ printf("\n");
+ do_test(0x8000, 15); // should always return C == 1
+ return 0;
+}
Added: trunk/none/tests/amd64/bt_flags.stderr.exp
==============================================================================
--- trunk/none/tests/amd64/bt_flags.stderr.exp (added)
+++ trunk/none/tests/amd64/bt_flags.stderr.exp Sat May 13 17:52:33 2017
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/amd64/bt_flags.stdout.exp
==============================================================================
--- trunk/none/tests/amd64/bt_flags.stdout.exp (added)
+++ trunk/none/tests/amd64/bt_flags.stdout.exp Sat May 13 17:52:33 2017
@@ -0,0 +1,129 @@
+flags 0x000(------) val 0x8000 ix 14 -> flags 0x000(------)
+flags 0x004(-----p) val 0x8000 ix 14 -> flags 0x004(-----p)
+flags 0x001(----c-) val 0x8000 ix 14 -> flags 0x000(------)
+flags 0x005(----cp) val 0x8000 ix 14 -> flags 0x004(-----p)
+flags 0x010(---a--) val 0x8000 ix 14 -> flags 0x010(---a--)
+flags 0x014(---a-p) val 0x8000 ix 14 -> flags 0x014(---a-p)
+flags 0x011(---ac-) val 0x8000 ix 14 -> flags 0x010(---a--)
+flags 0x015(---acp) val 0x8000 ix 14 -> flags 0x014(---a-p)
+flags 0x040(--z---) val 0x8000 ix 14 -> flags 0x040(--z---)
+flags 0x044(--z--p) val 0x8000 ix 14 -> flags 0x044(--z--p)
+flags 0x041(--z-c-) val 0x8000 ix 14 -> flags 0x040(--z---)
+flags 0x045(--z-cp) val 0x8000 ix 14 -> flags 0x044(--z--p)
+flags 0x050(--za--) val 0x8000 ix 14 -> flags 0x050(--za--)
+flags 0x054(--za-p) val 0x8000 ix 14 -> flags 0x054(--za-p)
+flags 0x051(--zac-) val 0x8000 ix 14 -> flags 0x050(--za--)
+flags 0x055(--zacp) val 0x8000 ix 14 -> flags 0x054(--za-p)
+flags 0x080(-s----) val 0x8000 ix 14 -> flags 0x080(-s----)
+flags 0x084(-s---p) val 0x8000 ix 14 -> flags 0x084(-s---p)
+flags 0x081(-s--c-) val 0x8000 ix 14 -> flags 0x080(-s----)
+flags 0x085(-s--cp) val 0x8000 ix 14 -> flags 0x084(-s---p)
+flags 0x090(-s-a--) val 0x8000 ix 14 -> flags 0x090(-s-a--)
+flags 0x094(-s-a-p) val 0x8000 ix 14 -> flags 0x094(-s-a-p)
+flags 0x091(-s-ac-) val 0x8000 ix 14 -> flags 0x090(-s-a--)
+flags 0x095(-s-acp) val 0x8000 ix 14 -> flags 0x094(-s-a-p)
+flags 0x0c0(-sz---) val 0x8000 ix 14 -> flags 0x0c0(-sz---)
+flags 0x0c4(-sz--p) val 0x8000 ix 14 -> flags 0x0c4(-sz--p)
+flags 0x0c1(-sz-c-) val 0x8000 ix 14 -> flags 0x0c0(-sz---)
+flags 0x0c5(-sz-cp) val 0x8000 ix 14 -> flags 0x0c4(-sz--p)
+flags 0x0d0(-sza--) val 0x8000 ix 14 -> flags 0x0d0(-sza--)
+flags 0x0d4(-sza-p) val 0x8000 ix 14 -> flags 0x0d4(-sza-p)
+flags 0x0d1(-szac-) val 0x8000 ix 14 -> flags 0x0d0(-sza--)
+flags 0x0d5(-szacp) val 0x8000 ix 14 -> flags 0x0d4(-sza-p)
+flags 0x800(o-----) val 0x8000 ix 14 -> flags 0x800(o-----)
+flags 0x804(o----p) val 0x8000 ix 14 -> flags 0x804(o----p)
+flags 0x801(o---c-) val 0x8000 ix 14 -> flags 0x800(o-----)
+flags 0x805(o---cp) val 0x8000 ix 14 -> flags 0x804(o----p)
+flags 0x810(o--a--) val 0x8000 ix 14 -> flags 0x810(o--a--)
+flags 0x814(o--a-p) val 0x8000 ix 14 -> flags 0x814(o--a-p)
+flags 0x811(o--ac-) val 0x8000 ix 14 -> flags 0x810(o--a--)
+flags 0x815(o--acp) val 0x8000 ix 14 -> flags 0x814(o--a-p)
+flags 0x840(o-z---) val 0x8000 ix 14 -> flags 0x840(o-z---)
+flags 0x844(o-z--p) val 0x8000 ix 14 -> flags 0x844(o-z--p)
+flags 0x841(o-z-c-) val 0x8000 ix 14 -> flags 0x840(o-z---)
+flags 0x845(o-z-cp) val 0x8000 ix 14 -> flags 0x844(o-z--p)
+flags 0x850(o-za--) val 0x8000 ix 14 -> flags 0x850(o-za--)
+flags 0x854(o-za-p) val 0x8000 ix 14 -> flags 0x854(o-za-p)
+flags 0x851(o-zac-) val 0x8000 ix 14 -> flags 0x850(o-za--)
+flags 0x855(o-zacp) val 0x8000 ix 14 -> flags 0x854(o-za-p)
+flags 0x880(os----) val 0x8000 ix 14 -> flags 0x880(os----)
+flags 0x884(os---p) val 0x8000 ix 14 -> flags 0x884(os---p)
+flags 0x881(os--c-) val 0x8000 ix 14 -> flags 0x880(os----)
+flags 0x885(os--cp) val 0x8000 ix 14 -> flags 0x884(os---p)
+flags 0x890(os-a--) val 0x8000 ix 14 -> flags 0x890(os-a--)
+flags 0x894(os-a-p) val 0x8000 ix 14 -> flags 0x894(os-a-p)
+flags 0x891(os-ac-) val 0x8000 ix 14 -> flags 0x890(os-a--)
+flags 0x895(os-acp) val 0x8000 ix 14 -> flags 0x894(os-a-p)
+flags 0x8c0(osz---) val 0x8000 ix 14 -> flags 0x8c0(osz---)
+flags 0x8c4(osz--p) val 0x8000 ix 14 -> flags 0x8c4(osz--p)
+flags 0x8c1(osz-c-) val 0x8000 ix 14 -> flags 0x8c0(osz---)
+flags 0x8c5(osz-cp) val 0x8000 ix 14 -> flags 0x8c4(osz--p)
+flags 0x8d0(osza--) val 0x8000 ix 14 -> flags 0x8d0(osza--)
+flags 0x8d4(osza-p) val 0x8000 ix 14 -> flags 0x8d4(osza-p)
+flags 0x8d1(oszac-) val 0x8000 ix 14 -> flags 0x8d0(osza--)
+flags 0x8d5(oszacp) val 0x8000 ix 14 -> flags 0x8d4(osza-p)
+
+flags 0x000(------) val 0x8000 ix 15 -> flags 0x001(----c-)
+flags 0x004(-----p) val 0x8000 ix 15 -> flags 0x005(----cp)
+flags 0x001(----c-) val 0x8000 ix 15 -> flags 0x001(----c-)
+flags 0x005(----cp) val 0x8000 ix 15 -> flags 0x005(----cp)
+flags 0x010(---a--) val 0x8000 ix 15 -> flags 0x011(---ac-)
+flags 0x014(---a-p) val 0x8000 ix 15 -> flags 0x015(---acp)
+flags 0x011(---ac-) val 0x8000 ix 15 -> flags 0x011(---ac-)
+flags 0x015(---acp) val 0x8000 ix 15 -> flags 0x015(---acp)
+flags 0x040(--z---) val 0x8000 ix 15 -> flags 0x041(--z-c-)
+flags 0x044(--z--p) val 0x8000 ix 15 -> flags 0x045(--z-cp)
+flags 0x041(--z-c-) val 0x8000 ix 15 -> flags 0x041(--z-c-)
+flags 0x045(--z-cp) val 0x8000 ix 15 -> flags 0x045(--z-cp)
+flags 0x050(--za--) val 0x8000 ix 15 -> flags 0x051(--zac-)
+flags 0x054(--za-p) val 0x8000 ix 15 -> flags 0x055(--zacp)
+flags 0x051(--zac-) val 0x8000 ix 15 -> flags 0x051(--zac-)
+flags 0x055(--zacp) val 0x8000 ix 15 -> flags 0x055(--zacp)
+flags 0x080(-s----) val 0x8000 ix 15 -> flags 0x081(-s--c-)
+flags 0x084(-s---p) val 0x8000 ix 15 -> flags 0x085(-s--cp)
+flags 0x081(-s--c-) val 0x8000 ix 15 -> flags 0x081(-s--c-)
+flags 0x085(-s--cp) val 0x8000 ix 15 -> flags 0x085(-s--cp)
+flags 0x090(-s-a--) val 0x8000 ix 15 -> flags 0x091(-s-ac-)
+flags 0x094(-s-a-p) val 0x8000 ix 15 -> flags 0x095(-s-acp)
+flags 0x091(-s-ac-) val 0x8000 ix 15 -> flags 0x091(-s-ac-)
+flags 0x095(-s-acp) val 0x8000 ix 15 -> flags 0x095(-s-acp)
+flags 0x0c0(-sz---) val 0x8000 ix 15 -> flags 0x0c1(-sz-c-)
+flags 0x0c4(-sz--p) val 0x8000 ix 15 -> flags 0x0c5(-sz-cp)
+flags 0x0c1(-sz-c-) val 0x8000 ix 15 -> flags 0x0c1(-sz-c-)
+flags 0x0c5(-sz-cp) val 0x8000 ix 15 -> flags 0x0c5(-sz-cp)
+flags 0x0d0(-sza--) val 0x8000 ix 15 -> flags 0x0d1(-szac-)
+flags 0x0d4(-sza-p) val 0x8000 ix 15 -> flags 0x0d5(-szacp)
+flags 0x0d1(-szac-) val 0x8000 ix 15 -> flags 0x0d1(-szac-)
+flags 0x0d5(-szacp) val 0x8000 ix 15 -> flags 0x0d5(-szacp)
+flags 0x800(o-----) val 0x8000 ix 15 -> flags 0x801(o---c-)
+flags 0x804(o----p) val 0x8000 ix 15 -> flags 0x805(o---cp)
+flags 0x801(o---c-) val 0x8000 ix 15 -> flags 0x801(o---c-)
+flags 0x805(o---cp) val 0x8000 ix 15 -> flags 0x805(o---cp)
+flags 0x810(o--a--) val 0x8000 ix 15 -> flags 0x811(o--ac-)
+flags 0x814(o--a-p) val 0x8000 ix 15 -> flags 0x815(o--acp)
+flags 0x811(o--ac-) val 0x8000 ix 15 -> flags 0x811(o--ac-)
+flags 0x815(o--acp) val 0x8000 ix 15 -> flags 0x815(o--acp)
+flags 0x840(o-z---) val 0x8000 ix 15 -> flags 0x841(o-z-c-)
+flags 0x844(o-z--p) val 0x8000 ix 15 -> flags 0x845(o-z-cp)
+flags 0x841(o-z-c-) val 0x8000 ix 15 -> flags 0x841(o-z-c-)
+flags 0x845(o-z-cp) val 0x8000 ix 15 -> flags 0x845(o-z-cp)
+flags 0x850(o-za--) val 0x8000 ix 15 -> flags 0x851(o-zac-)
+flags 0x854(o-za-p) val 0x8000 ix 15 -> flags 0x855(o-zacp)
+flags 0x851(o-zac-) val 0x8000 ix 15 -> flags 0x851(o-zac-)
+flags 0x855(o-zacp) val 0x8000 ix 15 -> flags 0x855(o-zacp)
+flags 0x880(os----) val 0x8000 ix 15 -> flags 0x881(os--c-)
+flags 0x884(os---p) val 0x8000 ix 15 -> flags 0x885(os--cp)
+flags 0x881(os--c-) val 0x8000 ix 15 -> flags 0x881(os--c-)
+flags 0x885(os--cp) val 0x8000 ix 15 -> flags 0x885(os--cp)
+flags 0x890(os-a--) val 0x8000 ix 15 -> flags 0x891(os-ac-)
+flags 0x894(os-a-p) val 0x8000 ix 15 -> flags 0x895(os-acp)
+flags 0x891(os-ac-) val 0x8000 ix 15 -> flags 0x891(os-ac-)
+flags 0x895(os-acp) val 0x8000 ix 15 -> flags 0x895(os-acp)
+flags 0x8c0(osz---) val 0x8000 ix 15 -> flags 0x8c1(osz-c-)
+flags 0x8c4(osz--p) val 0x8000 ix 15 -> flags 0x8c5(osz-cp)
+flags 0x8c1(osz-c-) val 0x8000 ix 15 -> flags 0x8c1(osz-c-)
+flags 0x8c5(osz-cp) val 0x8000 ix 15 -> flags 0x8c5(osz-cp)
+flags 0x8d0(osza--) val 0x8000 ix 15 -> flags 0x8d1(oszac-)
+flags 0x8d4(osza-p) val 0x8000 ix 15 -> flags 0x8d5(oszacp)
+flags 0x8d1(oszac-) val 0x8000 ix 15 -> flags 0x8d1(oszac-)
+flags 0x8d5(oszacp) val 0x8000 ix 15 -> flags 0x8d5(oszacp)
Added: trunk/none/tests/amd64/bt_flags.vgtest
==============================================================================
--- trunk/none/tests/amd64/bt_flags.vgtest (added)
+++ trunk/none/tests/amd64/bt_flags.vgtest Sat May 13 17:52:33 2017
@@ -0,0 +1 @@
+prog: bt_flags
|
|
From: <sv...@va...> - 2017-05-13 16:41:12
|
Author: sewardj
Date: Sat May 13 17:40:59 2017
New Revision: 3367
Log:
Bug 367543 - bt/btc/btr/bts x86/x86_64 instructions are poorly-handled wrt flags.
This fixes the flag handling to be like Skylake.
Modified:
trunk/priv/guest_amd64_toIR.c
Modified: trunk/priv/guest_amd64_toIR.c
==============================================================================
--- trunk/priv/guest_amd64_toIR.c (original)
+++ trunk/priv/guest_amd64_toIR.c Sat May 13 17:40:59 2017
@@ -8215,18 +8215,31 @@
}
}
- /* Side effect done; now get selected bit into Carry flag */
- /* Flags: C=selected bit, O,S,Z,A,P undefined, so are set to zero. */
+ /* Side effect done; now get selected bit into Carry flag. The Intel docs
+ (as of 2015, at least) say that C holds the result, Z is unchanged, and
+ O,S,A and P are undefined. However, on Skylake it appears that O,S,A,P
+ are also unchanged, so let's do that. */
+ const ULong maskC = AMD64G_CC_MASK_C;
+ const ULong maskOSZAP = AMD64G_CC_MASK_O | AMD64G_CC_MASK_S
+ | AMD64G_CC_MASK_Z | AMD64G_CC_MASK_A
+ | AMD64G_CC_MASK_P;
+
+ IRTemp old_rflags = newTemp(Ity_I64);
+ assign(old_rflags, mk_amd64g_calculate_rflags_all());
+
+ IRTemp new_rflags = newTemp(Ity_I64);
+ assign(new_rflags,
+ binop(Iop_Or64,
+ binop(Iop_And64, mkexpr(old_rflags), mkU64(maskOSZAP)),
+ binop(Iop_And64,
+ binop(Iop_Shr64,
+ unop(Iop_8Uto64, mkexpr(t_fetched)),
+ mkexpr(t_bitno2)),
+ mkU64(maskC))));
+
stmt( IRStmt_Put( OFFB_CC_OP, mkU64(AMD64G_CC_OP_COPY) ));
stmt( IRStmt_Put( OFFB_CC_DEP2, mkU64(0) ));
- stmt( IRStmt_Put(
- OFFB_CC_DEP1,
- binop(Iop_And64,
- binop(Iop_Shr64,
- unop(Iop_8Uto64, mkexpr(t_fetched)),
- mkexpr(t_bitno2)),
- mkU64(1)))
- );
+ stmt( IRStmt_Put( OFFB_CC_DEP1, mkexpr(new_rflags) ));
/* Set NDEP even though it isn't used. This makes redundant-PUT
elimination of previous stores to this field work better. */
stmt( IRStmt_Put( OFFB_CC_NDEP, mkU64(0) ));
|
|
From: <sv...@va...> - 2017-05-13 10:19:27
|
Author: philippe
Date: Sat May 13 11:19:16 2017
New Revision: 16369
Log:
Fix mempool2 test
mempool2 test was using a wrong address for the pool arguments
in the client requests VALGRIND_MEMPOOL_FREE.
So, instead of testing what it was supposed to test (e.g. reading
memory from a freed mempool block), this was all causing
an illegal memory pool address.
So, fix the calls, and add a specific test to verify the illegal
mempool address.
(detected while looking at bug 375415)
Modified:
trunk/memcheck/tests/mempool2.c
trunk/memcheck/tests/mempool2.stderr.exp
Modified: trunk/memcheck/tests/mempool2.c
==============================================================================
--- trunk/memcheck/tests/mempool2.c (original)
+++ trunk/memcheck/tests/mempool2.c Sat May 13 11:19:16 2017
@@ -141,22 +141,26 @@
res += x2[20]; // invalid
fprintf(stderr,
+ "\n------ Illegal memory pool address ------\n\n");
+ VALGRIND_MEMPOOL_FREE(p1, x1); // Should be p1->mem
+
+ fprintf(stderr,
"\n------ read free in malloc-backed pool ------\n\n");
- VALGRIND_MEMPOOL_FREE(p1, x1);
+ VALGRIND_MEMPOOL_FREE(p1->mem, x1);
res += x1[5];
fprintf(stderr,
"\n------ read free in mmap-backed pool ------\n\n");
- VALGRIND_MEMPOOL_FREE(p2, x2);
+ VALGRIND_MEMPOOL_FREE(p2->mem, x2);
res += x2[11];
fprintf(stderr,
"\n------ double free in malloc-backed pool ------\n\n");
- VALGRIND_MEMPOOL_FREE(p1, x1);
+ VALGRIND_MEMPOOL_FREE(p1->mem, x1);
fprintf(stderr,
"\n------ double free in mmap-backed pool ------\n\n");
- VALGRIND_MEMPOOL_FREE(p2, x2);
+ VALGRIND_MEMPOOL_FREE(p2->mem, x2);
{
// test that redzone are still protected even if the user forgets
Modified: trunk/memcheck/tests/mempool2.stderr.exp
==============================================================================
--- trunk/memcheck/tests/mempool2.stderr.exp (original)
+++ trunk/memcheck/tests/mempool2.stderr.exp Sat May 13 11:19:16 2017
@@ -3,95 +3,119 @@
Invalid read of size 1
at 0x........: test (mempool2.c:135)
- by 0x........: main (mempool2.c:196)
+ by 0x........: main (mempool2.c:200)
Address 0x........ is 1 bytes before a block of size 10 client-defined
at 0x........: allocate (mempool2.c:108)
by 0x........: test (mempool2.c:130)
- by 0x........: main (mempool2.c:196)
+ by 0x........: main (mempool2.c:200)
Invalid read of size 1
at 0x........: test (mempool2.c:136)
- by 0x........: main (mempool2.c:196)
+ by 0x........: main (mempool2.c:200)
Address 0x........ is 0 bytes after a block of size 10 client-defined
at 0x........: allocate (mempool2.c:108)
by 0x........: test (mempool2.c:130)
- by 0x........: main (mempool2.c:196)
+ by 0x........: main (mempool2.c:200)
------ out of range reads in mmap-backed pool ------
Invalid read of size 1
at 0x........: test (mempool2.c:140)
- by 0x........: main (mempool2.c:196)
+ by 0x........: main (mempool2.c:200)
Address 0x........ is 1 bytes before a block of size 20 client-defined
at 0x........: allocate (mempool2.c:108)
by 0x........: test (mempool2.c:131)
- by 0x........: main (mempool2.c:196)
+ by 0x........: main (mempool2.c:200)
Invalid read of size 1
at 0x........: test (mempool2.c:141)
- by 0x........: main (mempool2.c:196)
+ by 0x........: main (mempool2.c:200)
Address 0x........ is 0 bytes after a block of size 20 client-defined
at 0x........: allocate (mempool2.c:108)
by 0x........: test (mempool2.c:131)
- by 0x........: main (mempool2.c:196)
+ by 0x........: main (mempool2.c:200)
------- read free in malloc-backed pool ------
+------ Illegal memory pool address ------
Illegal memory pool address
at 0x........: test (mempool2.c:145)
- by 0x........: main (mempool2.c:196)
+ by 0x........: main (mempool2.c:200)
Address 0x........ is 0 bytes inside a block of size 32 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: make_pool (mempool2.c:46)
by 0x........: test (mempool2.c:122)
- by 0x........: main (mempool2.c:196)
+ by 0x........: main (mempool2.c:200)
------- read free in mmap-backed pool ------
+------ read free in malloc-backed pool ------
-Illegal memory pool address
+Invalid read of size 1
at 0x........: test (mempool2.c:150)
- by 0x........: main (mempool2.c:196)
- Address 0x........ is in a rwx anonymous segment
+ by 0x........: main (mempool2.c:200)
+ Address 0x........ is 13 bytes inside a recently re-allocated block of size 100,000 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: make_pool (mempool2.c:47)
+ by 0x........: test (mempool2.c:122)
+ by 0x........: main (mempool2.c:200)
------- double free in malloc-backed pool ------
+------ read free in mmap-backed pool ------
-Illegal memory pool address
+Invalid read of size 1
at 0x........: test (mempool2.c:155)
- by 0x........: main (mempool2.c:196)
- Address 0x........ is 0 bytes inside a block of size 32 alloc'd
+ by 0x........: main (mempool2.c:200)
+ Address 0x........ is 11 bytes inside a block of size 20 free'd
+ at 0x........: test (mempool2.c:154)
+ by 0x........: main (mempool2.c:200)
+ Block was alloc'd at
+ at 0x........: allocate (mempool2.c:108)
+ by 0x........: test (mempool2.c:131)
+ by 0x........: main (mempool2.c:200)
+
+
+------ double free in malloc-backed pool ------
+
+Invalid free() / delete / delete[] / realloc()
+ at 0x........: test (mempool2.c:159)
+ by 0x........: main (mempool2.c:200)
+ Address 0x........ is 8 bytes inside a recently re-allocated block of size 100,000 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool2.c:46)
+ by 0x........: make_pool (mempool2.c:47)
by 0x........: test (mempool2.c:122)
- by 0x........: main (mempool2.c:196)
+ by 0x........: main (mempool2.c:200)
------ double free in mmap-backed pool ------
-Illegal memory pool address
- at 0x........: test (mempool2.c:159)
- by 0x........: main (mempool2.c:196)
- Address 0x........ is in a rwx anonymous segment
+Invalid free() / delete / delete[] / realloc()
+ at 0x........: test (mempool2.c:163)
+ by 0x........: main (mempool2.c:200)
+ Address 0x........ is 0 bytes inside a block of size 20 free'd
+ at 0x........: test (mempool2.c:154)
+ by 0x........: main (mempool2.c:200)
+ Block was alloc'd at
+ at 0x........: allocate (mempool2.c:108)
+ by 0x........: test (mempool2.c:131)
+ by 0x........: main (mempool2.c:200)
------ 2 invalid access in 'no no-access superblock' ---
Invalid read of size 1
- at 0x........: test (mempool2.c:178)
- by 0x........: main (mempool2.c:196)
+ at 0x........: test (mempool2.c:182)
+ by 0x........: main (mempool2.c:200)
Address 0x........ is 1 bytes before a block of size 10 client-defined
- at 0x........: test (mempool2.c:171)
- by 0x........: main (mempool2.c:196)
+ at 0x........: test (mempool2.c:175)
+ by 0x........: main (mempool2.c:200)
Invalid read of size 1
- at 0x........: test (mempool2.c:179)
- by 0x........: main (mempool2.c:196)
+ at 0x........: test (mempool2.c:183)
+ by 0x........: main (mempool2.c:200)
Address 0x........ is 0 bytes after a block of size 10 client-defined
- at 0x........: test (mempool2.c:171)
- by 0x........: main (mempool2.c:196)
+ at 0x........: test (mempool2.c:175)
+ by 0x........: main (mempool2.c:200)
------ done ------
|