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
(1) |
|
2
(28) |
3
(21) |
4
(27) |
5
(22) |
6
(24) |
7
(25) |
8
(21) |
|
9
(18) |
10
(20) |
11
(10) |
12
(36) |
13
(18) |
14
(18) |
15
(29) |
|
16
(17) |
17
(7) |
18
(11) |
19
(17) |
20
(18) |
21
(12) |
22
(13) |
|
23
(9) |
24
(8) |
25
(7) |
26
(22) |
27
(18) |
28
(9) |
29
(15) |
|
30
(13) |
31
(7) |
|
|
|
|
|
|
From: <sv...@va...> - 2005-10-04 23:07:38
|
Author: sewardj
Date: 2005-10-05 00:07:33 +0100 (Wed, 05 Oct 2005)
New Revision: 4861
Log:
If the launcher can't figure out what it's own name is, don't bail
out. Instead, print a warning message, continue, and cause any
attempt to trace into a child process to fail with ECHILD.
Modified:
trunk/coregrind/launcher.c
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/include/vki-linux.h
Modified: trunk/coregrind/launcher.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/launcher.c 2005-10-04 22:27:22 UTC (rev 4860)
+++ trunk/coregrind/launcher.c 2005-10-04 23:07:33 UTC (rev 4861)
@@ -99,8 +99,16 @@
invokations of valgrind on child processes. */
memset(launcher_name, 0, PATH_MAX+1);
r =3D readlink("/proc/self/exe", launcher_name, PATH_MAX);
- if (r =3D=3D -1)
- barf("readlink(\"/proc/self/exe\") failed.");
+ if (r =3D=3D -1) {
+ /* If /proc/self/exe can't be followed, don't give up. Instead
+ continue with an empty string for VALGRIND_LAUNCHER. In the
+ sys_execve wrapper, this is tested, and if found to be empty,
+ fail the execve. */
+ fprintf(stderr, "valgrind: warning (non-fatal): "
+ "readlink(\"/proc/self/exe\") failed.\n");
+ fprintf(stderr, "valgrind: continuing, however --trace-children=3D=
yes "
+ "will not work.\n");
+ }
=20
/* tediously augment the env: VALGRIND_LAUNCHER=3Dlauncher_name */
new_line =3D malloc(strlen(VALGRIND_LAUNCHER) + 1=20
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syswrap/syswrap-generic.c 2005-10-04 22:27:22 UTC (=
rev 4860)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2005-10-04 23:07:33 UTC (=
rev 4861)
@@ -2329,6 +2329,16 @@
return;
}
=20
+ /* If we're tracing the child, and the launcher name looks bogus
+ (possibly because launcher.c couldn't figure it out, see
+ comments therein) then we have no option but to fail. */
+ if (VG_(clo_trace_children)=20
+ && (VG_(name_of_launcher) =3D=3D NULL
+ || VG_(name_of_launcher)[0] !=3D '/')) {
+ SET_STATUS_Failure( VKI_ECHILD ); /* "No child processes" */
+ return;
+ }
+
/* After this point, we can't recover if the execve fails. */
VG_(debugLog)(1, "syswrap", "Exec of %s\n", (Char*)ARG1);
=20
Modified: trunk/include/vki-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki-linux.h 2005-10-04 22:27:22 UTC (rev 4860)
+++ trunk/include/vki-linux.h 2005-10-04 23:07:33 UTC (rev 4861)
@@ -1087,6 +1087,7 @@
#define VKI_EINTR 4 /* Interrupted system call */
#define VKI_ENOEXEC 8 /* Exec format error */
#define VKI_EBADF 9 /* Bad file number */
+#define VKI_ECHILD 10 /* No child processes */
#define VKI_EAGAIN 11 /* Try again */
#define VKI_EWOULDBLOCK VKI_EAGAIN
#define VKI_ENOMEM 12 /* Out of memory */
|
|
From: <sv...@va...> - 2005-10-04 22:27:26
|
Author: sewardj
Date: 2005-10-04 23:27:22 +0100 (Tue, 04 Oct 2005)
New Revision: 4860
Log:
Rewrite ML_(fd_allowed):
* include explaination from Tom
* make logic easier to follow, and add comments
* remove veto on the -d file descriptor (detailed comments in code)
Modified:
trunk/coregrind/m_syswrap/syswrap-generic.c
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syswrap/syswrap-generic.c 2005-10-04 20:00:20 UTC (=
rev 4859)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2005-10-04 22:27:22 UTC (=
rev 4860)
@@ -995,12 +995,65 @@
/* ---------------------------------------------------------------------
Vet file descriptors for sanity
------------------------------------------------------------------ */
+/*=20
+> - what does the "Bool soft" parameter mean?
=20
+(Tom Hughes, 3 Oct 05):
+
+Whether or not to consider a file descriptor invalid if it is above
+the current soft limit.
+
+Basically if we are testing whether a newly created file descriptor is
+valid (in a post handler) then we set soft to true, and if we are
+testing whether a file descriptor that is about to be used (in a pre
+handler) is valid [viz, an already-existing fd] then we set it to false.
+
+The point is that if the (virtual) soft limit is lowered then any
+existing descriptors can still be read/written/closed etc (so long as
+they are below the valgrind reserved descriptors) but no new
+descriptors can be created above the new soft limit.
+
+(jrs 4 Oct 05: in which case, I've renamed it "isNewFd")
+*/
+
/* Return true if we're allowed to use or create this fd */
-Bool ML_(fd_allowed)(Int fd, const Char *syscallname, ThreadId tid, Bool=
soft)
+Bool ML_(fd_allowed)(Int fd, const Char *syscallname, ThreadId tid, Bool=
isNewFd)
{
- if ( (fd < 0 || fd >=3D VG_(fd_hard_limit) || fd =3D=3D VG_(clo_log_f=
d))=20
- && VG_(showing_core_errors)() ) {
+ Bool allowed =3D True;
+
+ /* hard limits always apply */
+ if (fd < 0 || fd >=3D VG_(fd_hard_limit))
+ allowed =3D False;
+
+ /* hijacking the logging fd is never allowed */
+ if (fd =3D=3D VG_(clo_log_fd))
+ allowed =3D False;
+
+ /* if creating a new fd (rather than using an existing one), the
+ soft limit must also be observed */
+ if (isNewFd && fd >=3D VG_(fd_soft_limit))
+ allowed =3D False;
+
+ /* this looks like it ought to be included, but causes problems: */
+ /*
+ if (fd =3D=3D 2 && VG_(debugLog_getLevel)() > 0)
+ allowed =3D False;
+ */
+ /* The difficulty is as follows: consider a program P which expects
+ to be able to mess with (redirect) its own stderr (fd 2).
+ Usually to deal with P we would issue command line flags to send
+ logging somewhere other than stderr, so as not to disrupt P.
+ The problem is that -d unilaterally hijacks stderr with no
+ consultation with P. And so, if this check is enabled, P will
+ work OK normally but fail if -d is issued.
+
+ Basically -d is a hack and you take your chances when using it.
+ It's very useful for low level debugging -- particularly at
+ startup -- and having its presence change the behaviour of the
+ client is exactly what we don't want. */
+
+ /* croak? */
+ if ((!allowed) && VG_(showing_core_errors)() ) {
VG_(message)(Vg_UserMsg,=20
"Warning: invalid file descriptor %d in syscall %s()",
fd, syscallname);
@@ -1010,19 +1063,9 @@
if (VG_(clo_verbosity) > 1) {
VG_(get_and_pp_StackTrace)(tid, VG_(clo_backtrace_size));
}
- return False;
}
- else=20
- if (soft && fd >=3D VG_(fd_soft_limit)) {
- return False;
- }
- else=20
- if (fd =3D=3D 2 && VG_(debugLog_getLevel)() > 0) {
- return False;
- }=20
- else {
- return True;
- }
+
+ return allowed;
}
=20
=20
|
|
From: <sv...@va...> - 2005-10-04 20:00:51
|
Author: sewardj
Date: 2005-10-04 21:00:49 +0100 (Tue, 04 Oct 2005)
New Revision: 1411
Log:
Handle SSE2 pmaddwd.
Modified:
trunk/priv/guest-x86/toIR.c
Modified: trunk/priv/guest-x86/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-x86/toIR.c 2005-10-04 11:43:37 UTC (rev 1410)
+++ trunk/priv/guest-x86/toIR.c 2005-10-04 20:00:49 UTC (rev 1411)
@@ -9591,6 +9591,53 @@
goto decode_success;
}
=20
+ /* 66 0F F5 =3D PMADDWD -- Multiply and add packed integers from
+ E(xmm or mem) to G(xmm) */
+ if (sz =3D=3D 2 && insn[0] =3D=3D 0x0F && insn[1] =3D=3D 0xF5) {
+ IRTemp s1V =3D newTemp(Ity_V128);
+ IRTemp s2V =3D newTemp(Ity_V128);
+ IRTemp dV =3D newTemp(Ity_V128);
+ IRTemp s1Hi =3D newTemp(Ity_I64);
+ IRTemp s1Lo =3D newTemp(Ity_I64);
+ IRTemp s2Hi =3D newTemp(Ity_I64);
+ IRTemp s2Lo =3D newTemp(Ity_I64);
+ IRTemp dHi =3D newTemp(Ity_I64);
+ IRTemp dLo =3D newTemp(Ity_I64);
+ modrm =3D insn[2];
+ if (epartIsReg(modrm)) {
+ assign( s1V, getXMMReg(eregOfRM(modrm)) );
+ delta +=3D 2+1;
+ DIP("pmaddwd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
+ nameXMMReg(gregOfRM(modrm)));
+ } else {
+ addr =3D disAMode ( &alen, sorb, delta+2, dis_buf );
+ assign( s1V, loadLE(Ity_V128, mkexpr(addr)) );
+ delta +=3D 2+alen;
+ DIP("pmaddwd %s,%s\n", dis_buf,
+ nameXMMReg(gregOfRM(modrm)));
+ }
+ assign( s2V, getXMMReg(gregOfRM(modrm)) );
+ assign( s1Hi, unop(Iop_V128HIto64, mkexpr(s1V)) );
+ assign( s1Lo, unop(Iop_V128to64, mkexpr(s1V)) );
+ assign( s2Hi, unop(Iop_V128HIto64, mkexpr(s2V)) );
+ assign( s2Lo, unop(Iop_V128to64, mkexpr(s2V)) );
+ assign( dHi, mkIRExprCCall(
+ Ity_I64, 0/*regparms*/,
+ "x86g_calculate_mmx_pmaddwd",=20
+ &x86g_calculate_mmx_pmaddwd,
+ mkIRExprVec_2( mkexpr(s1Hi), mkexpr(s2Hi))
+ ));
+ assign( dLo, mkIRExprCCall(
+ Ity_I64, 0/*regparms*/,
+ "x86g_calculate_mmx_pmaddwd",=20
+ &x86g_calculate_mmx_pmaddwd,
+ mkIRExprVec_2( mkexpr(s1Lo), mkexpr(s2Lo))
+ ));
+ assign( dV, binop(Iop_64HLtoV128, mkexpr(dHi), mkexpr(dLo))) ;
+ putXMMReg(gregOfRM(modrm), mkexpr(dV));
+ goto decode_success;
+ }
+
/* 66 0F EE =3D PMAXSW -- 16x8 signed max */
if (sz =3D=3D 2 && insn[0] =3D=3D 0x0F && insn[1] =3D=3D 0xEE) {
delta =3D dis_SSEint_E_to_G( sorb, delta+2,=20
|
|
From: <sv...@va...> - 2005-10-04 20:00:28
|
Author: sewardj Date: 2005-10-04 21:00:20 +0100 (Tue, 04 Oct 2005) New Revision: 4859 Log: Add regtests for SSE2 pmaddwd. Modified: trunk/none/tests/x86/insn_sse2.def trunk/none/tests/x86/insn_sse2.stdout.exp Modified: trunk/none/tests/x86/insn_sse2.def =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/none/tests/x86/insn_sse2.def 2005-10-04 19:33:44 UTC (rev 4858) +++ trunk/none/tests/x86/insn_sse2.def 2005-10-04 20:00:20 UTC (rev 4859) @@ -186,6 +186,8 @@ pinsrw imm8[5] m16.uw[0xffff] xmm.uw[1234,5678,4321,8765,1111,2222,3333,= 4444] =3D> 2.uw[1234,5678,4321,8765,1111,65535,3333,4444] pinsrw imm8[6] m16.uw[0xffff] xmm.uw[1234,5678,4321,8765,1111,2222,3333,= 4444] =3D> 2.uw[1234,5678,4321,8765,1111,2222,65535,4444] pinsrw imm8[7] m16.uw[0xffff] xmm.uw[1234,5678,4321,8765,1111,2222,3333,= 4444] =3D> 2.uw[1234,5678,4321,8765,1111,2222,3333,65535] +pmaddwd xmm.sw[1234,5678,-4321,-8765,999,888,777,666] xmm.sw[1111,-2222,= 3333,-4444,-987,-31111,-14142,-31416] =3D> 1.sd[-11245542,24549767,-28612= 581,-31911390] +pmaddwd m128.sw[1234,5678,-4321,-8765,999,888,777,666] xmm.sw[1111,-2222= ,3333,-4444,-987,-31111,-14142,-31416] =3D> 1.sd[-11245542,24549767,-2861= 2581,-31911390] pmaxsw xmm.sw[-1,2,-3,4,-5,6,-7,8] xmm.sw[2,-3,4,-5,6,-7,8,-9] =3D> 1.sw= [2,2,4,4,6,6,8,8] pmaxsw m128.sw[-1,2,-3,4,-5,6,-7,8] xmm.sw[2,-3,4,-5,6,-7,8,-9] =3D> 1.s= w[2,2,4,4,6,6,8,8] pmaxub xmm.ub[10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25] xmm.ub[25= ,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10] =3D> 1.ub[25,24,23,22,21,2= 0,19,18,18,19,20,21,22,23,24,25] Modified: trunk/none/tests/x86/insn_sse2.stdout.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/none/tests/x86/insn_sse2.stdout.exp 2005-10-04 19:33:44 UTC (re= v 4858) +++ trunk/none/tests/x86/insn_sse2.stdout.exp 2005-10-04 20:00:20 UTC (re= v 4859) @@ -186,6 +186,8 @@ pinsrw_14 ... ok pinsrw_15 ... ok pinsrw_16 ... ok +pmaddwd_1 ... ok +pmaddwd_2 ... ok pmaxsw_1 ... ok pmaxsw_2 ... ok pmaxub_1 ... ok |
|
From: <sv...@va...> - 2005-10-04 19:34:07
|
Author: sewardj Date: 2005-10-04 20:33:44 +0100 (Tue, 04 Oct 2005) New Revision: 4858 Log: Update Modified: trunk/docs/internals/3_0_BUGSTATUS.txt Modified: trunk/docs/internals/3_0_BUGSTATUS.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/docs/internals/3_0_BUGSTATUS.txt 2005-10-04 16:55:22 UTC (rev 4= 857) +++ trunk/docs/internals/3_0_BUGSTATUS.txt 2005-10-04 19:33:44 UTC (rev 4= 858) @@ -125,8 +125,8 @@ FIXED-TRUNK: TODO =20 ---------------------------------------------------------------- -113541 vex: the `impossible' happened: Grp5(x86) - +113541 vex: the `impossible' happened: Grp5(x86) (alt encoding inc/dec) + case 1 FIXED-TRUNK: TODO =20 ---------------------------------------------------------------- @@ -135,6 +135,12 @@ FIXED-TRUNK: 4856 =20 ---------------------------------------------------------------- +113810 priv/guest-x86/toIR.c:7964 (disInstr_X86_WRK): Assertion `sz =3D= =3D 4' + Inferred 66 0F F6 (66 + PSADBW =3D=3D SSE PSADBW) + +FIXED-TRUNK: vex:1410, test in valgrind:4851 + +---------------------------------------------------------------- 113796 read() and write() do not work if buffer is in shared memory =20 Although the underlying cause is still present in the 3.0 code @@ -142,7 +148,12 @@ =20 FIXED-TRUNK: 4852 =20 +---------------------------------------------------------------- +113851 vex x86->IR: unhandled instruction bytes: 0x66 0xF 0xF5 0xC7 + (pmaddwd) =20 + + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D Bugs targeted for 3.1.0 and 3.0.2 = =3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D |
|
From: <sv...@va...> - 2005-10-04 16:55:29
|
Author: tom Date: 2005-10-04 17:55:22 +0100 (Tue, 04 Oct 2005) New Revision: 4857 Log: Document fix for 113642. Modified: trunk/docs/internals/3_0_BUGSTATUS.txt Modified: trunk/docs/internals/3_0_BUGSTATUS.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/docs/internals/3_0_BUGSTATUS.txt 2005-10-04 16:54:54 UTC (rev 4= 856) +++ trunk/docs/internals/3_0_BUGSTATUS.txt 2005-10-04 16:55:22 UTC (rev 4= 857) @@ -132,7 +132,7 @@ ---------------------------------------------------------------- 113642 New: valgrind crashes when trying to read debug information =20 -FIXED-TRUNK: unconfirmed (Bryan suspects bug is invalid) +FIXED-TRUNK: 4856 =20 ---------------------------------------------------------------- 113796 read() and write() do not work if buffer is in shared memory |
|
From: <sv...@va...> - 2005-10-04 16:54:55
|
Author: tom
Date: 2005-10-04 17:54:54 +0100 (Tue, 04 Oct 2005)
New Revision: 4856
Log:
Make sure we have all the DWARF2 sections before trying to decode
any DWARF2 debug information. All make sure we don't fall over if
the .debug_info is less than four bytes long. Fixed bug 113642.
Modified:
trunk/coregrind/m_debuginfo/dwarf.c
trunk/coregrind/m_debuginfo/symtab.c
Modified: trunk/coregrind/m_debuginfo/dwarf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_debuginfo/dwarf.c 2005-10-04 16:45:28 UTC (rev 4855=
)
+++ trunk/coregrind/m_debuginfo/dwarf.c 2005-10-04 16:54:54 UTC (rev 4856=
)
@@ -916,6 +916,12 @@
UChar* end =3D debuginfo + debug_info_sz;
UInt blklen;
=20
+ /* Make sure we at least have a header for the first block */
+ if (debug_info_sz < 4) {
+ ML_(symerr)( "Last block truncated in .debug_info; ignoring" );
+ return;
+ }
+
/* Iterate on all the blocks we find in .debug_info */
for ( block =3D debuginfo; block < end - 4; block +=3D blklen + 4 ) {
=20
Modified: trunk/coregrind/m_debuginfo/symtab.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_debuginfo/symtab.c 2005-10-04 16:45:28 UTC (rev 485=
5)
+++ trunk/coregrind/m_debuginfo/symtab.c 2005-10-04 16:54:54 UTC (rev 485=
6)
@@ -1745,7 +1745,7 @@
stabstr, stabstr_sz );
}
# endif
- if (debug_line) {
+ if (debug_info && debug_abbv && debug_line && debug_str) {
ML_(read_debuginfo_dwarf2) ( si,=20
debug_info, debug_info_sz,
debug_abbv,
|
|
From: <sv...@va...> - 2005-10-04 16:45:39
|
Author: tom Date: 2005-10-04 17:45:28 +0100 (Tue, 04 Oct 2005) New Revision: 4855 Log: Document bug 113796. Modified: trunk/docs/internals/3_0_BUGSTATUS.txt Modified: trunk/docs/internals/3_0_BUGSTATUS.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/docs/internals/3_0_BUGSTATUS.txt 2005-10-04 15:59:54 UTC (rev 4= 854) +++ trunk/docs/internals/3_0_BUGSTATUS.txt 2005-10-04 16:45:28 UTC (rev 4= 855) @@ -134,7 +134,15 @@ =20 FIXED-TRUNK: unconfirmed (Bryan suspects bug is invalid) =20 +---------------------------------------------------------------- +113796 read() and write() do not work if buffer is in shared memory =20 +Although the underlying cause is still present in the 3.0 code +this bug isonly user visible in the 2.4 code base. + +FIXED-TRUNK: 4852 + + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D Bugs targeted for 3.1.0 and 3.0.2 = =3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D |
|
From: <sv...@va...> - 2005-10-04 16:00:04
|
Author: tom
Date: 2005-10-04 16:59:54 +0100 (Tue, 04 Oct 2005)
New Revision: 4854
Log:
Create a new SkShmC segment type for shared memory segments so that we
can ensure they are never merged with adjacent segments. This makes
sure that we can find the right piece of memory to release when the
shmdt system call occurs.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr.c
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/coregrind/pub_core_aspacemgr.h
trunk/include/pub_tool_aspacemgr.h
Modified: trunk/coregrind/m_aspacemgr/aspacemgr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-10-04 13:02:31 UTC (rev =
4853)
+++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-10-04 15:59:54 UTC (rev =
4854)
@@ -441,6 +441,7 @@
case SkAnonV: return "ANON";
case SkFileC: return "file";
case SkFileV: return "FILE";
+ case SkShmC: return "shm ";
case SkResvn: return "RSVN";
default: return "????";
}
@@ -523,7 +524,7 @@
);
break;
=20
- case SkAnonC: case SkAnonV:
+ case SkAnonC: case SkAnonV: case SkShmC:
VG_(debugLog)(
logLevel, "aspacem",
"%3d: %s %010llx-%010llx %s %c%c%c%c%c\n",
@@ -688,7 +689,7 @@
&& !s->hasR && !s->hasW && !s->hasX && !s->hasT
&& !s->isCH;
=20
- case SkAnonC: case SkAnonV:
+ case SkAnonC: case SkAnonV: case SkShmC:
return=20
s->smode =3D=3D SmFixed=20
&& s->dev =3D=3D 0 && s->ino =3D=3D 0 && s->offset =3D=3D 0 =
&& s->fnIdx =3D=3D -1
@@ -754,6 +755,9 @@
}
break;
=20
+ case SkShmC:
+ return False;
+
default:
break;
=20
@@ -890,7 +894,8 @@
same =3D nsegments[i].kind =3D=3D SkAnonC
|| nsegments[i].kind =3D=3D SkAnonV
|| nsegments[i].kind =3D=3D SkFileC
- || nsegments[i].kind =3D=3D SkFileV;
+ || nsegments[i].kind =3D=3D SkFileV
+ || nsegments[i].kind =3D=3D SkShmC;
=20
seg_prot =3D 0;
if (nsegments[i].hasR) seg_prot |=3D VKI_PROT_READ;
@@ -1106,7 +1111,7 @@
return NULL;
}
switch (nsegments[i].kind) {
- case SkFileC: case SkFileV:=20
+ case SkFileC: case SkFileV: case SkShmC:
case SkAnonC: case SkAnonV: case SkResvn:
return &nsegments[i];
default:
@@ -1169,6 +1174,7 @@
for (i =3D iLo; i <=3D iHi; i++) {
if ( (nsegments[i].kind =3D=3D SkFileC=20
|| nsegments[i].kind =3D=3D SkAnonC
+ || nsegments[i].kind =3D=3D SkShmC
|| (nsegments[i].kind =3D=3D SkFree && freeOk)
|| (nsegments[i].kind =3D=3D SkResvn && freeOk))
&& (needR ? nsegments[i].hasR : True)
@@ -1638,6 +1644,7 @@
if (nsegments[i].kind =3D=3D SkFree
|| nsegments[i].kind =3D=3D SkFileC
|| nsegments[i].kind =3D=3D SkAnonC
+ || nsegments[i].kind =3D=3D SkShmC
|| nsegments[i].kind =3D=3D SkResvn) {
/* ok */
} else {
@@ -1830,6 +1837,37 @@
return needDiscard;
}
=20
+/* Notifies aspacem that the client completed a shmat successfully.
+ The segment array is updated accordingly. If the returned Bool is
+ True, the caller should immediately discard translations from the
+ specified address range. */
+
+Bool
+VG_(am_notify_client_shmat)( Addr a, SizeT len, UInt prot )
+{
+ NSegment seg;
+ Bool needDiscard;
+
+ aspacem_assert(len > 0);
+ aspacem_assert(VG_IS_PAGE_ALIGNED(a));
+ aspacem_assert(VG_IS_PAGE_ALIGNED(len));
+
+ /* Discard is needed if any of the just-trashed range had T. */
+ needDiscard =3D any_Ts_in_range( a, len );
+
+ init_nsegment( &seg );
+ seg.kind =3D SkShmC;
+ seg.start =3D a;
+ seg.end =3D a + len - 1;
+ seg.offset =3D 0;
+ seg.hasR =3D toBool(prot & VKI_PROT_READ);
+ seg.hasW =3D toBool(prot & VKI_PROT_WRITE);
+ seg.hasX =3D toBool(prot & VKI_PROT_EXEC);
+ add_segment( &seg );
+ AM_SANITY_CHECK;
+ return needDiscard;
+}
+
/* Notifies aspacem that an mprotect was completed successfully. The
segment array is updated accordingly. Note, as with
VG_(am_notify_munmap), it is not the job of this function to reject
@@ -1866,7 +1904,7 @@
for (i =3D iLo; i <=3D iHi; i++) {
/* Apply the permissions to all relevant segments. */
switch (nsegments[i].kind) {
- case SkAnonC: case SkAnonV: case SkFileC: case SkFileV:
+ case SkAnonC: case SkAnonV: case SkFileC: case SkFileV: case Sk=
ShmC:
nsegments[i].hasR =3D newR;
nsegments[i].hasW =3D newW;
nsegments[i].hasX =3D newX;
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syswrap/syswrap-generic.c 2005-10-04 13:02:31 UTC (=
rev 4853)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2005-10-04 15:59:54 UTC (=
rev 4854)
@@ -1600,8 +1600,7 @@
cope with the discrepancy, aspacem's sync checker omits the
dev/ino correspondence check in cases where V does not know
the dev/ino. */
- d =3D VG_(am_notify_client_mmap)( res, VG_PGROUNDUP(segmentSize),=20
- prot, VKI_MAP_ANONYMOUS, 0,0);
+ d =3D VG_(am_notify_client_shmat)( res, VG_PGROUNDUP(segmentSize),=
prot );
=20
/* we don't distinguish whether it's read-only or
* read-write -- it doesn't matter really. */
@@ -1630,7 +1629,11 @@
if (s !=3D NULL) {
Addr s_start =3D s->start;
SizeT s_len =3D s->end+1 - s->start;
- Bool d =3D VG_(am_notify_munmap)(s_start, s_len);
+ Bool d;
+
+ vg_assert(s->kind =3D=3D SkShmC && s->start =3D=3D arg0);
+
+ d =3D VG_(am_notify_munmap)(s_start, s_len);
s =3D NULL; /* s is now invalid */
VG_TRACK( die_mem_munmap, s_start, s_len );
if (d)
Modified: trunk/coregrind/pub_core_aspacemgr.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/pub_core_aspacemgr.h 2005-10-04 13:02:31 UTC (rev 485=
3)
+++ trunk/coregrind/pub_core_aspacemgr.h 2005-10-04 15:59:54 UTC (rev 485=
4)
@@ -155,6 +155,12 @@
extern Bool VG_(am_notify_client_mmap)
( Addr a, SizeT len, UInt prot, UInt flags, Int fd, Off64T offset );
=20
+/* Notifies aspacem that the client completed a shmat successfully.
+ The segment array is updated accordingly. If the returned Bool is
+ True, the caller should immediately discard translations from the
+ specified address range. */
+extern Bool VG_(am_notify_client_shmat)( Addr a, SizeT len, UInt prot );
+
/* Notifies aspacem that an mprotect was completed successfully. The
segment array is updated accordingly. Note, as with
VG_(am_notify_munmap), it is not the job of this function to reject
Modified: trunk/include/pub_tool_aspacemgr.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/pub_tool_aspacemgr.h 2005-10-04 13:02:31 UTC (rev 4853)
+++ trunk/include/pub_tool_aspacemgr.h 2005-10-04 15:59:54 UTC (rev 4854)
@@ -43,6 +43,7 @@
SkAnonV, // anonymous mapping belonging to valgrind
SkFileC, // file mapping belonging to the client
SkFileV, // file mapping belonging to valgrind
+ SkShmC, // shared memory segment belonging to the client
SkResvn // reservation
}
SegKind;
@@ -73,6 +74,12 @@
// there is an associated file
// segment may have permissions
=20
+ kind =3D=3D SkShmC:
+ // smode=3D=3DSmFixed
+ // there's no associated file:
+ dev=3D=3Dino=3D=3Dfoff =3D 0, fnidx =3D=3D -1
+ // segment may have permissions
+
kind =3D=3D SkResvn
// the segment may be resized if required
// there's no associated file:
|
|
From: Tom H. <to...@co...> - 2005-10-04 15:26:19
|
In message <200...@ac...>
Julian Seward <js...@ac...> wrote:
>> I've had a go at fixing this and my best scheme so far is to
>> create a new SkShmC segment type for shared memory segments and
>> then prevent the address space manager from merging those segments.
>>
>> The only problem with that is notifying aspacem that the memory is
>> a shared memory segment - I've stolen a bit from the mmap flags at
>> the moment but that is nasty so I'm thinking that adding a special
>> notify function to aspacem for shm segments might be better?
>
> SkShmC and a new notify function sounds good to me.
>
> Can I just check (semantics): a shared memory segment
> cannot also be a file or anonymous mapping, is that correct?
Effectively - as is noted in the source there is (on linux) an inode
and filename associated with the mapping in the kernel but those aren't
really exposed to user space beyond appearing in the maps file.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Julian S. <js...@ac...> - 2005-10-04 15:16:23
|
> > I think the old system mostly got away with it because there was a > > special flag for shared memory which probably stopped it merging most > > of the time. > > I've had a go at fixing this and my best scheme so far is to > create a new SkShmC segment type for shared memory segments and > then prevent the address space manager from merging those segments. > > The only problem with that is notifying aspacem that the memory is > a shared memory segment - I've stolen a bit from the mmap flags at > the moment but that is nasty so I'm thinking that adding a special > notify function to aspacem for shm segments might be better? SkShmC and a new notify function sounds good to me. Can I just check (semantics): a shared memory segment cannot also be a file or anonymous mapping, is that correct? J |
|
From: Nicholas N. <nj...@cs...> - 2005-10-04 14:40:05
|
On Tue, 4 Oct 2005, Tom Hughes wrote: > Back in January Jeremy added new SYS_PRE_MEM_READ/WRITE macros which > as well as doing the standard PRE_MEM_READ/WRITE checks also checked > whether the memory in question was in a client segment with the right > permissions to read/write to and caused the syscall to return EFAULT > if there was a problem. > > This seems to have been lost during the VEX merge and I was wondering > if it was deliberate or not? It is the reason why bug 113796 didn't > appear to be present in the 3.0 code when the underlying cause was in > fact still present. Not sure if it was deliberate but nobody has since found it necessary to put back in. One thing I didn't like about the approach was that it could change the behaviour of some syscalls, eg. something like: read(0, 0, 0) I think there the buffer is unwritable so Valgrind forces the syscall failure even though the buffer isn't touched because the length is zero. It concerned me that this kind of semantics-changing might have been occurring for other syscalls. Nick |
|
From: Tom H. <to...@co...> - 2005-10-04 14:14:36
|
Back in January Jeremy added new SYS_PRE_MEM_READ/WRITE macros which as well as doing the standard PRE_MEM_READ/WRITE checks also checked whether the memory in question was in a client segment with the right permissions to read/write to and caused the syscall to return EFAULT if there was a problem. This seems to have been lost during the VEX merge and I was wondering if it was deliberate or not? It is the reason why bug 113796 didn't appear to be present in the 3.0 code when the underlying cause was in fact still present. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: Tom H. <to...@co...> - 2005-10-04 13:57:25
|
In message <yek...@de...>
Tom Hughes <to...@co...> wrote:
> It turns out that shmdt is a bit broken since the merge...
>
> The problem is that the post handler unmaps the whole of the segment
> containing the specified address which is really bad if the shared
> memory segment has been merged with an adjacent segment by the address
> space manager because they are compatible.
>
> I think the old system mostly got away with it because there was a
> special flag for shared memory which probably stopped it merging most
> of the time.
I've had a go at fixing this and my best scheme so far is to
create a new SkShmC segment type for shared memory segments and
then prevent the address space manager from merging those segments.
The only problem with that is notifying aspacem that the memory is
a shared memory segment - I've stolen a bit from the mmap flags at
the moment but that is nasty so I'm thinking that adding a special
notify function to aspacem for shm segments might be better?
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: <sv...@va...> - 2005-10-04 13:02:49
|
Author: tom
Date: 2005-10-04 14:02:31 +0100 (Tue, 04 Oct 2005)
New Revision: 4853
Log:
Check permissions when sanity checking the segment list against
the kernel's memory map.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-10-04 12:04:06 UTC (rev =
4852)
+++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-10-04 13:02:31 UTC (rev =
4853)
@@ -884,6 +884,7 @@
for (i =3D iLo; i <=3D iHi; i++) {
=20
Bool same, cmp_offsets, cmp_devino;
+ UInt seg_prot;
=20
/* compare the kernel's offering against ours. */
same =3D nsegments[i].kind =3D=3D SkAnonC
@@ -891,12 +892,18 @@
|| nsegments[i].kind =3D=3D SkFileC
|| nsegments[i].kind =3D=3D SkFileV;
=20
+ seg_prot =3D 0;
+ if (nsegments[i].hasR) seg_prot |=3D VKI_PROT_READ;
+ if (nsegments[i].hasW) seg_prot |=3D VKI_PROT_WRITE;
+ if (nsegments[i].hasX) seg_prot |=3D VKI_PROT_EXEC;
+
cmp_offsets
=3D nsegments[i].kind =3D=3D SkFileC || nsegments[i].kind =3D=3D=
SkFileV;
cmp_devino
=3D nsegments[i].dev !=3D 0 || nsegments[i].ino !=3D 0;
=20
same =3D same
+ && seg_prot =3D=3D prot
&& (cmp_devino
? (nsegments[i].dev =3D=3D dev && nsegments[i].ino =3D=
=3D ino)
: True)
@@ -920,9 +927,9 @@
VG_(debugLog)(0,"aspacem",
"sync_check_mapping_callback: segment mismatch: kerne=
l's seg:\n");
VG_(debugLog)(0,"aspacem",=20
- "start=3D0x%llx end=3D0x%llx dev=3D%u ino=3D%u offset=
=3D%lld\n",
+ "start=3D0x%llx end=3D0x%llx prot=3D%u dev=3D%u ino=3D=
%u offset=3D%lld\n",
(ULong)addr, ((ULong)addr) + ((ULong)len) - 1,
- dev, ino, offset );
+ prot, dev, ino, offset );
return;
}
=20
|
|
From: Tom H. <to...@co...> - 2005-10-04 12:13:45
|
It turns out that shmdt is a bit broken since the merge... The problem is that the post handler unmaps the whole of the segment containing the specified address which is really bad if the shared memory segment has been merged with an adjacent segment by the address space manager because they are compatible. I think the old system mostly got away with it because there was a special flag for shared memory which probably stopped it merging most of the time. I suspect that this problem is the current cause of the shared memory problem reported on the users list recently. The real problem is that shmdt is only given an address and I don't think there is any way (other than walking /proc/self/maps) to get the size from that to do the unmap properly. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: <sv...@va...> - 2005-10-04 12:04:13
|
Author: tom
Date: 2005-10-04 13:04:06 +0100 (Tue, 04 Oct 2005)
New Revision: 4852
Log:
Get the SHM_RDONLY test the right way round. Fixes bug #113796.
Modified:
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/include/vki-linux.h
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syswrap/syswrap-generic.c 2005-10-04 11:44:11 UTC (=
rev 4851)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2005-10-04 12:04:06 UTC (=
rev 4852)
@@ -1588,7 +1588,7 @@
UInt prot =3D VKI_PROT_READ|VKI_PROT_WRITE;
Bool d;
=20
- if (!(arg2 & 010000)) /* =3D SHM_RDONLY */
+ if (arg2 & VKI_SHM_RDONLY)
prot &=3D ~VKI_PROT_WRITE;
/* It isn't exactly correct to pass 0 for the fd and offset
here. The kernel seems to think the corresponding section
Modified: trunk/include/vki-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki-linux.h 2005-10-04 11:44:11 UTC (rev 4851)
+++ trunk/include/vki-linux.h 2005-10-04 12:04:06 UTC (rev 4852)
@@ -1331,6 +1331,8 @@
void *shm_unused3; /* unused */
};
=20
+#define VKI_SHM_RDONLY 010000 /* read-only access */
+
#define VKI_SHM_STAT 13
#define VKI_SHM_INFO 14
=20
|
|
From: <sv...@va...> - 2005-10-04 11:44:17
|
Author: sewardj Date: 2005-10-04 12:44:11 +0100 (Tue, 04 Oct 2005) New Revision: 4851 Log: Reenable SSE2 psadbw test. Modified: trunk/none/tests/x86/insn_sse2.def trunk/none/tests/x86/insn_sse2.stdout.exp Modified: trunk/none/tests/x86/insn_sse2.def =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/none/tests/x86/insn_sse2.def 2005-10-03 11:40:44 UTC (rev 4850) +++ trunk/none/tests/x86/insn_sse2.def 2005-10-04 11:44:11 UTC (rev 4851) @@ -207,8 +207,8 @@ pmuludq m128.ud[12345678,0,87654321,0] xmm.ud[87654321,0,12345678,0] =3D= > 1.uq[1082152022374638,1082152022374638] por xmm.uq[0xfdb97531eca86420,0x0123456789abcdef] xmm.uq[0x0123456789abc= def,0xfdb97531eca86420] =3D> 1.uq[0xfdbb7577edabedef,0xfdbb7577edabedef] por m128.uq[0xfdb97531eca86420,0x0123456789abcdef] xmm.uq[0x0123456789ab= cdef,0xfdb97531eca86420] =3D> 1.uq[0xfdbb7577edabedef,0xfdbb7577edabedef] -#####psadbw xmm.ub[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16] xmm.ub[16,15,= 14,13,12,11,10,9,8,7,6,5,4,3,2,1] =3D> 1.sw[64,0,0,0,64,0,0,0] -#####psadbw m128.ub[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16] xmm.ub[16,15= ,14,13,12,11,10,9,8,7,6,5,4,3,2,1] =3D> 1.sw[64,0,0,0,64,0,0,0] +psadbw xmm.ub[1,2,3,24,5,6,7,8,9,10,11,12,13,14,15,16] xmm.ub[16,15,14,1= 3,12,11,10,9,8,37,6,5,4,3,2,1] =3D> 1.sw[66,0,0,0,88,0,0,0] +psadbw m128.ub[41,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16] xmm.ub[16,15,14,= 83,12,11,10,9,8,7,6,5,4,3,2,1] =3D> 1.sw[144,0,0,0,64,0,0,0] pshufd imm8[0x1b] xmm.sd[1122,3344,5566,7788] xmm.sd[0,0,0,0] =3D> 2.sd[= 7788,5566,3344,1122] pshufd imm8[0x1b] m128.sd[1122,3344,5566,7788] xmm.sd[0,0,0,0] =3D> 2.sd= [7788,5566,3344,1122] pshufhw imm8[0x1b] xmm.sw[11,22,33,44,55,66,77,88] xmm.sw[0,0,0,0,0,0,0,= 0] =3D> 2.sw[11,22,33,44,88,77,66,55] Modified: trunk/none/tests/x86/insn_sse2.stdout.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/none/tests/x86/insn_sse2.stdout.exp 2005-10-03 11:40:44 UTC (re= v 4850) +++ trunk/none/tests/x86/insn_sse2.stdout.exp 2005-10-04 11:44:11 UTC (re= v 4851) @@ -207,6 +207,8 @@ pmuludq_4 ... ok por_1 ... ok por_2 ... ok +psadbw_1 ... ok +psadbw_2 ... ok pshufd_1 ... ok pshufd_2 ... ok pshufhw_1 ... ok |
|
From: <sv...@va...> - 2005-10-04 11:43:47
|
Author: sewardj
Date: 2005-10-04 12:43:37 +0100 (Tue, 04 Oct 2005)
New Revision: 1410
Log:
Implement SSE2 psadbw.
Modified:
trunk/priv/guest-x86/toIR.c
Modified: trunk/priv/guest-x86/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-x86/toIR.c 2005-10-03 11:39:02 UTC (rev 1409)
+++ trunk/priv/guest-x86/toIR.c 2005-10-04 11:43:37 UTC (rev 1410)
@@ -7960,8 +7960,7 @@
=20
/* ***--- this is an MMX class insn introduced in SSE1 ---*** */
/* 0F F6 =3D PSADBW -- sum of 8Ux8 absolute differences */
- if (insn[0] =3D=3D 0x0F && insn[1] =3D=3D 0xF6) {
- vassert(sz =3D=3D 4);
+ if (sz =3D=3D 4 && insn[0] =3D=3D 0x0F && insn[1] =3D=3D 0xF6) {
do_MMX_preamble();
delta =3D dis_MMXop_regmem_to_reg (=20
sorb, delta+2, insn[1], "psadbw", False );
@@ -9746,6 +9745,53 @@
goto decode_success;
}
=20
+ /* 66 0F F6 =3D PSADBW -- 2 x (8x8 -> 48 zeroes ++ u16) Sum Abs Diffs
+ from E(xmm or mem) to G(xmm) */
+ if (sz =3D=3D 2 && insn[0] =3D=3D 0x0F && insn[1] =3D=3D 0xF6) {
+ IRTemp s1V =3D newTemp(Ity_V128);
+ IRTemp s2V =3D newTemp(Ity_V128);
+ IRTemp dV =3D newTemp(Ity_V128);
+ IRTemp s1Hi =3D newTemp(Ity_I64);
+ IRTemp s1Lo =3D newTemp(Ity_I64);
+ IRTemp s2Hi =3D newTemp(Ity_I64);
+ IRTemp s2Lo =3D newTemp(Ity_I64);
+ IRTemp dHi =3D newTemp(Ity_I64);
+ IRTemp dLo =3D newTemp(Ity_I64);
+ modrm =3D insn[2];
+ if (epartIsReg(modrm)) {
+ assign( s1V, getXMMReg(eregOfRM(modrm)) );
+ delta +=3D 2+1;
+ DIP("psadbw %s,%s\n", nameXMMReg(eregOfRM(modrm)),
+ nameXMMReg(gregOfRM(modrm)));
+ } else {
+ addr =3D disAMode ( &alen, sorb, delta+2, dis_buf );
+ assign( s1V, loadLE(Ity_V128, mkexpr(addr)) );
+ delta +=3D 2+alen;
+ DIP("psadbw %s,%s\n", dis_buf,
+ nameXMMReg(gregOfRM(modrm)));
+ }
+ assign( s2V, getXMMReg(gregOfRM(modrm)) );
+ assign( s1Hi, unop(Iop_V128HIto64, mkexpr(s1V)) );
+ assign( s1Lo, unop(Iop_V128to64, mkexpr(s1V)) );
+ assign( s2Hi, unop(Iop_V128HIto64, mkexpr(s2V)) );
+ assign( s2Lo, unop(Iop_V128to64, mkexpr(s2V)) );
+ assign( dHi, mkIRExprCCall(
+ Ity_I64, 0/*regparms*/,
+ "x86g_calculate_mmx_psadbw",=20
+ &x86g_calculate_mmx_psadbw,
+ mkIRExprVec_2( mkexpr(s1Hi), mkexpr(s2Hi))
+ ));
+ assign( dLo, mkIRExprCCall(
+ Ity_I64, 0/*regparms*/,
+ "x86g_calculate_mmx_psadbw",=20
+ &x86g_calculate_mmx_psadbw,
+ mkIRExprVec_2( mkexpr(s1Lo), mkexpr(s2Lo))
+ ));
+ assign( dV, binop(Iop_64HLtoV128, mkexpr(dHi), mkexpr(dLo))) ;
+ putXMMReg(gregOfRM(modrm), mkexpr(dV));
+ goto decode_success;
+ }
+
/* 66 0F 70 =3D PSHUFD -- rearrange 4x32 from E(xmm or mem) to G(xmm)=
*/
if (sz =3D=3D 2 && insn[0] =3D=3D 0x0F && insn[1] =3D=3D 0x70) {
Int order;
|
|
From: Dirk M. <dm...@gm...> - 2005-10-04 08:39:22
|
On Wednesday 28 September 2005 10:16, Christophe GIAUME wrote: > In the "gcc accepts -msse" test of configure script, CFLAGS are saved > in safe_CFLAGS but are not restored after the test fixed in 3.0 and 3.1 trees of valgrind. there is no further 2.4.x release. Diri |
|
From: Tom H. <th...@cy...> - 2005-10-04 03:12:43
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-10-04 03:00:20 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 165 tests, 8 stderr failures, 1 stdout failure ================= memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/as_mmap (stderr) none/tests/as_shm (stdout) none/tests/as_shm (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) |
|
From: <js...@ac...> - 2005-10-04 02:58:50
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-10-04 03:30:00 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 188 tests, 2 stderr failures, 0 stdout failures ================= none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <to...@co...> - 2005-10-04 02:40:57
|
Nightly build on dunsmere ( athlon, Fedora Core 4 ) started at 2005-10-04 03:30:04 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 190 tests, 8 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 190 tests, 9 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/closeall (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Oct 4 03:35:28 2005 --- new.short Tue Oct 4 03:40:43 2005 *************** *** 8,10 **** ! == 190 tests, 9 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) --- 8,10 ---- ! == 190 tests, 8 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) *************** *** 15,17 **** memcheck/tests/xml1 (stderr) - none/tests/closeall (stderr) none/tests/faultstatus (stderr) --- 15,16 ---- |
|
From: Tom H. <th...@cy...> - 2005-10-04 02:28:32
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-10-04 03:15:04 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 189 tests, 16 stderr failures, 0 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/mempool (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 188 tests, 16 stderr failures, 1 stdout failure ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/mempool (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/x86/yield (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Oct 4 03:21:47 2005 --- new.short Tue Oct 4 03:28:26 2005 *************** *** 8,10 **** ! == 188 tests, 16 stderr failures, 1 stdout failure ================= memcheck/tests/addressable (stderr) --- 8,10 ---- ! == 189 tests, 16 stderr failures, 0 stdout failures ================= memcheck/tests/addressable (stderr) *************** *** 25,27 **** none/tests/x86/int (stderr) - none/tests/x86/yield (stdout) --- 25,26 ---- |
|
From: Tom H. <th...@cy...> - 2005-10-04 02:25:24
|
Nightly build on ginetta ( i686, Red Hat 8.0 ) started at 2005-10-04 03:10:12 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 189 tests, 4 stderr failures, 0 stdout failures ================= memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 188 tests, 4 stderr failures, 0 stdout failures ================= memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Oct 4 03:19:12 2005 --- new.short Tue Oct 4 03:25:11 2005 *************** *** 8,10 **** ! == 188 tests, 4 stderr failures, 0 stdout failures ================= memcheck/tests/mempool (stderr) --- 8,10 ---- ! == 189 tests, 4 stderr failures, 0 stdout failures ================= memcheck/tests/mempool (stderr) |