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
(5) |
2
(3) |
|
3
(2) |
4
(3) |
5
(16) |
6
(8) |
7
(6) |
8
(2) |
9
(4) |
|
10
(10) |
11
(22) |
12
(7) |
13
(10) |
14
(11) |
15
(8) |
16
(6) |
|
17
(11) |
18
|
19
(6) |
20
(8) |
21
(5) |
22
(11) |
23
(6) |
|
24
(1) |
25
(6) |
26
(4) |
27
(2) |
28
(1) |
29
|
30
(2) |
|
31
(5) |
|
|
|
|
|
|
|
From: <sv...@va...> - 2015-05-23 10:20:16
|
Author: rhyskidd
Date: Sat May 23 11:20:06 2015
New Revision: 15282
Log:
Add (presently) failing test case for bz#234814.
Added:
trunk/none/tests/bug234814.c
trunk/none/tests/bug234814.stderr.exp
trunk/none/tests/bug234814.stdout.exp
trunk/none/tests/bug234814.vgtest
Modified:
trunk/none/tests/ (props changed)
trunk/none/tests/Makefile.am
Modified: trunk/none/tests/Makefile.am
==============================================================================
--- trunk/none/tests/Makefile.am (original)
+++ trunk/none/tests/Makefile.am Sat May 23 11:20:06 2015
@@ -77,6 +77,7 @@
bigcode.vgtest bigcode.stderr.exp bigcode.stdout.exp \
bitfield1.stderr.exp bitfield1.vgtest \
bug129866.vgtest bug129866.stderr.exp bug129866.stdout.exp \
+ bug234814.vgtest bug234814.stderr.exp bug234814.stdout.exp \
closeall.stderr.exp closeall.vgtest \
cmdline0.stderr.exp cmdline0.stdout.exp cmdline0.vgtest \
cmdline1.stderr.exp cmdline1.stdout.exp cmdline1.vgtest \
@@ -182,7 +183,7 @@
ansi args \
async-sigs \
bitfield1 \
- bug129866 \
+ bug129866 bug234814 \
closeall coolo_strlen \
discard exec-sigmask execve faultstatus fcntl_setown \
fdleak_cmsg fdleak_creat fdleak_dup fdleak_dup2 \
Added: trunk/none/tests/bug234814.c
==============================================================================
--- trunk/none/tests/bug234814.c (added)
+++ trunk/none/tests/bug234814.c Sat May 23 11:20:06 2015
@@ -0,0 +1,30 @@
+/* Refer https://bugs.kde.org/show_bug.cgi?id=234814
+ */
+
+#include <stdio.h>
+#include <signal.h>
+#include <unistd.h>
+
+const char kSigbus[] = "I caught the SIGBUS signal!\n";
+
+int GLOB = 3;
+
+void mysigbus() {
+ write(2, kSigbus, sizeof(kSigbus));
+ GLOB--;
+ return;
+}
+
+int main() {
+ struct sigaction sa;
+ sa.sa_handler = mysigbus;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = 0;
+ if (sigaction(SIGBUS, &sa, NULL) == -1) {
+ perror("ERROR:");
+ }
+ while(GLOB) {
+ kill(getpid(), SIGBUS);
+ };
+ return 0;
+}
\ No newline at end of file
Added: trunk/none/tests/bug234814.stderr.exp
==============================================================================
--- trunk/none/tests/bug234814.stderr.exp (added)
+++ trunk/none/tests/bug234814.stderr.exp Sat May 23 11:20:06 2015
@@ -0,0 +1 @@
+
Added: trunk/none/tests/bug234814.stdout.exp
==============================================================================
--- trunk/none/tests/bug234814.stdout.exp (added)
+++ trunk/none/tests/bug234814.stdout.exp Sat May 23 11:20:06 2015
@@ -0,0 +1,3 @@
+I caught the SIGBUS signal!
+I caught the SIGBUS signal!
+I caught the SIGBUS signal!
Added: trunk/none/tests/bug234814.vgtest
==============================================================================
--- trunk/none/tests/bug234814.vgtest (added)
+++ trunk/none/tests/bug234814.vgtest Sat May 23 11:20:06 2015
@@ -0,0 +1 @@
+prog: bug234814
|
|
From: <sv...@va...> - 2015-05-23 04:19:07
|
Author: rhyskidd
Date: Sat May 23 05:18:57 2015
New Revision: 15281
Log:
Unguard none/tests/x86/cse_fail on OS X, as the test completes. n-i-bz.
Modified:
trunk/none/tests/x86/Makefile.am
Modified: trunk/none/tests/x86/Makefile.am
==============================================================================
--- trunk/none/tests/x86/Makefile.am (original)
+++ trunk/none/tests/x86/Makefile.am Sat May 23 05:18:57 2015
@@ -79,6 +79,7 @@
bug152818-x86 \
cmpxchg8b \
cpuid \
+ cse_fail \
fcmovnu \
fpu_lazy_eflags \
fxtract \
@@ -105,7 +106,7 @@
check_PROGRAMS += lzcnt32
endif
if !VGCONF_OS_IS_DARWIN
- check_PROGRAMS += cse_fail faultstatus
+ check_PROGRAMS += faultstatus
endif
if BUILD_MOVBE_TESTS
check_PROGRAMS += movbe
|
|
From: <sv...@va...> - 2015-05-22 16:16:27
|
Author: rhyskidd
Date: Fri May 22 17:16:19 2015
New Revision: 15280
Log:
Re-enable functioning none/tests/amd64/bug137714-amd64 on OS X
n-i-bz
Before:
== 588 tests, 221 stderr failures, 16 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==
After:
== 588 tests, 220 stderr failures, 15 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==
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 Fri May 22 17:16:19 2015
@@ -88,7 +88,7 @@
check_PROGRAMS = \
allexec \
amd64locked \
- bug127521-64 bug132813-amd64 bug132918 \
+ bug127521-64 bug132813-amd64 bug132918 bug137714-amd64 \
clc \
cmpxchg \
$(INSN_TESTS) \
@@ -144,7 +144,6 @@
# DDD: these need to be made to work on Darwin like the x86/ ones were.
if ! VGCONF_OS_IS_DARWIN
check_PROGRAMS += \
- bug137714-amd64 \
bug156404-amd64 \
faultstatus \
fcmovnu \
|
Author: rhyskidd
Date: Fri May 22 16:21:31 2015
New Revision: 15279
Log:
Properly guard none/tests/amd64/*.vgtest on OS X for tests not compiled
n-i-bz
Before:
== 595 tests, 228 stderr failures, 23 stdout failures, 0 stderrB failure, 0 stdoutB failure, 30 post failures ==
After:
== 595 tests, 221 stderr failures, 16 stdout failures, 0 stderrB failure, 0 stdoutB failure, 30 post failures ==
Modified:
trunk/none/tests/amd64/bug156404-amd64.vgtest
trunk/none/tests/amd64/fcmovnu.vgtest
trunk/none/tests/amd64/fxtract.vgtest
trunk/none/tests/amd64/jrcxz.vgtest
trunk/none/tests/amd64/looper.vgtest
trunk/none/tests/amd64/shrld.vgtest
trunk/none/tests/amd64/slahf-amd64.vgtest
Modified: trunk/none/tests/amd64/bug156404-amd64.vgtest
==============================================================================
--- trunk/none/tests/amd64/bug156404-amd64.vgtest (original)
+++ trunk/none/tests/amd64/bug156404-amd64.vgtest Fri May 22 16:21:31 2015
@@ -1 +1,2 @@
+prereq: test -e bug156404-amd64
prog: bug156404-amd64
Modified: trunk/none/tests/amd64/fcmovnu.vgtest
==============================================================================
--- trunk/none/tests/amd64/fcmovnu.vgtest (original)
+++ trunk/none/tests/amd64/fcmovnu.vgtest Fri May 22 16:21:31 2015
@@ -1 +1,2 @@
+prereq: test -e fcmovnu
prog: fcmovnu
Modified: trunk/none/tests/amd64/fxtract.vgtest
==============================================================================
--- trunk/none/tests/amd64/fxtract.vgtest (original)
+++ trunk/none/tests/amd64/fxtract.vgtest Fri May 22 16:21:31 2015
@@ -1 +1,2 @@
+prereq: test -e fxtract
prog: fxtract
Modified: trunk/none/tests/amd64/jrcxz.vgtest
==============================================================================
--- trunk/none/tests/amd64/jrcxz.vgtest (original)
+++ trunk/none/tests/amd64/jrcxz.vgtest Fri May 22 16:21:31 2015
@@ -1 +1,2 @@
+prereq: test -e jrcxz
prog: jrcxz
Modified: trunk/none/tests/amd64/looper.vgtest
==============================================================================
--- trunk/none/tests/amd64/looper.vgtest (original)
+++ trunk/none/tests/amd64/looper.vgtest Fri May 22 16:21:31 2015
@@ -1 +1,2 @@
+prereq: test -e looper
prog: looper
Modified: trunk/none/tests/amd64/shrld.vgtest
==============================================================================
--- trunk/none/tests/amd64/shrld.vgtest (original)
+++ trunk/none/tests/amd64/shrld.vgtest Fri May 22 16:21:31 2015
@@ -1 +1,2 @@
+prereq: test -e shrld
prog: shrld
Modified: trunk/none/tests/amd64/slahf-amd64.vgtest
==============================================================================
--- trunk/none/tests/amd64/slahf-amd64.vgtest (original)
+++ trunk/none/tests/amd64/slahf-amd64.vgtest Fri May 22 16:21:31 2015
@@ -1,2 +1,3 @@
+prereq: test -e slahf-amd64
prog: slahf-amd64
vgopts: -q
|
|
From: <sv...@va...> - 2015-05-22 15:14:12
|
Author: florian
Date: Fri May 22 16:14:04 2015
New Revision: 15278
Log:
Fix a comment. Do not enumerate segment kinds as all segments
have an extent ... including SkShmC segments.
Modified:
trunk/include/pub_tool_aspacemgr.h
Modified: trunk/include/pub_tool_aspacemgr.h
==============================================================================
--- trunk/include/pub_tool_aspacemgr.h (original)
+++ trunk/include/pub_tool_aspacemgr.h Fri May 22 16:14:04 2015
@@ -94,7 +94,7 @@
typedef
struct {
SegKind kind;
- /* Extent (SkFree, SkAnon{C,V}, SkFile{C,V}, SkResvn) */
+ /* Extent */
Addr start; // lowest address in range
Addr end; // highest address in range
/* Shrinkable? (SkResvn only) */
|
|
From: <sv...@va...> - 2015-05-22 14:57:14
|
Author: florian
Date: Fri May 22 15:57:07 2015
New Revision: 15277
Log:
Update a comment.
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c Fri May 22 15:57:07 2015
@@ -152,8 +152,8 @@
or the client (C).
SkAnonC: an anonymous mapping belonging to C. For these, aspacem
- tracks a boolean indicating whether or not is is part of the
- client's heap area (can't remember why).
+ tracks a field indicating what kind of segment this is, conceptually:
+ heap, extensible stack, break segment (aka data segment).
SkFileC: a file mapping belonging to C.
@@ -185,8 +185,8 @@
purposes the rest of the system wants. Currently they are used to
reserve the expansion space into which a growdown stack is
expanded, and into which the data segment is extended. Note,
- though, those uses are entirely external to this module, which only
- supplies the primitives.
+ though, that reservation segments are an implementation detail that
+ should not be visible outside the address space manager.
Reservations may be shrunk in order that an adjoining anonymous
mapping may be extended. This makes dataseg/stack expansion work.
|
|
From: <sv...@va...> - 2015-05-22 10:40:50
|
Author: sewardj
Date: Fri May 22 11:40:42 2015
New Revision: 15276
Log:
Fix bug 345126: Incorrect handling of VIDIOC_G_AUDIO and G_AUDOUT
Patch from Hans Verkuil (hve...@xs...)
Modified:
trunk/coregrind/m_syswrap/syswrap-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c Fri May 22 11:40:42 2015
@@ -7738,9 +7738,8 @@
}
case VKI_V4L2_G_AUDIO: {
struct vki_v4l2_audio *data = (struct vki_v4l2_audio *)ARG3;
- PRE_FIELD_READ("ioctl(VKI_V4L2_G_AUDIO).index", data->index);
- PRE_MEM_WRITE("ioctl(VKI_V4L2_G_AUDIO)", (Addr)data->name,
- sizeof(*data) - sizeof(data->index) - sizeof(data->reserved));
+ PRE_MEM_WRITE("ioctl(VKI_V4L2_G_AUDIO)", (Addr)data,
+ sizeof(*data) - sizeof(data->reserved));
PRE_FIELD_READ("ioctl(VKI_V4L2_G_AUDIO).reserved", data->reserved);
break;
}
@@ -7808,10 +7807,9 @@
}
case VKI_V4L2_G_AUDOUT: {
struct vki_v4l2_audioout *data = (struct vki_v4l2_audioout *)ARG3;
- PRE_FIELD_READ("ioctl(VKI_V4L2_G_AUDOUT).index", data->index);
+ PRE_MEM_WRITE("ioctl(VKI_V4L2_G_AUDOUT)", (Addr)data,
+ sizeof(*data) - sizeof(data->reserved));
PRE_FIELD_READ("ioctl(VKI_V4L2_G_AUDOUT).reserved", data->reserved);
- PRE_MEM_WRITE("ioctl(VKI_V4L2_G_AUDOUT)", (Addr)data->name,
- sizeof(*data) - sizeof(data->index) - sizeof(data->reserved));
break;
}
case VKI_V4L2_S_AUDOUT: {
@@ -9882,8 +9880,8 @@
}
case VKI_V4L2_G_AUDIO: {
struct vki_v4l2_audio *data = (struct vki_v4l2_audio *)ARG3;
- POST_MEM_WRITE((Addr)data->name,
- sizeof(*data) - sizeof(data->index) - sizeof(data->reserved));
+ POST_MEM_WRITE((Addr)data,
+ sizeof(*data) - sizeof(data->reserved));
break;
}
case VKI_V4L2_QUERYCTRL: {
@@ -9921,8 +9919,8 @@
}
case VKI_V4L2_G_AUDOUT: {
struct vki_v4l2_audioout *data = (struct vki_v4l2_audioout *)ARG3;
- POST_MEM_WRITE((Addr)data->name,
- sizeof(*data) - sizeof(data->index) - sizeof(data->reserved));
+ POST_MEM_WRITE((Addr)data,
+ sizeof(*data) - sizeof(data->reserved));
break;
}
case VKI_V4L2_G_MODULATOR: {
|
|
From: <sv...@va...> - 2015-05-22 10:34:34
|
Author: florian
Date: Fri May 22 11:34:27 2015
New Revision: 15275
Log:
Robustness: Output parameter should be initialised on all paths.
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c Fri May 22 11:34:27 2015
@@ -2639,11 +2639,12 @@
Bool d;
SysRes sres;
+ *need_discard = False;
+
if (!VG_IS_PAGE_ALIGNED(start))
goto eINVAL;
if (len == 0) {
- *need_discard = False;
return VG_(mk_SysRes_Success)( 0 );
}
@@ -3222,6 +3223,8 @@
SysRes sres;
NSegment seg;
+ *need_discard = False;
+
if (old_len == 0 || new_len == 0)
return False;
|
|
From: <sv...@va...> - 2015-05-22 10:29:37
|
Author: florian
Date: Fri May 22 11:29:29 2015
New Revision: 15274
Log:
iFactor out am_notify_munmap from VG_(am_notify_munmap) and use it in
VG_(am_relocate_nooverlap_client).
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c Fri May 22 11:29:29 2015
@@ -2141,24 +2141,12 @@
}
-/* Notifies aspacem that an munmap completed successfully. The
- segment array is updated accordingly. As with
- VG_(am_notify_mprotect), we merely record the given info, and don't
- check it for sensibleness. If the returned Bool is True, the
- caller should immediately discard translations from the specified
- address range. */
-
-Bool VG_(am_notify_munmap)( Addr start, SizeT len )
+static void am_notify_munmap( Addr start, SizeT len )
{
NSegment seg;
- Bool needDiscard;
aspacem_assert(VG_IS_PAGE_ALIGNED(start));
aspacem_assert(VG_IS_PAGE_ALIGNED(len));
-
- if (len == 0)
- return False;
-
- needDiscard = any_Ts_in_range( start, len );
+ aspacem_assert(len > 0);
init_nsegment( &seg );
seg.start = start;
@@ -2175,17 +2163,39 @@
aspacem_maxAddr < Addr_MAX)
seg.kind = SkResvn;
else
- /* Ditto for segments from below aspacem_minAddr. */
- if (seg.end < aspacem_minAddr && aspacem_minAddr > 0)
- seg.kind = SkResvn;
- else
- seg.kind = SkFree;
+ /* Ditto for segments from below aspacem_minAddr. */
+ if (seg.end < aspacem_minAddr && aspacem_minAddr >= Addr_MIN)
+ seg.kind = SkResvn;
+ else
+ seg.kind = SkFree;
add_segment( &seg );
/* Unmapping could create two adjacent free segments, so a preen is
needed. add_segment() will do that, so no need to here. */
AM_SANITY_CHECK;
+}
+
+/* Notifies aspacem that an munmap completed successfully. The
+ segment array is updated accordingly. As with
+ VG_(am_notify_mprotect), we merely record the given info, and don't
+ check it for sensibleness. If the returned Bool is True, the
+ caller should immediately discard translations from the specified
+ address range. */
+
+Bool VG_(am_notify_munmap)( Addr start, SizeT len )
+{
+ Bool needDiscard;
+ aspacem_assert(VG_IS_PAGE_ALIGNED(start));
+ aspacem_assert(VG_IS_PAGE_ALIGNED(len));
+
+ if (len == 0)
+ return False;
+
+ needDiscard = any_Ts_in_range( start, len );
+
+ am_notify_munmap( start, len );
+
return needDiscard;
}
@@ -2659,8 +2669,8 @@
if (sr_isError(sres))
return sres;
- VG_(am_notify_munmap)( start, len );
- AM_SANITY_CHECK;
+ am_notify_munmap( start, len );
+
*need_discard = d;
return sres;
@@ -3261,21 +3271,8 @@
add_segment( &seg );
/* Create a free hole in the old location. */
- init_nsegment( &seg );
- seg.start = old_addr;
- seg.end = old_addr + old_len - 1;
- /* See comments in VG_(am_notify_munmap) about this SkResvn vs
- SkFree thing. */
- if (old_addr > aspacem_maxAddr
- && /* check previous comparison is meaningful */
- aspacem_maxAddr < Addr_MAX)
- seg.kind = SkResvn;
- else
- seg.kind = SkFree;
+ am_notify_munmap( old_addr, old_len );
- add_segment( &seg );
-
- AM_SANITY_CHECK;
return True;
}
|
|
From: <sv...@va...> - 2015-05-22 09:40:14
|
Author: florian
Date: Fri May 22 10:40:02 2015
New Revision: 15273
Log:
Merge from trunk.
Added:
branches/ASPACEM_TWEAKS/memcheck/tests/darwin/ioctl-tiocsbrk.c
- copied unchanged from r15272, trunk/memcheck/tests/darwin/ioctl-tiocsbrk.c
branches/ASPACEM_TWEAKS/memcheck/tests/darwin/ioctl-tiocsbrk.stderr.exp
- copied unchanged from r15272, trunk/memcheck/tests/darwin/ioctl-tiocsbrk.stderr.exp
branches/ASPACEM_TWEAKS/memcheck/tests/darwin/ioctl-tiocsbrk.vgtest
- copied unchanged from r15272, trunk/memcheck/tests/darwin/ioctl-tiocsbrk.vgtest
branches/ASPACEM_TWEAKS/memcheck/tests/darwin/mkfifo.c
- copied unchanged from r15272, trunk/memcheck/tests/darwin/mkfifo.c
branches/ASPACEM_TWEAKS/memcheck/tests/darwin/mkfifo.stderr.exp
- copied unchanged from r15272, trunk/memcheck/tests/darwin/mkfifo.stderr.exp
branches/ASPACEM_TWEAKS/memcheck/tests/darwin/mkfifo.vgtest
- copied unchanged from r15272, trunk/memcheck/tests/darwin/mkfifo.vgtest
branches/ASPACEM_TWEAKS/none/tests/linux/mremap6.c
- copied unchanged from r15272, trunk/none/tests/linux/mremap6.c
branches/ASPACEM_TWEAKS/none/tests/linux/mremap6.stderr.exp
- copied unchanged from r15272, trunk/none/tests/linux/mremap6.stderr.exp
branches/ASPACEM_TWEAKS/none/tests/linux/mremap6.vgtest
- copied unchanged from r15272, trunk/none/tests/linux/mremap6.vgtest
branches/ASPACEM_TWEAKS/none/tests/procfs-non-linux.stderr.exp-with-readlinkat
- copied unchanged from r15272, trunk/none/tests/procfs-non-linux.stderr.exp-with-readlinkat
branches/ASPACEM_TWEAKS/none/tests/procfs-non-linux.stderr.exp-without-readlinkat
- copied unchanged from r15272, trunk/none/tests/procfs-non-linux.stderr.exp-without-readlinkat
Removed:
branches/ASPACEM_TWEAKS/none/tests/procfs-non-linux.stderr.exp
Modified:
branches/ASPACEM_TWEAKS/ (props changed)
branches/ASPACEM_TWEAKS/Makefile.all.am
branches/ASPACEM_TWEAKS/NEWS
branches/ASPACEM_TWEAKS/configure.ac
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_debuglog.c
branches/ASPACEM_TWEAKS/coregrind/m_deduppoolalloc.c
branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/m_gdbserver.c
branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/remote-utils.c
branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.c
branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.h
branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/target.c
branches/ASPACEM_TWEAKS/coregrind/m_hashtable.c
branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_mallocfree.c
branches/ASPACEM_TWEAKS/coregrind/m_poolalloc.c
branches/ASPACEM_TWEAKS/coregrind/m_signals.c
branches/ASPACEM_TWEAKS/coregrind/m_syscall.c
branches/ASPACEM_TWEAKS/coregrind/m_syswrap/priv_syswrap-darwin.h
branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syscall-amd64-linux.S
branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syscall-x86-linux.S
branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-darwin.c
branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h
branches/ASPACEM_TWEAKS/coregrind/pub_core_gdbserver.h
branches/ASPACEM_TWEAKS/darwin14.supp
branches/ASPACEM_TWEAKS/docs/internals/3_10_BUGSTATUS.txt
branches/ASPACEM_TWEAKS/drd/tests/tc22_exit_w_lock.stderr.exp-32bit
branches/ASPACEM_TWEAKS/drd/tests/tc22_exit_w_lock.stderr.exp-64bit
branches/ASPACEM_TWEAKS/drd/tests/tc22_exit_w_lock.vgtest
branches/ASPACEM_TWEAKS/gdbserver_tests/nlgone_abrt.stderr.exp
branches/ASPACEM_TWEAKS/gdbserver_tests/nlgone_abrt.vgtest
branches/ASPACEM_TWEAKS/helgrind/libhb_core.c
branches/ASPACEM_TWEAKS/helgrind/tests/tc22_exit_w_lock.stderr.exp
branches/ASPACEM_TWEAKS/include/pub_tool_hashtable.h
branches/ASPACEM_TWEAKS/include/pub_tool_poolalloc.h
branches/ASPACEM_TWEAKS/include/vki/vki-scnums-darwin.h
branches/ASPACEM_TWEAKS/memcheck/tests/darwin/ (props changed)
branches/ASPACEM_TWEAKS/memcheck/tests/darwin/Makefile.am
branches/ASPACEM_TWEAKS/memcheck/tests/darwin/scalar.c
branches/ASPACEM_TWEAKS/memcheck/tests/darwin/scalar.stderr.exp
branches/ASPACEM_TWEAKS/memcheck/tests/darwin/scalar_nocancel.c
branches/ASPACEM_TWEAKS/memcheck/tests/darwin/scalar_nocancel.stderr.exp
branches/ASPACEM_TWEAKS/memcheck/tests/vbit-test/vtest.h
branches/ASPACEM_TWEAKS/none/tests/Makefile.am
branches/ASPACEM_TWEAKS/none/tests/linux/ (props changed)
branches/ASPACEM_TWEAKS/none/tests/linux/Makefile.am
branches/ASPACEM_TWEAKS/none/tests/unit_debuglog.c
branches/ASPACEM_TWEAKS/none/tests/unit_debuglog.stderr.exp
branches/ASPACEM_TWEAKS/tests/check_ppc64le_cap (props changed)
Modified: branches/ASPACEM_TWEAKS/Makefile.all.am
==============================================================================
--- branches/ASPACEM_TWEAKS/Makefile.all.am (original)
+++ branches/ASPACEM_TWEAKS/Makefile.all.am Fri May 22 10:40:02 2015
@@ -110,6 +110,9 @@
@FLAG_W_WRITE_STRINGS@ \
@FLAG_W_FORMAT@ \
@FLAG_W_FORMAT_SECURITY@ \
+ @FLAG_W_IGNORED_QUALIFIERS@ \
+ @FLAG_W_MISSING_PARAMETER_TYPE@ \
+ @FLAG_W_OLD_STYLE_DECLARATION@ \
@FLAG_FNO_STACK_PROTECTOR@ \
@FLAG_FSANITIZE@ \
-fno-strict-aliasing \
Modified: branches/ASPACEM_TWEAKS/NEWS
==============================================================================
--- branches/ASPACEM_TWEAKS/NEWS (original)
+++ branches/ASPACEM_TWEAKS/NEWS Fri May 22 10:40:02 2015
@@ -23,6 +23,9 @@
* ==================== OTHER CHANGES ====================
+* When a process dies due to a signal, Valgrind now shows the signal
+ and the stacktrace at default verbosity (i.e. verbosity 1).
+
* Address description logic (used by memcheck and helgrind)
now describes addresses in anonymous segments, file mmap-ed
segments, shared memory segments and the brk data segment.
@@ -49,6 +52,13 @@
compiler version is 14.0 or later.
* New and modified GDB server monitor features:
+ - When a signal is reported in GDB, you can now use the GDB convenience
+ variable $_siginfo to examine detailed signal information.
+
+ - Valgrind gdbserver now allows the user to change the signal
+ to deliver to the process. So, use 'signal SIGNAL' to continue execution
+ with SIGNAL instead of the signal reported to GDB. Use 'signal 0' to
+ continue without passing the signal to the process.
- With recent GDB (>= 7.9.50.20150514-cvs), the command 'target remote'
will automatically load the executable file of the process running
@@ -74,13 +84,17 @@
197259 Unsupported arch_prtctl PR_SET_GS option
201152 ppc64: Assertion in ppc32g_dirtyhelper_MFSPR_268_269
201435 Fix Darwin: -v does not show kernel version
+208217 "Warning: noted but unhandled ioctl 0x2000747b" on Mac OS X
211256 Fixed an outdated comment regarding the default platform.
211926 Avoid compilation warnings in valgrind.h with -pedantic
+212291 Fix unhandled syscall: unix:132 (mkfifo) on OS X
+ == 263119
226609 Crediting upstream authors in man page
231257 Valgrind omits path when executing script from shebang line
254164 OS X task_info: UNKNOWN task message [id 3405, to mach_task_self(),
reply 0x........]
269360 s390x: Fix addressing mode selection for compare-and-swap
+319274 Fix unhandled syscall: unix:410 (sigsuspend_nocancel) on OS X
333051 mmap of huge pages fails due to incorrect alignment
== 339163
334802 valgrind does not always explain why a given option is bad
@@ -161,6 +175,7 @@
344621 Fix memcheck/tests/err_disable4 test on OS X
344686 Fix suppression for pthread_rwlock_init on OS X 10.10
344702 Fix missing libobjc suppressions on OS X 10.10
+344936 Fix unhandled syscall: unix:473 (readlinkat) on OS X 10.10
344939 Fix memcheck/tests/xml1 on OS X 10.10
345016 helgrind/tests/locked_vs_unlocked2 is failing sometimes
345079 Fix build problems in VEX/useful/test_main.c
Modified: branches/ASPACEM_TWEAKS/configure.ac
==============================================================================
--- branches/ASPACEM_TWEAKS/configure.ac (original)
+++ branches/ASPACEM_TWEAKS/configure.ac Fri May 22 10:40:02 2015
@@ -1760,7 +1760,9 @@
AC_GCC_WARNING_SUBST([format], [FLAG_W_FORMAT])
AC_GCC_WARNING_SUBST([format-security], [FLAG_W_FORMAT_SECURITY])
AC_GCC_WARNING_SUBST([cast-qual], [FLAG_W_CAST_QUAL])
-
+AC_GCC_WARNING_SUBST([old-style-declaration], [FLAG_W_OLD_STYLE_DECLARATION])
+AC_GCC_WARNING_SUBST([ignored-qualifiers], [FLAG_W_IGNORED_QUALIFIERS])
+AC_GCC_WARNING_SUBST([missing-parameter-type], [FLAG_W_MISSING_PARAMETER_TYPE])
# does this compiler support -Wextra or the older -W ?
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c Fri May 22 10:40:02 2015
@@ -2143,7 +2143,7 @@
/* Notifies aspacem that an munmap completed successfully. The
segment array is updated accordingly. As with
- VG_(am_notify_munmap), we merely record the given info, and don't
+ VG_(am_notify_mprotect), we merely record the given info, and don't
check it for sensibleness. If the returned Bool is True, the
caller should immediately discard translations from the specified
address range. */
@@ -3255,9 +3255,6 @@
/* Mark the new area based on the old seg. */
if (seg.kind == SkFileC) {
seg.offset += ((ULong)old_addr) - ((ULong)seg.start);
- } else {
- aspacem_assert(seg.kind == SkAnonC);
- aspacem_assert(seg.offset == 0);
}
seg.start = new_addr;
seg.end = new_addr + new_len - 1;
Modified: branches/ASPACEM_TWEAKS/coregrind/m_debuglog.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_debuglog.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_debuglog.c Fri May 22 10:40:02 2015
@@ -1006,10 +1006,17 @@
/* Silently limit the precision to 10 digits. */
if (precision > 10) precision = 10;
- /* If fracional part is not printed (precision == 0), may have to
- round up */
- if (precision == 0 && frac >= 0.5)
+ /* Determine fractional part, possibly round up */
+ ULong factor = 1;
+ for (cnt = 0; cnt < precision; ++cnt)
+ factor *= 10;
+ ULong frval = frac * factor;
+ if ((frac * factor - frval) > 0.5) // round up
+ frval += 1;
+ /* Check rounding. */
+ if (frval == factor)
ipval += 1;
+ frval %= factor;
/* Find out how many characters are needed to print the number */
@@ -1046,14 +1053,6 @@
send('.', send_arg2);
ret += 1;
- // Fractional part
- ULong factor = 1;
- for (cnt = 0; cnt < precision; ++cnt)
- factor *= 10;
- ULong frval = frac * factor;
- if ((frac * factor - frval) > 0.5) // round up
- frval += 1;
- frval %= factor;
ret += myvprintf_int64(send, send_arg2, VG_MSG_ZJUSTIFY, 10,
precision, False, frval);
}
Modified: branches/ASPACEM_TWEAKS/coregrind/m_deduppoolalloc.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_deduppoolalloc.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_deduppoolalloc.c Fri May 22 10:40:02 2015
@@ -177,16 +177,19 @@
}
}
+/* Compare function for 'gen' hash table. No need to compare the key
+ in this function, as the hash table already does it for us,
+ and that in any case, if the data is equal, the keys must also be
+ equal. */
static Word cmp_pool_elt (const void* node1, const void* node2 )
{
const ht_node* hnode1 = node1;
const ht_node* hnode2 = node2;
- if (hnode1->key < hnode2->key)
- return -1;
- else if (hnode1->key > hnode2->key)
- return 1;
- else if (hnode1->eltSzB == hnode2->eltSzB)
+ /* As this function is called by hashtable, that has already checked
+ for key equality, it is likely that it is the 'good' element.
+ So, we handle the equal case first. */
+ if (hnode1->eltSzB == hnode2->eltSzB)
return VG_(memcmp) (hnode1->elt, hnode2->elt, hnode1->eltSzB);
else if (hnode1->eltSzB < hnode2->eltSzB)
return -1;
Modified: branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/m_gdbserver.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/m_gdbserver.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/m_gdbserver.c Fri May 22 10:40:02 2015
@@ -934,16 +934,24 @@
return ret;
}
-
-void VG_(gdbserver_report_fatal_signal) (Int vki_sigNo, ThreadId tid)
+static void dlog_signal (const HChar *who, const vki_siginfo_t *info,
+ ThreadId tid)
{
- dlog(1, "VG core calling VG_(gdbserver_report_fatal_signal) "
+ dlog(1, "VG core calling %s "
"vki_nr %d %s gdb_nr %d %s tid %d\n",
- vki_sigNo, VG_(signame)(vki_sigNo),
- target_signal_from_host (vki_sigNo),
- target_signal_to_name(target_signal_from_host (vki_sigNo)),
+ who,
+ info->si_signo, VG_(signame)(info->si_signo),
+ target_signal_from_host (info->si_signo),
+ target_signal_to_name(target_signal_from_host (info->si_signo)),
tid);
+}
+
+void VG_(gdbserver_report_fatal_signal) (const vki_siginfo_t *info,
+ ThreadId tid)
+{
+ dlog_signal("VG_(gdbserver_report_fatal_signal)", info, tid);
+
if (remote_connected()) {
dlog(1, "already connected, assuming already reported\n");
return;
@@ -952,21 +960,16 @@
VG_(umsg)("(action on fatal signal) vgdb me ... \n");
/* indicate to gdbserver that there is a signal */
- gdbserver_signal_encountered (vki_sigNo);
+ gdbserver_signal_encountered (info);
/* let gdbserver do some work, e.g. show the signal to the user */
call_gdbserver (tid, signal_reason);
}
-Bool VG_(gdbserver_report_signal) (Int vki_sigNo, ThreadId tid)
+Bool VG_(gdbserver_report_signal) (vki_siginfo_t *info, ThreadId tid)
{
- dlog(1, "VG core calling VG_(gdbserver_report_signal) "
- "vki_nr %d %s gdb_nr %d %s tid %d\n",
- vki_sigNo, VG_(signame)(vki_sigNo),
- target_signal_from_host (vki_sigNo),
- target_signal_to_name(target_signal_from_host (vki_sigNo)),
- tid);
+ dlog_signal("VG_(gdbserver_report_signal)", info, tid);
/* if gdbserver is currently not connected, then signal
is to be given to the process */
@@ -977,19 +980,20 @@
/* if gdb has informed gdbserver that this signal can be
passed directly without informing gdb, then signal is
to be given to the process. */
- if (pass_signals[target_signal_from_host(vki_sigNo)]) {
+ if (pass_signals[target_signal_from_host(info->si_signo)]) {
dlog(1, "pass_signals => pass\n");
return True;
}
/* indicate to gdbserver that there is a signal */
- gdbserver_signal_encountered (vki_sigNo);
+ gdbserver_signal_encountered (info);
- /* let gdbserver do some work, e.g. show the signal to the user */
+ /* let gdbserver do some work, e.g. show the signal to the user.
+ User can also decide to ignore the signal or change the signal. */
call_gdbserver (tid, signal_reason);
/* ask gdbserver what is the final decision */
- if (gdbserver_deliver_signal (vki_sigNo)) {
+ if (gdbserver_deliver_signal (info)) {
dlog(1, "gdbserver deliver signal\n");
return True;
} else {
Modified: branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/remote-utils.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/remote-utils.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/remote-utils.c Fri May 22 10:40:02 2015
@@ -851,10 +851,27 @@
return -1;
}
- if (noack_mode)
- dlog(3, "putpkt (\"%s\"); [no ack]\n", buf2);
- else
- dlog(3,"putpkt (\"%s\"); [looking for ack]\n", buf2);
+ if (VG_(debugLog_getLevel)() >= 3) {
+ char *tracebuf = malloc(4 * (p - buf2) + 1); // worst case
+ char *tr = tracebuf;
+
+ for (UInt npr = 0; npr < p - buf2; npr++) {
+ UChar uc = (unsigned char)buf2[npr];
+ if (uc > 31 && uc < 127) {
+ *tr++ = uc;
+ } else {
+ *tr++ = '\\';
+ VG_(sprintf)(tr, "%03o", uc);
+ tr += 3;
+ }
+ }
+ *tr++ = 0;
+ dlog(3, "putpkt (\"%s\"); (%slen %d) %s\n", tracebuf,
+ strlen(tracebuf) == p - buf2 ? "binary " : "",
+ (int)(p - buf2),
+ noack_mode ? "[no ack]" : "[looking for ack]");
+ free (tracebuf);
+ }
if (noack_mode)
break;
Modified: branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.c Fri May 22 10:40:02 2015
@@ -857,8 +857,10 @@
}
VG_(lseek) (fd, ofs, VKI_SEEK_SET);
len_read = VG_(read) (fd, toread, len);
- *new_packet_len_p = write_qxfer_response (arg_own_buf, (unsigned char *)toread,
- len_read, ofs + len_read < doc_len);
+ *new_packet_len_p = write_qxfer_response (arg_own_buf,
+ (unsigned char *)toread,
+ len_read,
+ ofs + len_read < doc_len);
VG_(close) (fd);
return;
}
@@ -878,8 +880,8 @@
return;
}
- if (len > PBUFSIZ - 2)
- len = PBUFSIZ - 2;
+ if (len > PBUFSIZ - POVERHSIZ)
+ len = PBUFSIZ - POVERHSIZ;
data = malloc (len);
{
@@ -925,12 +927,13 @@
unsigned long pid;
const HChar *name;
- /* Reject any annex; grab the offset and length. */
+ /* grab the annex, offset and length. */
if (decode_xfer_read (arg_own_buf + 21, &annex, &ofs, &len) < 0) {
strcpy (arg_own_buf, "E00");
return;
}
+ /* Reject any annex with invalid/unexpected pid */
if (strlen(annex) > 0)
pid = strtoul (annex, NULL, 16);
else
@@ -974,6 +977,44 @@
return;
}
+ if (strncmp ("qXfer:siginfo:read:", arg_own_buf, 19) == 0) {
+ vki_siginfo_t info;
+ int n;
+ CORE_ADDR ofs;
+ unsigned int len;
+ const char *annex;
+
+ /* Reject any annex; grab the offset and length. */
+ if (decode_xfer_read (arg_own_buf + 19, &annex, &ofs, &len) < 0
+ || annex[0] != '\0') {
+ strcpy (arg_own_buf, "E00");
+ return;
+ }
+
+ if (len > PBUFSIZ - POVERHSIZ)
+ len = PBUFSIZ - POVERHSIZ;
+
+ gdbserver_pending_signal_to_report(&info);
+
+ if (ofs >= sizeof(info))
+ n = -1;
+ else
+ n = sizeof(info) - ofs;
+
+ if (n < 0)
+ write_enn (arg_own_buf);
+ else if (n > len)
+ *new_packet_len_p = write_qxfer_response (arg_own_buf,
+ (unsigned char *)&info,
+ len, 1);
+ else
+ *new_packet_len_p = write_qxfer_response (arg_own_buf,
+ (unsigned char *)&info,
+ n, 0);
+
+ return;
+ }
+
/* Protocol features query. */
if (strncmp ("qSupported", arg_own_buf, 10) == 0
&& (arg_own_buf[10] == ':' || arg_own_buf[10] == '\0')) {
@@ -1000,6 +1041,7 @@
initialize_shadow_low(False);
}
strcat (arg_own_buf, ";qXfer:exec-file:read+");
+ strcat (arg_own_buf, ";qXfer:siginfo:read+");
return;
}
@@ -1097,7 +1139,7 @@
putpkt (own_buf);
}
- /* If we our status is terminal (exit or fatal signal) get out
+ /* If our status is terminal (exit or fatal signal) get out
as quickly as we can. We won't be able to handle any request
anymore. */
if (status == 'W' || status == 'X') {
Modified: branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.h
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.h (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.h Fri May 22 10:40:02 2015
@@ -206,11 +206,17 @@
A call to call_gdbserver is needed to send the resume reply to GDB.
After this call, gdbserver_deliver_signal indicates if the signal
is effectively to be delivered to the guest process. */
-extern void gdbserver_signal_encountered (Int vki_sigNo);
-/* between these two calls, call call_gdbserver */
+extern void gdbserver_signal_encountered (const vki_siginfo_t *info);
+/* between these two calls, call call_gdbserver.
+ Between these 2 calls the signal to report to GDB can be retrieved using
+ gdbserver_pending_signal_to_report. */
/* If gdbserver_deliver_signal True, then gdb did not ask
to ignore the signal, so signal can be delivered to the guest. */
-extern Bool gdbserver_deliver_signal (Int vki_sigNo);
+extern Bool gdbserver_deliver_signal (vki_siginfo_t *info);
+
+/* Signal info last provided with gdbserver_signal_encountered.
+ It is what is/will be reported to GDB. */
+extern void gdbserver_pending_signal_to_report (vki_siginfo_t /* OUT */ *info);
/* Called when a process is about to go with reason ('W' or 'X') and code.
This sets global variables that will be used to return the process
Modified: branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/target.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/target.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/target.c Fri May 22 10:40:02 2015
@@ -153,17 +153,28 @@
*/
static CORE_ADDR resume_pc;
-static int vki_signal_to_report;
+static vki_siginfo_t vki_signal_to_report;
+static vki_siginfo_t vki_signal_to_deliver;
-void gdbserver_signal_encountered (Int vki_sigNo)
+void gdbserver_signal_encountered (const vki_siginfo_t *info)
{
- vki_signal_to_report = vki_sigNo;
+ vki_signal_to_report = *info;
+ vki_signal_to_deliver = *info;
}
-static int vki_signal_to_deliver;
-Bool gdbserver_deliver_signal (Int vki_sigNo)
+void gdbserver_pending_signal_to_report (vki_siginfo_t *info)
{
- return vki_sigNo == vki_signal_to_deliver;
+ *info = vki_signal_to_report;
+}
+
+Bool gdbserver_deliver_signal (vki_siginfo_t *info)
+{
+ if (info->si_signo != vki_signal_to_deliver.si_signo)
+ dlog(1, "GDB changed signal info %d to_report %d to_deliver %d\n",
+ info->si_signo, vki_signal_to_report.si_signo,
+ vki_signal_to_deliver.si_signo);
+ *info = vki_signal_to_deliver;
+ return vki_signal_to_deliver.si_signo != 0;
}
static unsigned char exit_status_to_report;
@@ -238,7 +249,10 @@
C2v(stopped_data_address));
VG_(set_watchpoint_stop_address) ((Addr) 0);
}
- vki_signal_to_deliver = resume_info->sig;
+ vki_signal_to_deliver.si_signo = resume_info->sig;
+ /* signal was reported to GDB, GDB told us to resume execution.
+ So, reset the signal to report to 0. */
+ VG_(memset) (&vki_signal_to_report, 0, sizeof(vki_signal_to_report));
stepping = resume_info->step;
resume_pc = (*the_low_target.get_pc) ();
@@ -288,12 +302,10 @@
and with a signal TRAP (i.e. a breakpoint), unless there is
a signal to report. */
*ourstatus = 'T';
- if (vki_signal_to_report == 0)
+ if (vki_signal_to_report.si_signo == 0)
sig = TARGET_SIGNAL_TRAP;
- else {
- sig = target_signal_from_host(vki_signal_to_report);
- vki_signal_to_report = 0;
- }
+ else
+ sig = target_signal_from_host(vki_signal_to_report.si_signo);
if (vgdb_interrupted_tid != 0)
tst = VG_(get_ThreadState) (vgdb_interrupted_tid);
Modified: branches/ASPACEM_TWEAKS/coregrind/m_hashtable.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_hashtable.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_hashtable.c Fri May 22 10:40:02 2015
@@ -179,7 +179,7 @@
VgHashNode* curr = table->chains[ CHAIN_NO(hnode->key, table) ]; // GEN!!!
while (curr) {
- if (cmp (hnode, curr) == 0) { // GEN!!!
+ if (hnode->key == curr->key && cmp (hnode, curr) == 0) { // GEN!!!
return curr;
}
curr = curr->next;
@@ -222,7 +222,7 @@
table->iterOK = False;
while (curr) {
- if (cmp(hnode, curr) == 0) { // GEN!!!
+ if (hnode->key == curr->key && cmp(hnode, curr) == 0) { // GEN!!!
*prev_next_ptr = curr->next;
table->n_elements--;
return curr;
@@ -278,22 +278,18 @@
nelt = 0;
// Is the same cnode element existing before cnode ?
for (node = table->chains[i]; node != cnode; node = node->next) {
- if (cmp) {
- if ((*cmp)(node, cnode) == 0)
- nelt++;
- } else
- if (node->key == cnode->key)
- nelt++;
+ if (node->key == cnode->key
+ && (cmp == NULL || cmp (node, cnode) == 0)) {
+ nelt++;
+ }
}
// If cnode element not in a previous node, count occurences of elt.
if (nelt == 0) {
for (node = cnode; node != NULL; node = node->next) {
- if (cmp) {
- if ((*cmp)(node, cnode) == 0)
- nelt++;
- } else
- if (node->key == cnode->key)
- nelt++;
+ if (node->key == cnode->key
+ && (cmp == NULL || cmp (node, cnode) == 0)) {
+ nelt++;
+ }
}
INCOCCUR(elt_occurences, nelt);
}
Modified: branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-linux.c Fri May 22 10:40:02 2015
@@ -680,10 +680,12 @@
# endif
break;
# if defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
- case AT_HWCAP2:
- /* The HWCAP2 value has the entry arch_2_07 which indicates the
- * processor is a Power 8 or beyond. The Valgrind vai.hwcaps
- * value (coregrind/m_machine.c) has the VEX_HWCAPS_PPC64_ISA2_07
+ case AT_HWCAP2: {
+ Bool auxv_2_07, hw_caps_2_07;
+ /* The HWCAP2 field may contain an arch_2_07 entry that indicates
+ * if the processor is compliant with the 2.07 ISA. (i.e. Power 8
+ * or beyond). The Valgrind vai.hwcaps value
+ * (coregrind/m_machine.c) has the VEX_HWCAPS_PPC64_ISA2_07
* flag set so Valgrind knows about Power8. Need to pass the
* HWCAP2 value along so the user level programs can detect that
* the processor supports ISA 2.07 and beyond.
@@ -704,13 +706,15 @@
PPC_FEATURE2_HAS_TAR 0x04000000
PPC_FEATURE2_HAS_VCRYPTO 0x02000000
*/
-
- if ((auxv->u.a_val & ~(0x80000000ULL)) != 0) {
- /* Verify if PPC_FEATURE2_ARCH_2_07 is set in HWCAP2
- * that arch_2_07 is also set in VEX HWCAPS
- */
- vg_assert((vex_archinfo->hwcaps & VEX_HWCAPS_PPC64_ISA2_07) == VEX_HWCAPS_PPC64_ISA2_07);
- }
+ auxv_2_07 = (auxv->u.a_val & 0x80000000ULL) == 0x80000000ULL;
+ hw_caps_2_07 = (vex_archinfo->hwcaps & VEX_HWCAPS_PPC64_ISA2_07)
+ == VEX_HWCAPS_PPC64_ISA2_07;
+
+ /* Verify the PPC_FEATURE2_ARCH_2_07 setting in HWCAP2
+ * matches the setting in VEX HWCAPS.
+ */
+ vg_assert(auxv_2_07 == hw_caps_2_07);
+ }
break;
# endif
Modified: branches/ASPACEM_TWEAKS/coregrind/m_mallocfree.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_mallocfree.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_mallocfree.c Fri May 22 10:40:02 2015
@@ -1404,9 +1404,9 @@
sanity_check_malloc_arena(aid);
VG_(printf)(
- "-------- Arena \"%s\": %lu/%lu max/curr mmap'd, "
+ "-------- Arena \"%s\": %'lu/%'lu max/curr mmap'd, "
"%llu/%llu unsplit/split sb unmmap'd, "
- "%lu/%lu max/curr on_loan %lu rzB --------\n",
+ "%'lu/%'lu max/curr on_loan %lu rzB --------\n",
a->name, a->stats__bytes_mmaped_max, a->stats__bytes_mmaped,
a->stats__nreclaim_unsplit, a->stats__nreclaim_split,
a->stats__bytes_on_loan_max, a->stats__bytes_on_loan,
Modified: branches/ASPACEM_TWEAKS/coregrind/m_poolalloc.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_poolalloc.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_poolalloc.c Fri May 22 10:40:02 2015
@@ -110,6 +110,12 @@
VG_(addToXA)( pa->pools, &pool );
}
+UWord VG_(sizePA) ( PoolAlloc* pa)
+{
+ vg_assert(pa);
+ return pa->nPerPool * VG_(sizeXA) (pa->pools);
+}
+
void* VG_(allocEltPA) ( PoolAlloc* pa)
{
UWord* elem;
Modified: branches/ASPACEM_TWEAKS/coregrind/m_signals.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_signals.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_signals.c Fri May 22 10:40:02 2015
@@ -694,12 +694,15 @@
/* returns True if signal is to be ignored.
To check this, possibly call gdbserver with tid. */
-static Bool is_sig_ign(Int sigNo, ThreadId tid)
+static Bool is_sig_ign(vki_siginfo_t *info, ThreadId tid)
{
- vg_assert(sigNo >= 1 && sigNo <= _VKI_NSIG);
+ vg_assert(info->si_signo >= 1 && info->si_signo <= _VKI_NSIG);
- return scss.scss_per_sig[sigNo].scss_handler == VKI_SIG_IGN
- || !VG_(gdbserver_report_signal) (sigNo, tid);
+ /* If VG_(gdbserver_report_signal) tells to report the signal,
+ then verify if this signal is not to be ignored. GDB might have
+ modified si_signo, so we check after the call to gdbserver. */
+ return !VG_(gdbserver_report_signal) (info, tid)
+ || scss.scss_per_sig[info->si_signo].scss_handler == VKI_SIG_IGN;
}
/* ---------------------------------------------------------------------
@@ -1636,7 +1639,7 @@
core = False;
}
- if ( (VG_(clo_verbosity) > 1 ||
+ if ( (VG_(clo_verbosity) >= 1 ||
(could_core && is_signal_from_kernel(tid, sigNo, info->si_code))
) &&
!VG_(clo_xml) ) {
@@ -1786,7 +1789,7 @@
&& VG_(dyn_vgdb_error) <= VG_(get_n_errs_shown)() + 1) {
/* Note: we add + 1 to n_errs_shown as the fatal signal was not
reported through error msg, and so was not counted. */
- VG_(gdbserver_report_fatal_signal) (sigNo, tid);
+ VG_(gdbserver_report_fatal_signal) (info, tid);
}
if (VG_(is_action_requested)( "Attach to debugger", & VG_(clo_db_attach) )) {
@@ -1794,7 +1797,7 @@
}
if (core) {
- const static struct vki_rlimit zero = { 0, 0 };
+ static const struct vki_rlimit zero = { 0, 0 };
VG_(make_coredump)(tid, info, corelim.rlim_cur);
@@ -1922,7 +1925,7 @@
/* Even if gdbserver indicates to ignore the signal, we must deliver it.
So ignore the return value of VG_(gdbserver_report_signal). */
- (void) VG_(gdbserver_report_signal) (VKI_SIGSEGV, tid);
+ (void) VG_(gdbserver_report_signal) (&info, tid);
/* If they're trying to block the signal, force it to be delivered */
if (VG_(sigismember)(&VG_(threads)[tid].sig_mask, VKI_SIGSEGV))
@@ -1962,7 +1965,7 @@
info.si_code = VKI_ILL_ILLOPC; /* jrs: no idea what this should be */
info.VKI_SIGINFO_si_addr = (void*)addr;
- if (VG_(gdbserver_report_signal) (VKI_SIGILL, tid)) {
+ if (VG_(gdbserver_report_signal) (&info, tid)) {
resume_scheduler(tid);
deliver_signal(tid, &info, NULL);
}
@@ -1987,7 +1990,7 @@
in .si_addr. Oh well. */
/* info.VKI_SIGINFO_si_addr = (void*)addr; */
- if (VG_(gdbserver_report_signal) (VKI_SIGBUS, tid)) {
+ if (VG_(gdbserver_report_signal) (&info, tid)) {
resume_scheduler(tid);
deliver_signal(tid, &info, NULL);
}
@@ -2027,7 +2030,7 @@
# endif
/* fixs390: do we need to do anything here for s390 ? */
- if (VG_(gdbserver_report_signal) (VKI_SIGTRAP, tid)) {
+ if (VG_(gdbserver_report_signal) (&info, tid)) {
resume_scheduler(tid);
deliver_signal(tid, &info, &uc);
}
@@ -2236,7 +2239,7 @@
/* (2) */
/* Set up the thread's state to deliver a signal */
- if (!is_sig_ign(info->si_signo, tid))
+ if (!is_sig_ign(info, tid))
deliver_signal(tid, info, uc);
/* It's crucial that (1) and (2) happen in the order (1) then (2)
@@ -2482,7 +2485,7 @@
}
if (VG_(in_generated_code)) {
- if (VG_(gdbserver_report_signal) (sigNo, tid)
+ if (VG_(gdbserver_report_signal) (info, tid)
|| VG_(sigismember)(&tst->sig_mask, sigNo)) {
/* Can't continue; must longjmp back to the scheduler and thus
enter the sighandler immediately. */
@@ -2688,7 +2691,7 @@
/* OK, something to do; deliver it */
if (VG_(clo_trace_signals))
VG_(dmsg)("Polling found signal %d for tid %d\n", sip->si_signo, tid);
- if (!is_sig_ign(sip->si_signo, tid))
+ if (!is_sig_ign(sip, tid))
deliver_signal(tid, sip, NULL);
else if (VG_(clo_trace_signals))
VG_(dmsg)(" signal %d ignored\n", sip->si_signo);
Modified: branches/ASPACEM_TWEAKS/coregrind/m_syscall.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_syscall.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_syscall.c Fri May 22 10:40:02 2015
@@ -308,12 +308,16 @@
" .cfi_startproc\n"
" push %esi\n"
" .cfi_adjust_cfa_offset 4\n"
+" .cfi_offset %esi, -8\n"
" push %edi\n"
" .cfi_adjust_cfa_offset 4\n"
+" .cfi_offset %edi, -12\n"
" push %ebx\n"
" .cfi_adjust_cfa_offset 4\n"
+" .cfi_offset %ebx, -16\n"
" push %ebp\n"
" .cfi_adjust_cfa_offset 4\n"
+" .cfi_offset %ebp, -20\n"
" movl 16+ 4(%esp),%eax\n"
" movl 16+ 8(%esp),%ebx\n"
" movl 16+12(%esp),%ecx\n"
@@ -324,12 +328,16 @@
" int $0x80\n"
" popl %ebp\n"
" .cfi_adjust_cfa_offset -4\n"
+" .cfi_restore %ebp\n"
" popl %ebx\n"
" .cfi_adjust_cfa_offset -4\n"
+" .cfi_restore %ebx\n"
" popl %edi\n"
" .cfi_adjust_cfa_offset -4\n"
+" .cfi_restore %edi\n"
" popl %esi\n"
" .cfi_adjust_cfa_offset -4\n"
+" .cfi_restore %esi\n"
" ret\n"
" .cfi_endproc\n"
".previous\n"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_syswrap/priv_syswrap-darwin.h
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_syswrap/priv_syswrap-darwin.h (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_syswrap/priv_syswrap-darwin.h Fri May 22 10:40:02 2015
@@ -189,7 +189,7 @@
// old truncate
// old ftruncate
// GEN flock 131
-// NYI mkfifo 132
+DECL_TEMPLATE(darwin, mkfifo); // 132
DECL_TEMPLATE(darwin, sendto); // 133
DECL_TEMPLATE(darwin, shutdown); // 134
DECL_TEMPLATE(darwin, socketpair); // 135
@@ -547,7 +547,7 @@
// NYI fstatat64 // 470
// NYI linkat // 471
// NYI unlinkat // 472
-// NYI readlinkat // 473
+DECL_TEMPLATE(darwin, readlinkat); // 473
// NYI symlinkat // 474
// NYI mkdirat // 475
// NYI getattrlistat // 476
Modified: branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syscall-amd64-linux.S
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syscall-amd64-linux.S (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syscall-amd64-linux.S Fri May 22 10:40:02 2015
@@ -77,29 +77,52 @@
.globl ML_(do_syscall_for_client_WRK)
ML_(do_syscall_for_client_WRK):
+ .cfi_startproc
/* save callee-saved regs */
pushq %rbx
+ .cfi_adjust_cfa_offset 8
+ .cfi_offset %rbx, -16
pushq %rbp
+ .cfi_adjust_cfa_offset 8
+ .cfi_offset %rbp, -24
pushq %r12
+ .cfi_adjust_cfa_offset 8
+ .cfi_offset %r12, -32
pushq %r13
+ .cfi_adjust_cfa_offset 8
+ .cfi_offset %r13, -40
pushq %r14
+ .cfi_adjust_cfa_offset 8
+ .cfi_offset %r14, -48
pushq %r15
+ .cfi_adjust_cfa_offset 8
+ .cfi_offset %r15, -56
#define FSZ ((4+1)*4) /* 4 args + ret addr */
-#define PUSH_di_si_dx_cx_8 \
- pushq %rdi ; \
- pushq %rsi ; \
- pushq %rdx ; \
- pushq %rcx ; \
- pushq %r8
-
-#define POP_di_si_dx_cx_8 \
- popq %r8 ; \
- popq %rcx ; \
- popq %rdx ; \
- popq %rsi ; \
- popq %rdi
+#define PUSH_di_si_dx_cx_8 \
+ pushq %rdi ; \
+ .cfi_adjust_cfa_offset 8 ; \
+ pushq %rsi ; \
+ .cfi_adjust_cfa_offset 8 ; \
+ pushq %rdx ; \
+ .cfi_adjust_cfa_offset 8 ; \
+ pushq %rcx ; \
+ .cfi_adjust_cfa_offset 8 ; \
+ pushq %r8 ; \
+ .cfi_adjust_cfa_offset 8
+
+#define POP_di_si_dx_cx_8 \
+ popq %r8 ; \
+ .cfi_adjust_cfa_offset -8 ; \
+ popq %rcx ; \
+ .cfi_adjust_cfa_offset -8 ; \
+ popq %rdx ; \
+ .cfi_adjust_cfa_offset -8 ; \
+ popq %rsi ; \
+ .cfi_adjust_cfa_offset -8 ; \
+ popq %rdi ; \
+ .cfi_adjust_cfa_offset -8
1: /* Even though we can't take a signal until the sigprocmask completes,
start the range early.
@@ -129,6 +152,7 @@
movq %rsi, %rax /* rax --> VexGuestAMD64State * */
pushq %rdi /* syscallno -> stack */
+ .cfi_adjust_cfa_offset 8
movq OFFSET_amd64_RDI(%rax), %rdi
movq OFFSET_amd64_RSI(%rax), %rsi
movq OFFSET_amd64_RDX(%rax), %rdx
@@ -136,6 +160,7 @@
movq OFFSET_amd64_R8(%rax), %r8
movq OFFSET_amd64_R9(%rax), %r9
popq %rax /* syscallno -> %rax */
+ .cfi_adjust_cfa_offset -8
/* If rip==2, then the syscall was either just about
to start, or was interrupted and the kernel was
@@ -168,24 +193,38 @@
5: /* now safe from signals */
movq $0, %rax /* SUCCESS */
popq %r15
+ .cfi_adjust_cfa_offset -8
popq %r14
+ .cfi_adjust_cfa_offset -8
popq %r13
+ .cfi_adjust_cfa_offset -8
popq %r12
+ .cfi_adjust_cfa_offset -8
popq %rbp
+ .cfi_adjust_cfa_offset -8
popq %rbx
+ .cfi_adjust_cfa_offset -8
ret
+ .cfi_adjust_cfa_offset 6*8
7: /* failure: return 0x8000 | error code */
negq %rax
andq $0x7FFF, %rax
orq $0x8000, %rax
popq %r15
+ .cfi_adjust_cfa_offset -8
popq %r14
+ .cfi_adjust_cfa_offset -8
popq %r13
+ .cfi_adjust_cfa_offset -8
popq %r12
+ .cfi_adjust_cfa_offset -8
popq %rbp
+ .cfi_adjust_cfa_offset -8
popq %rbx
+ .cfi_adjust_cfa_offset -8
ret
+ .cfi_endproc
#undef FSZ
.section .rodata
Modified: branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syscall-x86-linux.S
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syscall-x86-linux.S (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syscall-x86-linux.S Fri May 22 10:40:02 2015
@@ -78,11 +78,20 @@
.globl ML_(do_syscall_for_client_WRK)
ML_(do_syscall_for_client_WRK):
+ .cfi_startproc
/* save callee-saved regs */
push %esi
+ .cfi_adjust_cfa_offset 4
+ .cfi_offset %esi, -8
push %edi
+ .cfi_adjust_cfa_offset 4
+ .cfi_offset %esi, -12
push %ebx
+ .cfi_adjust_cfa_offset 4
+ .cfi_offset %esi, -16
push %ebp
+ .cfi_adjust_cfa_offset 4
+ .cfi_offset %esi, -20
#define FSZ ((4+1)*4) /* 4 args + ret addr */
1: /* Even though we can't take a signal until the sigprocmask completes,
@@ -131,20 +140,30 @@
5: /* now safe from signals */
movl $0, %eax /* SUCCESS */
popl %ebp
+ .cfi_adjust_cfa_offset -4
popl %ebx
+ .cfi_adjust_cfa_offset -4
popl %edi
+ .cfi_adjust_cfa_offset -4
popl %esi
+ .cfi_adjust_cfa_offset -4
ret
+ .cfi_adjust_cfa_offset 4*4
7: /* failure: return 0x8000 | error code */
negl %eax
andl $0x7FFF, %eax
orl $0x8000, %eax
popl %ebp
+ .cfi_adjust_cfa_offset -4
popl %ebx
+ .cfi_adjust_cfa_offset -4
popl %edi
+ .cfi_adjust_cfa_offset -4
popl %esi
+ .cfi_adjust_cfa_offset -4
ret
+ .cfi_endproc
#undef FSZ
Modified: branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-darwin.c Fri May 22 10:40:02 2015
@@ -1101,6 +1101,8 @@
switch (ARG2 /* request */) {
case VKI_TIOCSCTTY:
case VKI_TIOCEXCL:
+ case VKI_TIOCSBRK:
+ case VKI_TIOCCBRK:
case VKI_TIOCPTYGRANT:
case VKI_TIOCPTYUNLK:
case VKI_DTRACEHIOC_REMOVE:
@@ -1409,6 +1411,8 @@
case VKI_TIOCPTYGNAME:
POST_MEM_WRITE( ARG3, 128);
break;
+ case VKI_TIOCSBRK: /* set break bit */
+ case VKI_TIOCCBRK: /* clear break bit */
case VKI_TIOCPTYGRANT:
case VKI_TIOCPTYUNLK:
break;
@@ -3590,6 +3594,25 @@
SET_STATUS_from_SysRes(r);
}
+PRE(mkfifo)
+{
+ *flags |= SfMayBlock;
+ PRINT("mkfifo ( %#lx(%s), %ld )",ARG1,(char *)ARG1,(vki_mode_t)ARG2);
+ PRE_REG_READ2(long, "mkfifo", const char *, path, vki_mode_t, mode);
+ PRE_MEM_RASCIIZ( "mkfifo(path)", ARG1 );
+}
+
+POST(mkfifo)
+{
+ vg_assert(SUCCESS);
+ if (!ML_(fd_allowed)(RES, "mkfifo", tid, True)) {
+ VG_(close)(RES);
+ SET_STATUS_Failure( VKI_EMFILE );
+ } else {
+ if (VG_(clo_track_fds))
+ ML_(record_fd_open_with_given_name)(tid, RES, (Char*)ARG1);
+ }
+}
PRE(sendto)
{
@@ -9285,6 +9308,28 @@
POST_MEM_WRITE(ARG3, ARG4);
}
+PRE(readlinkat)
+{
+ Word saved = SYSNO;
+
+ PRINT("readlinkat ( %ld, %#lx(%s), %#lx, %llu )", ARG1,ARG2,(char*)ARG2,ARG3,(ULong)ARG4);
+ PRE_REG_READ4(long, "readlinkat",
+ int, dfd, const char *, path, char *, buf, int, bufsiz);
+ PRE_MEM_RASCIIZ( "readlinkat(path)", ARG2 );
+ PRE_MEM_WRITE( "readlinkat(buf)", ARG3,ARG4 );
+
+ /*
+ * Refer to coregrind/m_syswrap/syswrap-linux.c
+ */
+ {
+ /* Normal case */
+ SET_STATUS_from_SysRes( VG_(do_syscall4)(saved, ARG1, ARG2, ARG3, ARG4));
+ }
+
+ if (SUCCESS && RES > 0)
+ POST_MEM_WRITE( ARG3, RES );
+}
+
PRE(bsdthread_ctl)
{
// int bsdthread_ctl(user_addr_t cmd, user_addr_t arg1,
@@ -9391,7 +9436,11 @@
GENXY(__NR_dup, sys_dup),
MACXY(__NR_pipe, pipe),
GENX_(__NR_getegid, sys_getegid),
-// _____(__NR_profil),
+#if DARWIN_VERS >= DARWIN_10_7
+ _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(44)), // old profil
+#else
+// _____(__NR_profil),
+#endif
_____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(45)), // old ktrace
MACXY(__NR_sigaction, sigaction),
GENX_(__NR_getgid, sys_getgid),
@@ -9479,7 +9528,7 @@
_____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(129)), // old truncate
_____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(130)), // old ftruncate
GENX_(__NR_flock, sys_flock),
-// _____(__NR_mkfifo),
+ MACXY(__NR_mkfifo, mkfifo),
MACX_(__NR_sendto, sendto),
MACX_(__NR_shutdown, shutdown),
MACXY(__NR_socketpair, socketpair),
@@ -9801,7 +9850,7 @@
GENX_(__NR_select_nocancel, sys_select),
GENX_(__NR_fsync_nocancel, sys_fsync),
MACX_(__NR_connect_nocancel, connect),
-// _____(__NR_sigsuspend_nocancel),
+ MACX_(__NR_sigsuspend_nocancel, sigsuspend),
GENXY(__NR_readv_nocancel, sys_readv),
GENX_(__NR_writev_nocancel, sys_writev),
MACX_(__NR_sendto_nocancel, sendto),
@@ -9836,6 +9885,7 @@
MACXY(__NR_sysctlbyname, sysctlbyname), // 274
MACXY(__NR_necp_match_policy, necp_match_policy), // 460
MACXY(__NR_getattrlistbulk, getattrlistbulk), // 461
+ MACX_(__NR_readlinkat, readlinkat), // 473
MACX_(__NR_bsdthread_ctl, bsdthread_ctl), // 478
MACX_(__NR_guarded_open_dprotected_np, guarded_open_dprotected_np),
MACX_(__NR_guarded_write_np, guarded_write_np),
Modified: branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h (original)
+++ branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h Fri May 22 10:40:02 2015
@@ -192,7 +192,7 @@
/* Notifies aspacem that an munmap completed successfully. The
segment array is updated accordingly. As with
- VG_(am_notify_munmap), we merely record the given info, and don't
+ VG_(am_notify_mprotect), we merely record the given info, and don't
check it for sensibleness. If the returned Bool is True, the
caller should immediately discard translations from the specified
address range. */
Modified: branches/ASPACEM_TWEAKS/coregrind/pub_core_gdbserver.h
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/pub_core_gdbserver.h (original)
+++ branches/ASPACEM_TWEAKS/coregrind/pub_core_gdbserver.h Fri May 22 10:40:02 2015
@@ -105,14 +105,19 @@
// no gdb is connected, or gdb instructs to pass the signal.
// Note that if the below returns True, the signal might
// still be ignored if this is the action desired by the
-// guest program.
-extern Bool VG_(gdbserver_report_signal) (Int vki_signo, ThreadId tid);
+// guest program. Using GDB, the user can also modify the signal to be
+// reported (e.g. changing the signo to pass to the guest).
+// If this function returns True, m_signals.c should deliver the signal
+// info as modified by VG_(gdbserver_report_signal).
+// If this function returns False, no signal should be reported.
+extern Bool VG_(gdbserver_report_signal) (vki_siginfo_t *info, ThreadId tid);
// If no gdb is connected yet, wait for a gdb to connect and report
// this (supposedly) fatal signal.
// If a gdb is already connected, this does nothing (as normally
// the signal was already reported to the already connected gdb).
-extern void VG_(gdbserver_report_fatal_signal) (Int vki_signo, ThreadId tid);
+extern void VG_(gdbserver_report_fatal_signal) (const vki_siginfo_t *info,
+ ThreadId tid);
/* Entry point invoked by scheduler.c to execute the request
VALGRIND_CLIENT_MONITOR_COMMAND.
Modified: branches/ASPACEM_TWEAKS/darwin14.supp
==============================================================================
--- branches/ASPACEM_TWEAKS/darwin14.supp (original)
+++ branches/ASPACEM_TWEAKS/darwin14.supp Fri May 22 10:40:02 2015
@@ -134,6 +134,27 @@
...
}
+{
+ OSX1010:14-Leak
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:?alloc
+ ...
+ fun:libSystem_atfork_child
+ ...
+}
+
+{
+ OSX1010:15-Leak
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:malloc
+ fun:__smakebuf
+ ...
+ fun:printf
+ ...
+}
+
############################################
## Non-leak errors
Modified: branches/ASPACEM_TWEAKS/docs/internals/3_10_BUGSTATUS.txt
==============================================================================
--- branches/ASPACEM_TWEAKS/docs/internals/3_10_BUGSTATUS.txt (original)
+++ branches/ASPACEM_TWEAKS/docs/internals/3_10_BUGSTATUS.txt Fri May 22 10:40:02 2015
@@ -432,3 +432,11 @@
347322 Power PC regression test cleanup
Fri 8 May 11:52:14 CEST 2015
+
+347686 Patch set to cleanup PPC64 regtests
+
+347698 3.10.1 doesn't recognize cmpsd generated by DynASM
+
+347885 unhandled instruction bytes: 0xD6 0xF 0x84 0x1B (SALC amd64)
+
+Tue 19 May 11:22:52 CEST 2015
Modified: branches/ASPACEM_TWEAKS/drd/tests/tc22_exit_w_lock.stderr.exp-32bit
==============================================================================
--- branches/ASPACEM_TWEAKS/drd/tests/tc22_exit_w_lock.stderr.exp-32bit (original)
+++ branches/ASPACEM_TWEAKS/drd/tests/tc22_exit_w_lock.stderr.exp-32bit Fri May 22 10:40:02 2015
@@ -135,5 +135,3 @@
at 0x........: pthread_join (drd_pthread_intercepts.c:?)
by 0x........: main (tc22_exit_w_lock.c:43)
-
-ERROR SUMMARY: 12 errors from 12 contexts (suppressed: 0 from 0)
Modified: branches/ASPACEM_TWEAKS/drd/tests/tc22_exit_w_lock.stderr.exp-64bit
==============================================================================
--- branches/ASPACEM_TWEAKS/drd/tests/tc22_exit_w_lock.stderr.exp-64bit (original)
+++ branches/ASPACEM_TWEAKS/drd/tests/tc22_exit_w_lock.stderr.exp-64bit Fri May 22 10:40:02 2015
@@ -1,4 +1,3 @@
-
Mutex still locked at thread exit: mutex 0x........, recursion count 1, owner 3.
at 0x........: pthread_join (drd_pthread_intercepts.c:?)
by 0x........: main (tc22_exit_w_lock.c:43)
@@ -7,5 +6,3 @@
by 0x........: child_fn1 (tc22_exit_w_lock.c:18)
by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-
-ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Modified: branches/ASPACEM_TWEAKS/drd/tests/tc22_exit_w_lock.vgtest
==============================================================================
--- branches/ASPACEM_TWEAKS/drd/tests/tc22_exit_w_lock.vgtest (original)
+++ branches/ASPACEM_TWEAKS/drd/tests/tc22_exit_w_lock.vgtest Fri May 22 10:40:02 2015
@@ -1,3 +1,3 @@
prereq: ./supported_libpthread && [ -e ../../helgrind/tests/tc22_exit_w_lock ]
-vgopts: --num-callers=3
+vgopts: --num-callers=3 -q
prog: ../../helgrind/tests/tc22_exit_w_lock
Modified: branches/ASPACEM_TWEAKS/gdbserver_tests/nlgone_abrt.stderr.exp
==============================================================================
--- branches/ASPACEM_TWEAKS/gdbserver_tests/nlgone_abrt.stderr.exp (original)
+++ branches/ASPACEM_TWEAKS/gdbserver_tests/nlgone_abrt.stderr.exp Fri May 22 10:40:02 2015
@@ -1,8 +1,5 @@
-Nulgrind, the minimal Valgrind tool
-
(action at startup) vgdb me ...
starting ...
aborting ...
-
Modified: branches/ASPACEM_TWEAKS/gdbserver_tests/nlgone_abrt.vgtest
==============================================================================
--- branches/ASPACEM_TWEAKS/gdbserver_tests/nlgone_abrt.vgtest (original)
+++ branches/ASPACEM_TWEAKS/gdbserver_tests/nlgone_abrt.vgtest Fri May 22 10:40:02 2015
@@ -2,7 +2,7 @@
prog: gone
args: abort
-vgopts: --tool=none --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-nlgone-abrt
+vgopts: -q --tool=none --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-nlgone-abrt
stderr_filter: filter_stderr
prereq: test -e gdb
progB: gdb
Modified: branches/ASPACEM_TWEAKS/helgrind/libhb_core.c
==============================================================================
--- branches/ASPACEM_TWEAKS/helgrind/libhb_core.c (original)
+++ branches/ASPACEM_TWEAKS/helgrind/libhb_core.c Fri May 22 10:40:02 2015
@@ -367,6 +367,9 @@
static inline SVal SVal__mkC ( VtsID rmini, VtsID wmini );
static inline void SVal__rcinc ( SVal s );
static inline void SVal__rcdec ( SVal s );
+/* SVal in LineZ are used to store various pointers. */
+static inline void *SVal2Ptr (SVal s);
+static inline SVal Ptr2SVal (void* ptr);
/* A double linked list of all the SO's. */
SO* admin_SO;
@@ -464,18 +467,34 @@
SVal dict[4]; /* can represent up to 4 diff values in the line */
UChar ix2s[N_LINE_ARANGE/4]; /* array of N_LINE_ARANGE 2-bit
dict indexes */
- /* if dict[0] == SVal_INVALID then dict[1] is the index of the
+ /* if dict[0] == SVal_INVALID then dict[1] is a pointer to the
LineF to use, and dict[2..] are also SVal_INVALID. */
}
LineZ; /* compressed rep for a cache line */
+/* LineZ.dict[1] is used to store various pointers:
+ * In the first lineZ of a free SecMap, it points to the next free SecMap.
+ * In a lineZ for which we need to use a lineF, it points to the lineF. */
+
+
typedef
struct {
- Bool inUse;
SVal w64s[N_LINE_ARANGE];
}
LineF; /* full rep for a cache line */
+/* We use a pool allocator for LineF, as LineF is relatively small,
+ and we will often alloc/release such lines. */
+static PoolAlloc* LineF_pool_allocator;
+
+/* SVal in a lineZ are used to store various pointers.
+ Below are conversion functions to support that. */
+static inline LineF *LineF_Ptr (LineZ *lineZ)
+{
+ tl_assert(lineZ->dict[0] == SVal_INVALID);
+ return SVal2Ptr (lineZ->dict[1]);
+}
+
/* Shadow memory.
Primary map is a WordFM Addr SecMap*.
SecMaps cover some page-size-ish section of address space and hold
@@ -496,32 +515,30 @@
/* The data in the SecMap is held in the array of LineZs. Each LineZ
either carries the required data directly, in a compressed
- representation, or it holds (in .dict[0]) an index to the LineF in
- .linesF that holds the full representation.
+ representation, or it holds (in .dict[1]) a pointer to a LineF
+ that holds the full representation.
- Currently-unused LineF's have their .inUse bit set to zero.
- Since each in-use LineF is referred to be exactly one LineZ,
- the number of .linesZ[] that refer to .linesF should equal
- the number of .linesF[] that have .inUse == True.
+ As each in-use LineF is referred to by exactly one LineZ,
+ the number of .linesZ[] that refer to a lineF should equal
+ the number of used lineF.
RC obligations: the RCs presented to the user include exactly
the values in:
* direct Z reps, that is, ones for which .dict[0] != SVal_INVALID
- * F reps that are in use (.inUse == True)
+ * F reps that are in use
Hence the following actions at the following transitions are required:
- F rep: .inUse==True -> .inUse==False -- rcdec_LineF
- F rep: .inUse==False -> .inUse==True -- rcinc_LineF
+ F rep: alloc'd -> freed -- rcdec_LineF
+ F rep: -> alloc'd -- rcinc_LineF
Z rep: .dict[0] from other to SVal_INVALID -- rcdec_LineZ
Z rep: .dict[0] from SVal_INVALID to other -- rcinc_LineZ
*/
+
typedef
struct {
UInt magic;
LineZ linesZ[N_SECMAP_ZLINES];
- LineF* linesF;
- UInt linesF_size;
}
SecMap;
@@ -578,8 +595,6 @@
static UWord stats__secmap_ga_space_covered = 0; // # ga bytes covered
static UWord stats__secmap_linesZ_allocd = 0; // # LineZ's issued
static UWord stats__secmap_linesZ_bytes = 0; // .. using this much storage
-static UWord stats__secmap_linesF_allocd = 0; // # LineF's issued
-static UWord stats__secmap_linesF_bytes = 0; // .. using this much storage
static UWord stats__cache_Z_fetches = 0; // # Z lines fetched
static UWord stats__cache_Z_wbacks = 0; // # Z lines written back
static UWord stats__cache_F_fetches = 0; // # F lines fetched
@@ -677,8 +692,24 @@
/* SecMap changed to be fully SVal_NOACCESS are inserted in a list of
recycled SecMap. When a new SecMap is needed, a recycled SecMap
will be used in preference to allocating a new SecMap. */
-/* We make a linked list of SecMap. LinesF pointer is re-used to
- implement the link list. */
+/* We make a linked list of SecMap. The first LineZ is re-used to
+ implement the linked list. */
+/* Returns the SecMap following sm in the free list.
+ NULL if sm is the last SecMap. sm must be on the free list. */
+static inline SecMap *SecMap_freelist_next ( SecMap* sm )
+{
+ tl_assert (sm);
+ tl_assert (sm->magic == SecMap_free_MAGIC);
+ return SVal2Ptr (sm->linesZ[0].dict[1]);
+}
+static inline void set_SecMap_freelist_next ( SecMap* sm, SecMap* next )
+{
+ tl_assert (sm);
+ tl_assert (sm->magic == SecMap_free_MAGIC);
+ tl_assert (next == NULL || next->magic == SecMap_free_MAGIC);
+ sm->linesZ[0].dict[1] = Ptr2SVal (next);
+}
+
static SecMap *SecMap_freelist = NULL;
static UWord SecMap_freelist_length(void)
{
@@ -688,7 +719,7 @@
sm = SecMap_freelist;
while (sm) {
n++;
- sm = (SecMap*)sm->linesF;
+ sm = SecMap_freelist_next (sm);
}
return n;
}
@@ -697,7 +728,7 @@
{
if (0) VG_(message)(Vg_DebugMsg, "%p push\n", sm);
sm->magic = SecMap_free_MAGIC;
- sm->linesF = (LineF*)SecMap_freelist;
+ set_SecMap_freelist_next(sm, SecMap_freelist);
SecMap_freelist = sm;
}
/* Returns a free SecMap if there is one.
@@ -709,7 +740,7 @@
sm = SecMap_freelist;
if (sm) {
tl_assert (sm->magic == SecMap_free_MAGIC);
- SecMap_freelist = (SecMap*)sm->linesF;
+ SecMap_freelist = SecMap_freelist_next (sm);
if (0) VG_(message)(Vg_DebugMsg, "%p pop\n", sm);
}
return sm;
@@ -738,8 +769,6 @@
for (j = 0; j < N_LINE_ARANGE/4; j++)
sm->linesZ[i].ix2s[j] = 0; /* all reference dict[0] */
}
- sm->linesF = NULL;
- sm->linesF_size = 0;
return sm;
}
@@ -803,28 +832,27 @@
while (VG_(nextIterFM)( map_shmem, &gaKey, &secmapW )) {
UWord i;
UWord j;
+ UWord n_linesF = 0;
SecMap* sm = (SecMap*)secmapW;
tl_assert(sm->magic == SecMap_MAGIC);
Bool ok_to_GC = True;
examined++;
- /* Deal with the LineZs */
+ /* Deal with the LineZs and the possible LineF of a LineZ. */
for (i = 0; i < N_SECMAP_ZLINES && ok_to_GC; i++) {
LineZ* lineZ = &sm->linesZ[i];
- ok_to_GC = lineZ->dict[0] == SVal_INVALID
- || (lineZ->dict[0] == SVal_NOACCESS
+ if (lineZ->dict[0] != SVal_INVALID) {
+ ok_to_GC = lineZ->dict[0] == SVal_NOACCESS
&& !SVal__isC (lineZ->dict[1])
&& !SVal__isC (lineZ->dict[2])
- && !SVal__isC (lineZ->dict[3]));
- }
- /* Deal with the LineFs */
- for (i = 0; i < sm->linesF_size && ok_to_GC; i++) {
- LineF* lineF = &sm->linesF[i];
- if (!lineF->inUse)
- continue;
- for (j = 0; j < N_LINE_ARANGE && ok_to_GC; j++)
- ok_to_GC = lineF->w64s[j] == SVal_NOACCESS;
+ && !SVal__isC (lineZ->dict[3]);
+ } else {
+ LineF *lineF = LineF_Ptr(lineZ);
+ n_linesF++;
+ for (j = 0; j < N_LINE_ARANGE && ok_to_GC; j++)
+ ok_to_GC = lineF->w64s[j] == SVal_NOACCESS;
+ }
}
if (ok_to_GC)
ok_GCed++;
@@ -835,12 +863,16 @@
So, stop iteration, remove from map_shmem, recreate the iteration
on the next SecMap. */
VG_(doneIterFM) ( map_shmem );
- /* No need to rcdec linesZ or linesF, these are all SVal_NOACCESS or
- not in use. We just need to free the linesF. */
- if (sm->linesF_size > 0) {
- HG_(free)(sm->linesF);
- stats__secmap_linesF_allocd -= sm->linesF_size;
- stats__secmap_linesF_bytes -= sm->linesF_size * sizeof(LineF);
+ /* No need to rcdec linesZ or linesF, these are all SVal_NOACCESS.
+ We just need to free the lineF referenced by the linesZ. */
+ if (n_linesF > 0) {
+ for (i = 0; i < N_SECMAP_ZLINES && n_linesF > 0; i++) {
+ LineZ* lineZ = &sm->linesZ[i];
+ if (lineZ->dict[0] == SVal_INVALID) {
+ VG_(freeEltPA)( LineF_pool_allocator, LineF_Ptr(lineZ) );
+ n_linesF--;
+ }
+ }
}
if (!VG_(delFromFM)(map_shmem, &fm_gaKey, (UWord*)&fm_sm, gaKey))
tl_assert (0);
@@ -907,7 +939,6 @@
UWord secmapW = 0;
Addr gaKey;
UWord inUse = 0;
- UWord total = 0;
VG_(initIterFM)( map_shmem );
while (VG_(nextIterFM)( map_shmem, &gaKey, &secmapW )) {
@@ -915,15 +946,13 @@
SecMap* sm = (SecMap*)secmapW;
tl_assert(sm->magic == SecMap_MAGIC);
- for (i = 0; i < sm-...
[truncated message content] |
|
From: <sv...@va...> - 2015-05-22 09:34:36
|
Author: florian
Date: Fri May 22 10:34:30 2015
New Revision: 15272
Log:
Followup to 15270. Completely forgot about the double maintenance.
Modified:
trunk/coregrind/pub_core_aspacemgr.h
Modified: trunk/coregrind/pub_core_aspacemgr.h
==============================================================================
--- trunk/coregrind/pub_core_aspacemgr.h (original)
+++ trunk/coregrind/pub_core_aspacemgr.h Fri May 22 10:34:30 2015
@@ -182,7 +182,7 @@
/* Notifies aspacem that an munmap completed successfully. The
segment array is updated accordingly. As with
- VG_(am_notify_munmap), we merely record the given info, and don't
+ VG_(am_notify_mprotect), we merely record the given info, and don't
check it for sensibleness. If the returned Bool is True, the
caller should immediately discard translations from the specified
address range. */
|
|
From: <sv...@va...> - 2015-05-22 09:20:10
|
Author: mjw
Date: Fri May 22 10:20:03 2015
New Revision: 15271
Log:
Add procfs-non-linux.stderr.exp variants to EXTRA_DIST.
For bz#344936 procfs-non-linux.stderr.exp was renamed and split into
procfs-non-linux.stderr.exp-with-readlinkat and
procfs-non-linux.stderr.exp-without-readlinkat add both to EXTRA_DIST.
Fixes make post-regtest-checks.
Modified:
trunk/none/tests/Makefile.am
Modified: trunk/none/tests/Makefile.am
==============================================================================
--- trunk/none/tests/Makefile.am (original)
+++ trunk/none/tests/Makefile.am Fri May 22 10:20:03 2015
@@ -127,7 +127,9 @@
procfs-linux.stderr.exp-with-readlinkat \
procfs-linux.stderr.exp-without-readlinkat \
procfs-linux.vgtest \
- procfs-non-linux.stderr.exp procfs-non-linux.vgtest \
+ procfs-non-linux.vgtest \
+ procfs-non-linux.stderr.exp-with-readlinkat \
+ procfs-non-linux.stderr.exp-without-readlinkat \
pth_atfork1.stderr.exp pth_atfork1.stdout.exp pth_atfork1.vgtest \
pth_blockedsig.stderr.exp \
pth_blockedsig.stdout.exp pth_blockedsig.vgtest \
|
|
From: <sv...@va...> - 2015-05-22 09:17:36
|
Author: florian
Date: Fri May 22 10:17:28 2015
New Revision: 15270
Log:
Comment only change.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Fri May 22 10:17:28 2015
@@ -2097,7 +2097,7 @@
/* Notifies aspacem that an munmap completed successfully. The
segment array is updated accordingly. As with
- VG_(am_notify_munmap), we merely record the given info, and don't
+ VG_(am_notify_mprotect), we merely record the given info, and don't
check it for sensibleness. If the returned Bool is True, the
caller should immediately discard translations from the specified
address range. */
|
Author: florian
Date: Thu May 21 23:41:39 2015
New Revision: 15269
Log:
Remove an incorrect assertion. Need to consider SkShmC segments as well.
Added:
trunk/none/tests/linux/mremap6.c
trunk/none/tests/linux/mremap6.stderr.exp
trunk/none/tests/linux/mremap6.vgtest
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/none/tests/linux/ (props changed)
trunk/none/tests/linux/Makefile.am
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Thu May 21 23:41:39 2015
@@ -3001,9 +3001,6 @@
/* Mark the new area based on the old seg. */
if (seg.kind == SkFileC) {
seg.offset += ((ULong)old_addr) - ((ULong)seg.start);
- } else {
- aspacem_assert(seg.kind == SkAnonC);
- aspacem_assert(seg.offset == 0);
}
seg.start = new_addr;
seg.end = new_addr + new_len - 1;
Modified: trunk/none/tests/linux/Makefile.am
==============================================================================
--- trunk/none/tests/linux/Makefile.am (original)
+++ trunk/none/tests/linux/Makefile.am Thu May 21 23:41:39 2015
@@ -13,6 +13,7 @@
mremap3.stderr.exp mremap3.stdout.exp mremap3.vgtest \
mremap4.stderr.exp mremap4.vgtest \
mremap5.stderr.exp mremap5.vgtest \
+ mremap6.stderr.exp mremap6.vgtest \
pthread-stack.stderr.exp pthread-stack.vgtest \
stack-overflow.stderr.exp stack-overflow.vgtest
@@ -25,6 +26,7 @@
mremap3 \
mremap4 \
mremap5 \
+ mremap6 \
pthread-stack \
stack-overflow
Added: trunk/none/tests/linux/mremap6.c
==============================================================================
--- trunk/none/tests/linux/mremap6.c (added)
+++ trunk/none/tests/linux/mremap6.c Thu May 21 23:41:39 2015
@@ -0,0 +1,31 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+
+static void *mkmap(unsigned sz)
+{
+ int shmid = shmget(IPC_PRIVATE, sz,
+ IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR);
+ assert(shmid != -1);
+
+ void *addr = shmat(shmid, NULL, 0);
+ assert(addr != (void *)-1);
+
+ return addr;
+}
+
+int main()
+{
+ void *np, *p;
+
+ p = mkmap(1024*1024);
+ np = mremap(p, 1024*1024, 2048*1024, MREMAP_MAYMOVE); /* grow, maymove */
+ assert(np != (void *)-1);
+
+ return 0;
+}
Added: trunk/none/tests/linux/mremap6.stderr.exp
==============================================================================
(empty)
Added: trunk/none/tests/linux/mremap6.vgtest
==============================================================================
--- trunk/none/tests/linux/mremap6.vgtest (added)
+++ trunk/none/tests/linux/mremap6.vgtest Thu May 21 23:41:39 2015
@@ -0,0 +1,5 @@
+prog: mremap6
+vgopts: -q
+# This testcase used to run into an assertion. Therefore cannot use
+# the default filter because need to see lines beginning with --<pid> .....
+stderr_filter: ../../../tests/filter_addresses
|
|
From: <sv...@va...> - 2015-05-21 22:01:26
|
Author: philippe
Date: Thu May 21 23:01:19 2015
New Revision: 15268
Log:
Also compare keys before calling cmp in the hash table stats printing
Modified:
trunk/coregrind/m_hashtable.c
Modified: trunk/coregrind/m_hashtable.c
==============================================================================
--- trunk/coregrind/m_hashtable.c (original)
+++ trunk/coregrind/m_hashtable.c Thu May 21 23:01:19 2015
@@ -278,22 +278,18 @@
nelt = 0;
// Is the same cnode element existing before cnode ?
for (node = table->chains[i]; node != cnode; node = node->next) {
- if (cmp) {
- if ((*cmp)(node, cnode) == 0)
- nelt++;
- } else
- if (node->key == cnode->key)
- nelt++;
+ if (node->key == cnode->key
+ && (cmp == NULL || cmp (node, cnode) == 0)) {
+ nelt++;
+ }
}
// If cnode element not in a previous node, count occurences of elt.
if (nelt == 0) {
for (node = cnode; node != NULL; node = node->next) {
- if (cmp) {
- if ((*cmp)(node, cnode) == 0)
- nelt++;
- } else
- if (node->key == cnode->key)
- nelt++;
+ if (node->key == cnode->key
+ && (cmp == NULL || cmp (node, cnode) == 0)) {
+ nelt++;
+ }
}
INCOCCUR(elt_occurences, nelt);
}
|
|
From: <sv...@va...> - 2015-05-21 19:31:25
|
Author: florian
Date: Thu May 21 20:31:18 2015
New Revision: 15267
Log:
Change find_nsegment_idx[_WRK] to return an unsigned value.
In find_nsegment_idx add an assert that the returned value is in range.
That allows us to remove the asserts at the call sites.
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c Thu May 21 20:31:18 2015
@@ -332,7 +332,7 @@
/* ------ Forwards decls ------ */
inline
-static Int find_nsegment_idx ( Addr a );
+static UInt find_nsegment_idx ( Addr a );
static void parse_procselfmaps (
void (*record_mapping)( Addr addr, SizeT len, UInt prot,
@@ -770,7 +770,7 @@
ULong dev, ULong ino, Off64T offset,
const HChar* filename )
{
- Int iLo, iHi, i;
+ UInt iLo, iHi, i;
Bool sloppyXcheck, sloppyRcheck;
/* If a problem has already been detected, don't continue comparing
@@ -790,9 +790,6 @@
iLo = find_nsegment_idx( addr );
iHi = find_nsegment_idx( addr + len - 1 );
- /* These 5 should be guaranteed by find_nsegment_idx. */
- aspacem_assert(0 <= iLo && iLo < nsegments_used);
- aspacem_assert(0 <= iHi && iHi < nsegments_used);
aspacem_assert(iLo <= iHi);
aspacem_assert(nsegments[iLo].start <= addr );
aspacem_assert(nsegments[iHi].end >= addr + len - 1 );
@@ -922,7 +919,7 @@
static void sync_check_gap_callback ( Addr addr, SizeT len )
{
- Int iLo, iHi, i;
+ UInt iLo, iHi, i;
/* If a problem has already been detected, don't continue comparing
segments, so as to avoid flooding the output with error
@@ -941,9 +938,6 @@
iLo = find_nsegment_idx( addr );
iHi = find_nsegment_idx( addr + len - 1 );
- /* These 5 should be guaranteed by find_nsegment_idx. */
- aspacem_assert(0 <= iLo && iLo < nsegments_used);
- aspacem_assert(0 <= iHi && iHi < nsegments_used);
aspacem_assert(iLo <= iHi);
aspacem_assert(nsegments[iLo].start <= addr );
aspacem_assert(nsegments[iHi].end >= addr + len - 1 );
@@ -1040,7 +1034,7 @@
*/
/* Don't call find_nsegment_idx_WRK; use find_nsegment_idx instead. */
__attribute__((noinline))
-static Int find_nsegment_idx_WRK ( Addr a )
+static UInt find_nsegment_idx_WRK ( Addr a )
{
Addr a_mid_lo, a_mid_hi;
Int mid,
@@ -1064,7 +1058,7 @@
}
}
-inline static Int find_nsegment_idx ( Addr a )
+inline static UInt find_nsegment_idx ( Addr a )
{
# define N_CACHE 131 /*prime*/
static Addr cache_pageno[N_CACHE];
@@ -1099,12 +1093,13 @@
&& a <= nsegments[cache_segidx[ix]].end) {
/* hit */
/* aspacem_assert( cache_segidx[ix] == find_nsegment_idx_WRK(a) ); */
- return cache_segidx[ix];
+ } else {
+ /* miss */
+ n_m++;
+ cache_segidx[ix] = find_nsegment_idx_WRK(a);
+ cache_pageno[ix] = a >> 12;
}
- /* miss */
- n_m++;
- cache_segidx[ix] = find_nsegment_idx_WRK(a);
- cache_pageno[ix] = a >> 12;
+ aspacem_assert(cache_segidx[ix] >= 0 && cache_segidx[ix] < nsegments_used);
return cache_segidx[ix];
# undef N_CACHE
}
@@ -1113,8 +1108,8 @@
/* Finds the segment containing 'a'. Only returns non-SkFree segments. */
NSegment const * VG_(am_find_nsegment) ( Addr a )
{
- Int i = find_nsegment_idx(a);
- aspacem_assert(i >= 0 && i < nsegments_used);
+ UInt i = find_nsegment_idx(a);
+
aspacem_assert(nsegments[i].start <= a);
aspacem_assert(a <= nsegments[i].end);
if (nsegments[i].kind == SkFree)
@@ -1167,7 +1162,7 @@
static
Bool is_valid_for( UInt kinds, Addr start, SizeT len, UInt prot )
{
- Int i, iLo, iHi;
+ UInt i, iLo, iHi;
Bool needR, needW, needX;
if (len == 0)
@@ -1243,7 +1238,7 @@
static Bool any_Ts_in_range ( Addr start, SizeT len )
{
- Int iLo, iHi, i;
+ UInt iLo, iHi, i;
aspacem_assert(len > 0);
aspacem_assert(start + len > start);
iLo = find_nsegment_idx(start);
@@ -1361,13 +1356,13 @@
static void split_nsegment_at ( Addr a )
{
- Int i, j;
+ UInt i, j;
aspacem_assert(a > 0);
aspacem_assert(VG_IS_PAGE_ALIGNED(a));
+ aspacem_assert(nsegments_used > 0);
i = find_nsegment_idx(a);
- aspacem_assert(i >= 0 && i < nsegments_used);
if (nsegments[i].start == a)
/* 'a' is already the start point of a segment, so nothing to be
@@ -1403,8 +1398,8 @@
static
void split_nsegments_lo_and_hi ( Addr sLo, Addr sHi,
- /*OUT*/Int* iLo,
- /*OUT*/Int* iHi )
+ /*OUT*/UInt* iLo,
+ /*OUT*/UInt* iHi )
{
aspacem_assert(sLo < sHi);
aspacem_assert(VG_IS_PAGE_ALIGNED(sLo));
@@ -1417,8 +1412,7 @@
*iLo = find_nsegment_idx(sLo);
*iHi = find_nsegment_idx(sHi);
- aspacem_assert(0 <= *iLo && *iLo < nsegments_used);
- aspacem_assert(0 <= *iHi && *iHi < nsegments_used);
+
aspacem_assert(*iLo <= *iHi);
aspacem_assert(nsegments[*iLo].start == sLo);
aspacem_assert(nsegments[*iHi].end == sHi);
@@ -1432,7 +1426,7 @@
static void add_segment ( const NSegment* seg )
{
- Int i, iLo, iHi, delta;
+ UInt i, iLo, iHi, delta;
Bool segment_is_sane;
Addr sStart = seg->start;
@@ -1456,7 +1450,7 @@
for (i = iLo; i <= iHi; ++i)
ML_(am_dec_refcount)(nsegments[i].fnIdx);
delta = iHi - iLo;
- aspacem_assert(delta >= 0);
+
if (delta > 0) {
for (i = iLo; i < nsegments_used-delta; i++)
nsegments[i] = nsegments[i+delta];
@@ -1800,7 +1794,7 @@
it does not trash either any of its own mappings or any of
valgrind's mappings.
*/
- Int i, j;
+ UInt i, j;
Addr holeStart, holeEnd, holeLen;
Bool fixed_not_required;
@@ -1839,8 +1833,8 @@
/* ------ Implement Policy Exception #1 ------ */
if (forClient && req->rkind == MFixed) {
- Int iLo = find_nsegment_idx(reqStart);
- Int iHi = find_nsegment_idx(reqEnd);
+ UInt iLo = find_nsegment_idx(reqStart);
+ UInt iHi = find_nsegment_idx(reqEnd);
Bool allow = True;
for (i = iLo; i <= iHi; i++) {
if (nsegments[i].kind == SkFree
@@ -1867,8 +1861,8 @@
/* ------ Implement Policy Exception #2 ------ */
if (forClient && req->rkind == MHint) {
- Int iLo = find_nsegment_idx(reqStart);
- Int iHi = find_nsegment_idx(reqEnd);
+ UInt iLo = find_nsegment_idx(reqStart);
+ UInt iHi = find_nsegment_idx(reqEnd);
Bool allow = True;
for (i = iLo; i <= iHi; i++) {
if (nsegments[i].kind == SkFree
@@ -1997,8 +1991,8 @@
/* Similar to VG_(am_find_nsegment) but only returns free segments. */
static NSegment const * VG_(am_find_free_nsegment) ( Addr a )
{
- Int i = find_nsegment_idx(a);
- aspacem_assert(i >= 0 && i < nsegments_used);
+ UInt i = find_nsegment_idx(a);
+
aspacem_assert(nsegments[i].start <= a);
aspacem_assert(a <= nsegments[i].end);
if (nsegments[i].kind == SkFree)
@@ -2107,7 +2101,7 @@
Bool VG_(am_notify_mprotect)( Addr start, SizeT len, UInt prot )
{
- Int i, iLo, iHi;
+ UInt i, iLo, iHi;
Bool newR, newW, newX, needDiscard;
aspacem_assert(VG_IS_PAGE_ALIGNED(start));
@@ -2619,7 +2613,7 @@
if (! sr_isError(res)) {
Addr addr = sr_Res(res);
- Int ix = find_nsegment_idx(addr);
+ UInt ix = find_nsegment_idx(addr);
nsegments[ix].whatsit = WiClientHeap;
}
@@ -2708,7 +2702,7 @@
Bool VG_(am_change_ownership_v_to_c)( Addr start, SizeT len )
{
- Int i, iLo, iHi;
+ UInt i, iLo, iHi;
if (len == 0)
return True;
@@ -2746,7 +2740,7 @@
expected to belong to a client segment. */
void VG_(am_set_segment_hasT)( Addr addr )
{
- Int i = find_nsegment_idx(addr);
+ UInt i = find_nsegment_idx(addr);
SegKind kind = nsegments[i].kind;
aspacem_assert(kind == SkAnonC || kind == SkFileC || kind == SkShmC);
nsegments[i].hasT = True;
@@ -2767,7 +2761,7 @@
static Bool create_reservation (Addr start, SizeT length, ShrinkMode smode,
SSizeT extra, WhatsIt whatsit)
{
- Int startI, endI;
+ UInt startI, endI;
NSegment seg;
/* start and end, not taking into account the extra space. */
@@ -2833,7 +2827,7 @@
extend_into_adjacent_reservation_client (Addr addr, SSizeT delta,
Bool *overflow)
{
- Int segA, segR;
+ UInt segA, segR;
UInt prot;
SysRes sres;
@@ -2892,6 +2886,7 @@
/* Extending the segment backwards. */
delta = -delta;
aspacem_assert(delta > 0);
+ aspacem_assert(segA >= 1);
segR = segA-1;
if (segR < 0
@@ -3156,8 +3151,7 @@
VG_(am_show_nsegments)(0, "VG_(am_extend_map_client) BEFORE");
/* Get the client segment */
- Int ix = find_nsegment_idx(addr);
- aspacem_assert(ix >= 0 && ix < nsegments_used);
+ UInt ix = find_nsegment_idx(addr);
NSegment *seg = nsegments + ix;
@@ -3214,7 +3208,7 @@
Addr old_addr, SizeT old_len,
Addr new_addr, SizeT new_len )
{
- Int iLo, iHi;
+ UInt iLo, iHi;
SysRes sres;
NSegment seg;
@@ -3708,7 +3702,7 @@
here. If found, we just skip. Otherwise add the data presented
here into css_local[]. */
- Int iLo, iHi, i;
+ UInt iLo, iHi, i;
if (len == 0) return;
@@ -3792,7 +3786,7 @@
{
// derived from sync_check_gap_callback()
- Int iLo, iHi, i;
+ UInt iLo, iHi, i;
if (len == 0)
return;
|
|
From: <sv...@va...> - 2015-05-21 18:37:22
|
Author: florian
Date: Thu May 21 19:37:14 2015
New Revision: 15266
Log:
Remove redundant function calls. The computed values are already
provided by split_nsegments_lo_and_hi.
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c Thu May 21 19:37:14 2015
@@ -2125,9 +2125,6 @@
split_nsegments_lo_and_hi( start, start+len-1, &iLo, &iHi );
- iLo = find_nsegment_idx(start);
- iHi = find_nsegment_idx(start + len - 1);
-
for (i = iLo; i <= iHi; i++) {
/* Apply the permissions to all relevant segments. */
switch (nsegments[i].kind) {
|
Author: rhyskidd
Date: Thu May 21 13:56:23 2015
New Revision: 15265
Log:
Follow-up bz#344936: Distinguish readlinkat tests for OS X platforms that do or do not support the readlinkat syscall.
Added:
trunk/none/tests/procfs-non-linux.stderr.exp-with-readlinkat
trunk/none/tests/procfs-non-linux.stderr.exp-without-readlinkat
Removed:
trunk/none/tests/procfs-non-linux.stderr.exp
Removed: trunk/none/tests/procfs-non-linux.stderr.exp
==============================================================================
--- trunk/none/tests/procfs-non-linux.stderr.exp (original)
+++ trunk/none/tests/procfs-non-linux.stderr.exp (removed)
@@ -1,10 +0,0 @@
-
-/proc/self/cmdline:
-open(): No such file or directory
-/proc/<pid>/cmdline:
-open(): No such file or directory
-readlink: No such file or directory
-readlink: No such file or directory
-readlinkat: No such file or directory
-readlinkat: No such file or directory
-
Added: trunk/none/tests/procfs-non-linux.stderr.exp-with-readlinkat
==============================================================================
--- trunk/none/tests/procfs-non-linux.stderr.exp-with-readlinkat (added)
+++ trunk/none/tests/procfs-non-linux.stderr.exp-with-readlinkat Thu May 21 13:56:23 2015
@@ -0,0 +1,10 @@
+
+/proc/self/cmdline:
+open(): No such file or directory
+/proc/<pid>/cmdline:
+open(): No such file or directory
+readlink: No such file or directory
+readlink: No such file or directory
+readlinkat: No such file or directory
+readlinkat: No such file or directory
+
Added: trunk/none/tests/procfs-non-linux.stderr.exp-without-readlinkat
==============================================================================
--- trunk/none/tests/procfs-non-linux.stderr.exp-without-readlinkat (added)
+++ trunk/none/tests/procfs-non-linux.stderr.exp-without-readlinkat Thu May 21 13:56:23 2015
@@ -0,0 +1,10 @@
+
+/proc/self/cmdline:
+open(): No such file or directory
+/proc/<pid>/cmdline:
+open(): No such file or directory
+readlink: No such file or directory
+readlink: No such file or directory
+readlinkat: Function not implemented
+readlinkat: Function not implemented
+
|
|
From: <sv...@va...> - 2015-05-20 15:14:08
|
Author: florian
Date: Wed May 20 16:14:00 2015
New Revision: 15264
Log:
Fix rounding when printing floating point numbers.
Modified:
trunk/coregrind/m_debuglog.c
trunk/none/tests/unit_debuglog.c
trunk/none/tests/unit_debuglog.stderr.exp
Modified: trunk/coregrind/m_debuglog.c
==============================================================================
--- trunk/coregrind/m_debuglog.c (original)
+++ trunk/coregrind/m_debuglog.c Wed May 20 16:14:00 2015
@@ -1006,10 +1006,17 @@
/* Silently limit the precision to 10 digits. */
if (precision > 10) precision = 10;
- /* If fracional part is not printed (precision == 0), may have to
- round up */
- if (precision == 0 && frac >= 0.5)
+ /* Determine fractional part, possibly round up */
+ ULong factor = 1;
+ for (cnt = 0; cnt < precision; ++cnt)
+ factor *= 10;
+ ULong frval = frac * factor;
+ if ((frac * factor - frval) > 0.5) // round up
+ frval += 1;
+ /* Check rounding. */
+ if (frval == factor)
ipval += 1;
+ frval %= factor;
/* Find out how many characters are needed to print the number */
@@ -1046,14 +1053,6 @@
send('.', send_arg2);
ret += 1;
- // Fractional part
- ULong factor = 1;
- for (cnt = 0; cnt < precision; ++cnt)
- factor *= 10;
- ULong frval = frac * factor;
- if ((frac * factor - frval) > 0.5) // round up
- frval += 1;
- frval %= factor;
ret += myvprintf_int64(send, send_arg2, VG_MSG_ZJUSTIFY, 10,
precision, False, frval);
}
Modified: trunk/none/tests/unit_debuglog.c
==============================================================================
--- trunk/none/tests/unit_debuglog.c (original)
+++ trunk/none/tests/unit_debuglog.c Wed May 20 16:14:00 2015
@@ -149,5 +149,13 @@
run("|%100lld|", ival);
run("|%*lld|", 13, ival);
+ value = 0.99685224;
+ run("|%3.0f|", value);
+ run("|%3.1f|", value);
+ run("|%3.2f|", value);
+ run("|%3.3f|", value);
+ run("|%3.4f|", value);
+ run("|%3.5f|", value);
+
return 0;
}
Modified: trunk/none/tests/unit_debuglog.stderr.exp
==============================================================================
--- trunk/none/tests/unit_debuglog.stderr.exp (original)
+++ trunk/none/tests/unit_debuglog.stderr.exp Wed May 20 16:14:00 2015
@@ -127,3 +127,15 @@
|%100lld| debuglog = | -1004005| wrote 102 chars
|%*lld| printf = | -1004005| wrote 15 chars
|%*lld| debuglog = | -1004005| wrote 15 chars
+|%3.0f| printf = | 1| wrote 5 chars
+|%3.0f| debuglog = | 1| wrote 5 chars
+|%3.1f| printf = |1.0| wrote 5 chars
+|%3.1f| debuglog = |1.0| wrote 5 chars
+|%3.2f| printf = |1.00| wrote 6 chars
+|%3.2f| debuglog = |1.00| wrote 6 chars
+|%3.3f| printf = |0.997| wrote 7 chars
+|%3.3f| debuglog = |0.997| wrote 7 chars
+|%3.4f| printf = |0.9969| wrote 8 chars
+|%3.4f| debuglog = |0.9969| wrote 8 chars
+|%3.5f| printf = |0.99685| wrote 9 chars
+|%3.5f| debuglog = |0.99685| wrote 9 chars
|
|
From: <sv...@va...> - 2015-05-20 15:08:21
|
Author: philippe
Date: Wed May 20 16:08:09 2015
New Revision: 15263
Log:
Have the hash table 'gen' functions comparing the key instead of the
cmp function.
Document this in the cmp function comment in pub_tool_hashtable.h
Modified:
trunk/coregrind/m_deduppoolalloc.c
trunk/coregrind/m_hashtable.c
trunk/include/pub_tool_hashtable.h
Modified: trunk/coregrind/m_deduppoolalloc.c
==============================================================================
--- trunk/coregrind/m_deduppoolalloc.c (original)
+++ trunk/coregrind/m_deduppoolalloc.c Wed May 20 16:08:09 2015
@@ -177,16 +177,19 @@
}
}
+/* Compare function for 'gen' hash table. No need to compare the key
+ in this function, as the hash table already does it for us,
+ and that in any case, if the data is equal, the keys must also be
+ equal. */
static Word cmp_pool_elt (const void* node1, const void* node2 )
{
const ht_node* hnode1 = node1;
const ht_node* hnode2 = node2;
- if (hnode1->key < hnode2->key)
- return -1;
- else if (hnode1->key > hnode2->key)
- return 1;
- else if (hnode1->eltSzB == hnode2->eltSzB)
+ /* As this function is called by hashtable, that has already checked
+ for key equality, it is likely that it is the 'good' element.
+ So, we handle the equal case first. */
+ if (hnode1->eltSzB == hnode2->eltSzB)
return VG_(memcmp) (hnode1->elt, hnode2->elt, hnode1->eltSzB);
else if (hnode1->eltSzB < hnode2->eltSzB)
return -1;
Modified: trunk/coregrind/m_hashtable.c
==============================================================================
--- trunk/coregrind/m_hashtable.c (original)
+++ trunk/coregrind/m_hashtable.c Wed May 20 16:08:09 2015
@@ -179,7 +179,7 @@
VgHashNode* curr = table->chains[ CHAIN_NO(hnode->key, table) ]; // GEN!!!
while (curr) {
- if (cmp (hnode, curr) == 0) { // GEN!!!
+ if (hnode->key == curr->key && cmp (hnode, curr) == 0) { // GEN!!!
return curr;
}
curr = curr->next;
@@ -222,7 +222,7 @@
table->iterOK = False;
while (curr) {
- if (cmp(hnode, curr) == 0) { // GEN!!!
+ if (hnode->key == curr->key && cmp(hnode, curr) == 0) { // GEN!!!
*prev_next_ptr = curr->next;
table->n_elements--;
return curr;
Modified: trunk/include/pub_tool_hashtable.h
==============================================================================
--- trunk/include/pub_tool_hashtable.h (original)
+++ trunk/include/pub_tool_hashtable.h Wed May 20 16:08:09 2015
@@ -84,7 +84,10 @@
* when comparing the rest of the node, if the node data contains holes
between components, either the node memory should be fully initialised
(e.g. allocated using VG_(calloc)) or each component should be compared
- individually. */
+ individually.
+ Note that the cmp function is only called for elements that already
+ have keys that are equal. So, it is not needed for cmp to check for
+ key equality. */
extern void* VG_(HT_gen_lookup) ( const VgHashTable *table, const void* node,
HT_Cmp_t cmp );
extern void* VG_(HT_gen_remove) ( VgHashTable *table, const void* node,
|
|
From: <sv...@va...> - 2015-05-20 14:33:38
|
Author: philippe
Date: Wed May 20 15:33:30 2015
New Revision: 15262
Log:
Improve presentation of first line of --profile-heap=yes
(i.e. use
-------- Arena "client": 4,194,304/4,194,304 max/cu...
instead of
-------- Arena "client": 4194304/4194304 max/cu....
Modified:
trunk/coregrind/m_mallocfree.c
Modified: trunk/coregrind/m_mallocfree.c
==============================================================================
--- trunk/coregrind/m_mallocfree.c (original)
+++ trunk/coregrind/m_mallocfree.c Wed May 20 15:33:30 2015
@@ -1404,9 +1404,9 @@
sanity_check_malloc_arena(aid);
VG_(printf)(
- "-------- Arena \"%s\": %lu/%lu max/curr mmap'd, "
+ "-------- Arena \"%s\": %'lu/%'lu max/curr mmap'd, "
"%llu/%llu unsplit/split sb unmmap'd, "
- "%lu/%lu max/curr on_loan %lu rzB --------\n",
+ "%'lu/%'lu max/curr on_loan %lu rzB --------\n",
a->name, a->stats__bytes_mmaped_max, a->stats__bytes_mmaped,
a->stats__nreclaim_unsplit, a->stats__nreclaim_split,
a->stats__bytes_on_loan_max, a->stats__bytes_on_loan,
|
|
From: Florian K. <fl...@ei...> - 2015-05-20 13:53:39
|
On 19.05.2015 23:23, Philippe Waroquiers wrote: > On Tue, 2015-05-19 at 17:33 +0200, Julian Seward wrote: >> I was thinking about moving error-count printing to its own flag >> >> --show-error-counts=no|yes [no] >> Seems a bit of an ad-hoc solution. And we already have MANY command line options. I agree with Philippe that the logging stuff needs to be redone so we can select what we want to see and at what levels of detail. Adding more observability would also be good fo unit testing.. Something like --vtrace=<component>:<level of detail> e.d. --vtrace=signals:2 or --vtrace=aspacemgr:4 I don't think this would be that much work to do, actually, given sufficient supply of beer which can always be arranged.... What would be more work is to decide what kinds of messages are meant for users and what are for developers... I'd say: if you can reasonably filter the output, go for that. Florian |
On 14.05.2015 09:15, Julian Seward wrote: > > On 14/05/15 01:13, Philippe Waroquiers wrote: >> Tools are also not working with constants while they are working >> with enum (e.g. emacs find-tag does not work with HChar >> constants, and works with enum values). > > enums are type-checkable; chars aren't really. I must say I would > also prefer if this was done with an enum. I didn't think this would be controversial given the precedent mc_translate.c::assignNew Anyhow... r15261. Florian |
Author: florian
Date: Wed May 20 14:33:06 2015
New Revision: 15261
Log:
Use an enum type.
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-common.c
branches/ASPACEM_TWEAKS/coregrind/m_signals.c
branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c
branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-main.c
branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c Wed May 20 14:33:06 2015
@@ -1266,7 +1266,7 @@
'U' ADDR must be unmapped
'*' ADDR can be mapped or unmapped
*/
-Bool VG_(am_addr_is_in_extensible_client_stack)( Addr addr, HChar kind )
+Bool VG_(am_addr_is_in_extensible_client_stack)( Addr addr, MapKind kind )
{
const NSegment *seg = nsegments + find_nsegment_idx(addr);
@@ -1279,7 +1279,7 @@
return False;
case SkResvn: {
- if (kind == 'M') return False;
+ if (kind == MkMapped) return False;
if (seg->smode != SmUpper) return False;
/* If the the abutting segment towards higher addresses is an SkAnonC
segment, then ADDR is a future stack pointer. */
@@ -1293,7 +1293,7 @@
case SkAnonC: {
/* If the abutting segment towards lower addresses is an SkResvn
segment, then ADDR is a stack pointer into mapped memory. */
- if (kind == 'U') return False;
+ if (kind == MkUnmapped) return False;
const NSegment *next = VG_(am_next_nsegment)(seg, /*forward*/ False);
if (next == NULL || next->kind != SkResvn || next->smode != SmUpper)
return False;
Modified: branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-common.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-common.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-common.c Wed May 20 14:33:06 2015
@@ -64,7 +64,7 @@
/* If the sigframe is allocated on an alternate stack, then we cannot
extend that stack. Nothing to do here. */
stackseg = VG_(am_find_nsegment)(addr);
- } else if (VG_(am_addr_is_in_extensible_client_stack)(addr, '*')) {
+ } else if (VG_(am_addr_is_in_extensible_client_stack)(addr, MkAny)) {
if (VG_(extend_stack)(tid, addr)) {
stackseg = VG_(am_find_nsegment)(addr);
if (0 && stackseg)
Modified: branches/ASPACEM_TWEAKS/coregrind/m_signals.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_signals.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_signals.c Wed May 20 14:33:06 2015
@@ -1736,7 +1736,7 @@
if (tid == 1) { // main thread
Addr esp = VG_(get_SP)(tid);
Addr base = VG_PGROUNDDN(esp - VG_STACK_REDZONE_SZB);
- if (VG_(am_addr_is_in_extensible_client_stack)(base, '*') &&
+ if (VG_(am_addr_is_in_extensible_client_stack)(base, MkAny) &&
VG_(extend_stack)(tid, base)) {
if (VG_(clo_trace_signals))
VG_(dmsg)(" -> extended stack base to %#lx\n",
@@ -2428,7 +2428,7 @@
}
if (info->si_code == VKI_SEGV_MAPERR
- && VG_(am_addr_is_in_extensible_client_stack)(fault, 'U')
+ && VG_(am_addr_is_in_extensible_client_stack)(fault, MkUnmapped)
&& fault >= fault_mask(esp - VG_STACK_REDZONE_SZB)) {
/* If the fault address is above esp but below the current known
stack segment base, and it was a fault because there was
@@ -2436,7 +2436,7 @@
then extend the stack segment.
*/
Addr base = VG_PGROUNDDN(esp - VG_STACK_REDZONE_SZB);
- if (VG_(am_addr_is_in_extensible_client_stack)(base, '*') &&
+ if (VG_(am_addr_is_in_extensible_client_stack)(base, MkAny) &&
VG_(extend_stack)(tid, base)) {
if (VG_(clo_trace_signals))
VG_(dmsg)(" -> extended stack base to %#lx\n",
Modified: branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c Wed May 20 14:33:06 2015
@@ -3662,7 +3662,7 @@
vg_assert(grows == VKI_PROT_GROWSDOWN);
- if (VG_(am_addr_is_in_extensible_client_stack)(ARG1, 'M')) {
+ if (VG_(am_addr_is_in_extensible_client_stack)(ARG1, MkMapped)) {
const NSegment *aseg = VG_(am_find_nsegment)(ARG1);
Addr end = ARG1 + ARG2;
ARG1 = aseg->start;
Modified: branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-main.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-main.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-main.c Wed May 20 14:33:06 2015
@@ -1550,7 +1550,7 @@
So the approximation we're taking here is to extend the stack only
if the client stack pointer does not look bogus. */
- if (VG_(am_addr_is_in_extensible_client_stack)(stackMin, '*'))
+ if (VG_(am_addr_is_in_extensible_client_stack)(stackMin, MkAny))
VG_(extend_stack)( tid, stackMin );
}
# endif
Modified: branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h (original)
+++ branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h Wed May 20 14:33:06 2015
@@ -47,6 +47,13 @@
/* types SegKind, ShrinkMode and NSegment are described in
the tool-visible header file, not here. */
+/* Describes whether an address is mapped or unmapped/ */
+typedef
+ enum {
+ MkMapped = 0x1,
+ MkUnmapped = 0x2,
+ MkAny = MkMapped | MkUnmapped
+ } MapKind;
//--------------------------------------------------------------
// Initialisation
@@ -90,7 +97,8 @@
/* Check whether ADDR looks like an address or address-to-be located in an
extensible client stack segment. */
-extern Bool VG_(am_addr_is_in_extensible_client_stack)( Addr addr, HChar kind );
+extern Bool VG_(am_addr_is_in_extensible_client_stack)( Addr addr,
+ MapKind kind );
/* If ADDR is located in a segment that looks like a stack segment, return
the start and end addresses of that segment. */
|
Author: rhyskidd
Date: Wed May 20 14:31:02 2015
New Revision: 15260
Log:
Fix unhandled syscall: unix:473 (readlinkat) on OS X 10.10
bz#344936
Before:
== 595 tests, 229 stderr failures, 23 stdout failures, 1 stderrB failure, 1 stdoutB failure, 30 post failures ==
After:
== 595 tests, 228 stderr failures, 23 stdout failures, 1 stderrB failure, 1 stdoutB failure, 30 post failures ==
Modified:
trunk/NEWS
trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
trunk/coregrind/m_syswrap/syswrap-darwin.c
trunk/include/vki/vki-scnums-darwin.h
trunk/none/tests/procfs-non-linux.stderr.exp
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed May 20 14:31:02 2015
@@ -175,6 +175,7 @@
344621 Fix memcheck/tests/err_disable4 test on OS X
344686 Fix suppression for pthread_rwlock_init on OS X 10.10
344702 Fix missing libobjc suppressions on OS X 10.10
+344936 Fix unhandled syscall: unix:473 (readlinkat) on OS X 10.10
344939 Fix memcheck/tests/xml1 on OS X 10.10
345016 helgrind/tests/locked_vs_unlocked2 is failing sometimes
345079 Fix build problems in VEX/useful/test_main.c
Modified: trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
==============================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-darwin.h (original)
+++ trunk/coregrind/m_syswrap/priv_syswrap-darwin.h Wed May 20 14:31:02 2015
@@ -547,7 +547,7 @@
// NYI fstatat64 // 470
// NYI linkat // 471
// NYI unlinkat // 472
-// NYI readlinkat // 473
+DECL_TEMPLATE(darwin, readlinkat); // 473
// NYI symlinkat // 474
// NYI mkdirat // 475
// NYI getattrlistat // 476
Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c Wed May 20 14:31:02 2015
@@ -9308,6 +9308,28 @@
POST_MEM_WRITE(ARG3, ARG4);
}
+PRE(readlinkat)
+{
+ Word saved = SYSNO;
+
+ PRINT("readlinkat ( %ld, %#lx(%s), %#lx, %llu )", ARG1,ARG2,(char*)ARG2,ARG3,(ULong)ARG4);
+ PRE_REG_READ4(long, "readlinkat",
+ int, dfd, const char *, path, char *, buf, int, bufsiz);
+ PRE_MEM_RASCIIZ( "readlinkat(path)", ARG2 );
+ PRE_MEM_WRITE( "readlinkat(buf)", ARG3,ARG4 );
+
+ /*
+ * Refer to coregrind/m_syswrap/syswrap-linux.c
+ */
+ {
+ /* Normal case */
+ SET_STATUS_from_SysRes( VG_(do_syscall4)(saved, ARG1, ARG2, ARG3, ARG4));
+ }
+
+ if (SUCCESS && RES > 0)
+ POST_MEM_WRITE( ARG3, RES );
+}
+
PRE(bsdthread_ctl)
{
// int bsdthread_ctl(user_addr_t cmd, user_addr_t arg1,
@@ -9863,6 +9885,7 @@
MACXY(__NR_sysctlbyname, sysctlbyname), // 274
MACXY(__NR_necp_match_policy, necp_match_policy), // 460
MACXY(__NR_getattrlistbulk, getattrlistbulk), // 461
+ MACX_(__NR_readlinkat, readlinkat), // 473
MACX_(__NR_bsdthread_ctl, bsdthread_ctl), // 478
MACX_(__NR_guarded_open_dprotected_np, guarded_open_dprotected_np),
MACX_(__NR_guarded_write_np, guarded_write_np),
Modified: trunk/include/vki/vki-scnums-darwin.h
==============================================================================
--- trunk/include/vki/vki-scnums-darwin.h (original)
+++ trunk/include/vki/vki-scnums-darwin.h Wed May 20 14:31:02 2015
@@ -714,6 +714,7 @@
#if DARWIN_VERS >= DARWIN_10_10
#define __NR_necp_match_policy VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(460)
#define __NR_getattrlistbulk VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(461)
+#define __NR_readlinkat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(473)
#define __NR_bsdthread_ctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(478)
#define __NR_guarded_open_dprotected_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(484)
#define __NR_guarded_write_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(485)
Modified: trunk/none/tests/procfs-non-linux.stderr.exp
==============================================================================
--- trunk/none/tests/procfs-non-linux.stderr.exp (original)
+++ trunk/none/tests/procfs-non-linux.stderr.exp Wed May 20 14:31:02 2015
@@ -5,6 +5,6 @@
open(): No such file or directory
readlink: No such file or directory
readlink: No such file or directory
-readlinkat: Function not implemented
-readlinkat: Function not implemented
+readlinkat: No such file or directory
+readlinkat: No such file or directory
|