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
(8) |
2
(2) |
3
(1) |
4
(2) |
|
5
(1) |
6
(4) |
7
(6) |
8
(5) |
9
(3) |
10
(5) |
11
(1) |
|
12
(6) |
13
(4) |
14
(1) |
15
(4) |
16
(1) |
17
|
18
|
|
19
|
20
|
21
(2) |
22
(28) |
23
(17) |
24
(6) |
25
(4) |
|
26
(2) |
27
(2) |
28
|
29
(5) |
30
(8) |
31
(14) |
|
|
From: <sv...@va...> - 2015-07-07 14:28:45
|
Author: zliu
Date: Tue Jul 7 15:28:38 2015
New Revision: 3161
Log:
Fix a bug for TileGX platform found by instruction tests.
The issue is of the dirty helper of the SIMD instructions
with immediate operand.
Modified:
trunk/priv/guest_tilegx_helpers.c
trunk/priv/guest_tilegx_toIR.c
Modified: trunk/priv/guest_tilegx_helpers.c
==============================================================================
--- trunk/priv/guest_tilegx_helpers.c (original)
+++ trunk/priv/guest_tilegx_helpers.c Tue Jul 7 15:28:38 2015
@@ -778,7 +778,7 @@
break;
case 271:
{
- return __insn_v1shli(rd1, rd2);
+ return __insn_v1shl(rd1, rd2);
}
break;
case 272:
@@ -788,7 +788,7 @@
break;
case 273:
{
- return __insn_v1shrsi(rd1, rd2);
+ return __insn_v1shrs(rd1, rd2);
}
break;
case 274:
@@ -988,7 +988,7 @@
break;
case 313:
{
- return __insn_v2shli(rd1, rd2);
+ return __insn_v2shl(rd1, rd2);
}
break;
case 314:
@@ -1003,7 +1003,7 @@
break;
case 316:
{
- return __insn_v2shrsi(rd1, rd2);
+ return __insn_v2shrs(rd1, rd2);
}
break;
case 317:
@@ -1013,7 +1013,7 @@
break;
case 318:
{
- return __insn_v2shrui(rd1, rd2);
+ return __insn_v2shru(rd1, rd2);
}
break;
case 319:
Modified: trunk/priv/guest_tilegx_toIR.c
==============================================================================
--- trunk/priv/guest_tilegx_toIR.c (original)
+++ trunk/priv/guest_tilegx_toIR.c Tue Jul 7 15:28:38 2015
@@ -257,6 +257,22 @@
rd_wb_index++; \
} while(0)
+
+/* Expand/repeat byte _X 8 times to a 64-bit value */
+#define V1EXP(_X) \
+ ({ \
+ _X = ((((UChar)(_X)) << 8) | ((UChar)(_X))); \
+ _X = (((_X) << 16) | (_X)); \
+ (((_X) << 32) | (_X)); \
+ })
+
+/* Expand/repeat byte _X 4 times to a 64-bit value */
+#define V2EXP(_X) \
+ ({ \
+ _X = ((((UChar)(_X)) << 16) | ((UChar)(_X))); \
+ (((_X) << 32) | (_X)); \
+ })
+
/*------------------------------------------------------------*/
/*--- Disassemble a single instruction ---*/
/*------------------------------------------------------------*/
@@ -2082,9 +2098,12 @@
case 232:
/* Fall-through */
case 233:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 234:
- /* Fall-through */
+ opd[3] = V1EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
case 235:
/* Fall-through */
case 236:
@@ -2110,12 +2129,18 @@
case 241:
/* Fall-through */
case 242:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 243:
+ opd[3] = V1EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
/* Fall-through */
case 244:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 245:
+ opd[3] = V1EXP(opd[3]);
use_dirty_helper = 1;
break;
case 246: /* "v1cmpne" */
@@ -2151,13 +2176,19 @@
case 258:
/* Fall-through */
case 259:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 260:
- /* Fall-through */
+ opd[3] = V1EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
case 261:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 262:
- /* Fall-through */
+ opd[3] = V1EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
case 263:
/* Fall-through */
case 264:
@@ -2173,13 +2204,19 @@
case 269:
/* Fall-through */
case 270:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 271:
- /* Fall-through */
+ opd[3] = V1EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
case 272:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 273:
- /* Fall-through */
+ opd[3] = V1EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
case 274:
use_dirty_helper = 1;
break;
@@ -2195,9 +2232,12 @@
case 277:
/* Fall-through */
case 278:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 279:
- /* Fall-through */
+ opd[3] = V2EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
case 280:
/* Fall-through */
case 281:
@@ -2205,21 +2245,30 @@
case 282:
/* Fall-through */
case 283:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 284:
- /* Fall-through */
+ opd[3] = V2EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
case 285:
/* Fall-through */
case 286:
/* Fall-through */
case 287:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 288:
- /* Fall-through */
+ opd[3] = V2EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
case 289:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 290:
- /* Fall-through */
+ opd[3] = V2EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
case 291:
/* Fall-through */
case 292:
@@ -2231,13 +2280,19 @@
case 295:
/* Fall-through */
case 296:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 297:
- /* Fall-through */
+ opd[3] = V2EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
case 298:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 299:
- /* Fall-through */
+ opd[3] = V2EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
case 300:
/* Fall-through */
case 301:
@@ -2263,19 +2318,28 @@
case 311:
/* Fall-through */
case 312:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 313:
- /* Fall-through */
+ opd[3] = V2EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
case 314:
/* Fall-through */
case 315:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 316:
- /* Fall-through */
+ opd[3] = V2EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
case 317:
- /* Fall-through */
+ use_dirty_helper = 1;
+ break;
case 318:
- /* Fall-through */
+ opd[3] = V2EXP(opd[3]);
+ use_dirty_helper = 1;
+ break;
case 319:
/* Fall-through */
case 320:
|
|
From: <sv...@va...> - 2015-07-07 14:06:11
|
Author: sewardj
Date: Tue Jul 7 15:06:00 2015
New Revision: 15400
Log:
VG_(get_StackTrace_wrk) for x86-{linux,darwin}: when following
frame-pointer chains (via EBP), don't continue if EBP doesn't contain
a 4-aligned value. A misaligned EBP is almost certainly invalid --
hence, no loss in unwind capability here -- and the misaligned access
causes gcc 5.1 ubsan alignment checks to fail. So avoid them.
Modified:
trunk/coregrind/m_stacktrace.c
Modified: trunk/coregrind/m_stacktrace.c
==============================================================================
--- trunk/coregrind/m_stacktrace.c (original)
+++ trunk/coregrind/m_stacktrace.c Tue Jul 7 15:06:00 2015
@@ -337,7 +337,8 @@
/* This deals with frames resulting from functions which begin "pushl%
ebp ; movl %esp, %ebp" which is the ABI-mandated preamble. */
if (fp_min <= uregs.xbp &&
- uregs.xbp <= fp_max - 1 * sizeof(UWord)/*see comment below*/)
+ uregs.xbp <= fp_max - 1 * sizeof(UWord)/*see comment below*/ &&
+ VG_IS_4_ALIGNED(uregs.xbp))
{
/* fp looks sane, so use it. */
uregs.xip = (((UWord*)uregs.xbp)[1]);
|
|
From: <sv...@va...> - 2015-07-07 13:29:17
|
Author: sewardj
Date: Tue Jul 7 14:29:09 2015
New Revision: 15399
Log:
Update.
Modified:
trunk/docs/internals/3_10_BUGSTATUS.txt
Modified: trunk/docs/internals/3_10_BUGSTATUS.txt
==============================================================================
--- trunk/docs/internals/3_10_BUGSTATUS.txt (original)
+++ trunk/docs/internals/3_10_BUGSTATUS.txt Tue Jul 7 14:29:09 2015
@@ -475,3 +475,36 @@
348616 Wine/valgrind: Warning: noted but unhandled ioctl 0x5390 with no size/direction hints. (DVD_READ_STRUCT)
Fri 5 Jun 13:41:51 CEST 2015
+
+348749 guest_generic_x87.c:458: bad ? : operator
+
+348909 Support OS X 10.11 (El Capitan)
+
+348924 MIPS: Load doubles through memory so the code compiles with the FPXX ABI
+
+349034 Add Lustre ioctls LL_IOC_GROUP_LOCK and LL_IOC_GROUP_UNLOCK
+
+349128 Access not within mapped region in _pthread_find_thread (OS X 10.11)
+
+349129 memcheck/tests/wrap6 fails on OS X 10.11
+
+349304 vex amd64->IR: 0xF 0x33 0x89 0x45 0xFC 0x89 0x55 0xF8
+
+349521 Valgrind misses some line numbers in output
+
+349769 clang/osx: ld: warning: -read_only_relocs cannot be used with x86_64
+
+349790 Clean up of the hardware capability checking utilities.
+
+349804 valgrind/osx: running wine's unit tests under valgrind fails with:
+ loader/wine: Undefined error: 0
+
+349879 [PATCH] memcheck: add handwritten assembly for helperc_LOADV*
+
+349891 vex x86->IR: unhandled instruction bytes: 0xF3 0xF 0xB8 0xC9
+
+349952 Valgrind terminates process upon a call to remap_file_pages
+
+349954 Cannot start memcheck: permission denied
+
+Tue 7 Jul 15:27:23 CEST 2015
|
|
From: <sv...@va...> - 2015-07-07 13:01:47
|
Author: mjw
Date: Tue Jul 7 14:01:40 2015
New Revision: 15398
Log:
349941 di_notify_mmap might create wrong start/size DebugInfoMapping
Use seg->start instead of a as DebugInfoMapping avma. Normally seg->start
equals a. But when it is not then the size of the map might extend beyond
the segment (and not actually cover the start of the segment). When another
ELF file is them mapped right after this then it triggers an overlap purge
of the DebugInfo. In the case the mapping was for libc or ld.so this then
removes all intercepts causing "bad things".
Modified:
trunk/NEWS
trunk/coregrind/m_debuginfo/debuginfo.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Tue Jul 7 14:01:40 2015
@@ -250,6 +250,7 @@
349626 Implemented additional Xen hypercalls
349874 Fix typos in source code
349828 memcpy intercepts memmove causing src/dst overlap error (ppc64 ld.so)
+349941 di_notify_mmap might create wrong start/size DebugInfoMapping
n-i-bz Provide implementations of certain compiler builtins to support
compilers who may not provide those
n-i-bz Old STABS code is still being compiled, but never used. Remove it.
Modified: trunk/coregrind/m_debuginfo/debuginfo.c
==============================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c (original)
+++ trunk/coregrind/m_debuginfo/debuginfo.c Tue Jul 7 14:01:40 2015
@@ -1038,7 +1038,7 @@
/* Note the details about the mapping. */
DebugInfoMapping map;
- map.avma = a;
+ map.avma = seg->start;
map.size = seg->end + 1 - seg->start;
map.foff = seg->offset;
map.rx = is_rx_map;
|
|
From: <sv...@va...> - 2015-07-07 13:01:45
|
Author: mjw
Date: Tue Jul 7 14:01:39 2015
New Revision: 15397
Log:
349828 memcpy intercepts memmove causing src/dst overlap error (ppc64 ld.so)
Modified:
trunk/NEWS
trunk/shared/vg_replace_strmem.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Tue Jul 7 14:01:39 2015
@@ -249,6 +249,7 @@
reply 0x........] (task_set_special_port)
349626 Implemented additional Xen hypercalls
349874 Fix typos in source code
+349828 memcpy intercepts memmove causing src/dst overlap error (ppc64 ld.so)
n-i-bz Provide implementations of certain compiler builtins to support
compilers who may not provide those
n-i-bz Old STABS code is still being compiled, but never used. Remove it.
Modified: trunk/shared/vg_replace_strmem.c
==============================================================================
--- trunk/shared/vg_replace_strmem.c (original)
+++ trunk/shared/vg_replace_strmem.c Tue Jul 7 14:01:39 2015
@@ -1141,6 +1141,10 @@
#if defined(VGO_linux)
MEMMOVE(VG_Z_LIBC_SONAME, memmove)
MEMMOVE(VG_Z_LIBC_SONAME, __GI_memmove)
+ /* See bug #349828 Override for ld64.so.1 like memcpy, because for some
+ arches MEMCPY_OK_FOR_FORWARD_MEMMOVE is set, which might cause memmove
+ to call memcpy. */
+ MEMMOVE(VG_Z_LD64_SO_1, memmove)
#elif defined(VGO_darwin)
# if DARWIN_VERS <= DARWIN_10_6
|
|
From: <sv...@va...> - 2015-07-07 12:41:42
|
Author: sewardj
Date: Tue Jul 7 13:41:33 2015
New Revision: 3160
Log:
Add some functions for misaligned load/store support, and use them
in the x86 and amd64 chainer/unchainer. This makes it possible to
run at least some programs when built with gcc 5.1, with ubsan misaligned
checking enabled.
Modified:
trunk/priv/host_amd64_defs.c
trunk/priv/host_x86_defs.c
trunk/priv/main_util.c
trunk/priv/main_util.h
Modified: trunk/priv/host_amd64_defs.c
==============================================================================
--- trunk/priv/host_amd64_defs.c (original)
+++ trunk/priv/host_amd64_defs.c Tue Jul 7 13:41:33 2015
@@ -3758,7 +3758,7 @@
UChar* p = (UChar*)place_to_chain;
vassert(p[0] == 0x49);
vassert(p[1] == 0xBB);
- vassert(*(Addr*)(&p[2]) == (Addr)disp_cp_chain_me_EXPECTED);
+ vassert(read_misaligned_ULong_LE(&p[2]) == (Addr)disp_cp_chain_me_EXPECTED);
vassert(p[10] == 0x41);
vassert(p[11] == 0xFF);
vassert(p[12] == 0xD3);
@@ -3807,10 +3807,7 @@
/* And make the modifications. */
if (shortOK) {
p[0] = 0xE9;
- p[1] = (delta >> 0) & 0xFF;
- p[2] = (delta >> 8) & 0xFF;
- p[3] = (delta >> 16) & 0xFF;
- p[4] = (delta >> 24) & 0xFF;
+ write_misaligned_UInt_LE(&p[1], (UInt)(Int)delta);
p[5] = 0x0F; p[6] = 0x0B;
p[7] = 0x0F; p[8] = 0x0B;
p[9] = 0x0F; p[10] = 0x0B;
@@ -3820,7 +3817,7 @@
vassert(delta == 0LL || delta == -1LL);
} else {
/* Minimal modifications from the starting sequence. */
- *(Addr*)(&p[2]) = (Addr)place_to_jump_to;
+ write_misaligned_ULong_LE(&p[2], (ULong)(Addr)place_to_jump_to);
p[12] = 0xE3;
}
VexInvalRange vir = { (HWord)place_to_chain, 13 };
@@ -3855,7 +3852,8 @@
UChar* p = (UChar*)place_to_unchain;
Bool valid = False;
if (p[0] == 0x49 && p[1] == 0xBB
- && *(Addr*)(&p[2]) == (Addr)place_to_jump_to_EXPECTED
+ && read_misaligned_ULong_LE(&p[2])
+ == (ULong)(Addr)place_to_jump_to_EXPECTED
&& p[10] == 0x41 && p[11] == 0xFF && p[12] == 0xE3) {
/* it's the long form */
valid = True;
@@ -3867,7 +3865,7 @@
&& p[9] == 0x0F && p[10] == 0x0B
&& p[11] == 0x0F && p[12] == 0x0B) {
/* It's the short form. Check the offset is right. */
- Int s32 = *(Int*)(&p[1]);
+ Int s32 = (Int)read_misaligned_UInt_LE(&p[1]);
Long s64 = (Long)s32;
if ((UChar*)p + 5 + s64 == place_to_jump_to_EXPECTED) {
valid = True;
@@ -3886,7 +3884,7 @@
*/
p[0] = 0x49;
p[1] = 0xBB;
- *(Addr*)(&p[2]) = (Addr)disp_cp_chain_me;
+ write_misaligned_ULong_LE(&p[2], (ULong)(Addr)disp_cp_chain_me);
p[10] = 0x41;
p[11] = 0xFF;
p[12] = 0xD3;
Modified: trunk/priv/host_x86_defs.c
==============================================================================
--- trunk/priv/host_x86_defs.c (original)
+++ trunk/priv/host_x86_defs.c Tue Jul 7 13:41:33 2015
@@ -3360,7 +3360,8 @@
*/
UChar* p = (UChar*)place_to_chain;
vassert(p[0] == 0xBA);
- vassert(*(UInt*)(&p[1]) == (UInt)(Addr)disp_cp_chain_me_EXPECTED);
+ vassert(read_misaligned_UInt_LE(&p[1])
+ == (UInt)(Addr)disp_cp_chain_me_EXPECTED);
vassert(p[5] == 0xFF);
vassert(p[6] == 0xD2);
/* And what we want to change it to is:
@@ -3377,11 +3378,8 @@
/* And make the modifications. */
p[0] = 0xE9;
- p[1] = (delta >> 0) & 0xFF;
- p[2] = (delta >> 8) & 0xFF;
- p[3] = (delta >> 16) & 0xFF;
- p[4] = (delta >> 24) & 0xFF;
- p[5] = 0x0F; p[6] = 0x0B;
+ write_misaligned_UInt_LE(&p[1], (UInt)(ULong)delta);
+ p[5] = 0x0F; p[6] = 0x0B;
/* sanity check on the delta -- top 32 are all 0 or all 1 */
delta >>= 32;
vassert(delta == 0LL || delta == -1LL);
@@ -3409,9 +3407,9 @@
UChar* p = (UChar*)place_to_unchain;
Bool valid = False;
if (p[0] == 0xE9
- && p[5] == 0x0F && p[6] == 0x0B) {
+ && p[5] == 0x0F && p[6] == 0x0B) {
/* Check the offset is right. */
- Int s32 = *(Int*)(&p[1]);
+ Int s32 = (Int)read_misaligned_UInt_LE(&p[1]);
if ((UChar*)p + 5 + s32 == place_to_jump_to_EXPECTED) {
valid = True;
if (0)
@@ -3428,7 +3426,7 @@
So it's the same length (convenient, huh).
*/
p[0] = 0xBA;
- *(UInt*)(&p[1]) = (UInt)(Addr)disp_cp_chain_me;
+ write_misaligned_UInt_LE(&p[1], (UInt)(Addr)disp_cp_chain_me);
p[5] = 0xFF;
p[6] = 0xD2;
VexInvalRange vir = { (HWord)place_to_unchain, 7 };
Modified: trunk/priv/main_util.c
==============================================================================
--- trunk/priv/main_util.c (original)
+++ trunk/priv/main_util.c Tue Jul 7 13:41:33 2015
@@ -580,6 +580,59 @@
}
+/*---------------------------------------------------------*/
+/*--- Misaligned memory access support ---*/
+/*---------------------------------------------------------*/
+
+UInt read_misaligned_UInt_LE ( void* addr )
+{
+ UChar* p = (UChar*)addr;
+ UInt w = 0;
+ w = (w << 8) | p[3];
+ w = (w << 8) | p[2];
+ w = (w << 8) | p[1];
+ w = (w << 8) | p[0];
+ return w;
+}
+
+ULong read_misaligned_ULong_LE ( void* addr )
+{
+ UChar* p = (UChar*)addr;
+ ULong w = 0;
+ w = (w << 8) | p[7];
+ w = (w << 8) | p[6];
+ w = (w << 8) | p[5];
+ w = (w << 8) | p[4];
+ w = (w << 8) | p[3];
+ w = (w << 8) | p[2];
+ w = (w << 8) | p[1];
+ w = (w << 8) | p[0];
+ return w;
+}
+
+void write_misaligned_UInt_LE ( void* addr, UInt w )
+{
+ UChar* p = (UChar*)addr;
+ p[0] = (w & 0xFF); w >>= 8;
+ p[1] = (w & 0xFF); w >>= 8;
+ p[2] = (w & 0xFF); w >>= 8;
+ p[3] = (w & 0xFF); w >>= 8;
+}
+
+void write_misaligned_ULong_LE ( void* addr, ULong w )
+{
+ UChar* p = (UChar*)addr;
+ p[0] = (w & 0xFF); w >>= 8;
+ p[1] = (w & 0xFF); w >>= 8;
+ p[2] = (w & 0xFF); w >>= 8;
+ p[3] = (w & 0xFF); w >>= 8;
+ p[4] = (w & 0xFF); w >>= 8;
+ p[5] = (w & 0xFF); w >>= 8;
+ p[6] = (w & 0xFF); w >>= 8;
+ p[7] = (w & 0xFF); w >>= 8;
+}
+
+
/*---------------------------------------------------------------*/
/*--- end main_util.c ---*/
/*---------------------------------------------------------------*/
Modified: trunk/priv/main_util.h
==============================================================================
--- trunk/priv/main_util.h (original)
+++ trunk/priv/main_util.h Tue Jul 7 13:41:33 2015
@@ -163,6 +163,14 @@
#endif
}
+/* Misaligned memory access support. */
+
+extern UInt read_misaligned_UInt_LE ( void* addr );
+extern ULong read_misaligned_ULong_LE ( void* addr );
+
+extern void write_misaligned_UInt_LE ( void* addr, UInt w );
+extern void write_misaligned_ULong_LE ( void* addr, ULong w );
+
#endif /* ndef __VEX_MAIN_UTIL_H */
/*---------------------------------------------------------------*/
|