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
(30) |
2
(8) |
3
(5) |
4
(5) |
|
5
(3) |
6
(9) |
7
(5) |
8
(14) |
9
(17) |
10
(27) |
11
(10) |
|
12
(6) |
13
(10) |
14
(7) |
15
(16) |
16
(9) |
17
(14) |
18
(8) |
|
19
(5) |
20
(13) |
21
(21) |
22
(13) |
23
(4) |
24
(1) |
25
(4) |
|
26
(2) |
27
(7) |
28
(4) |
29
(5) |
30
(12) |
|
|
|
From: <sv...@va...> - 2015-04-27 14:25:00
|
Author: florian
Date: Mon Apr 27 15:24:48 2015
New Revision: 3144
Log:
Remove VexGuestTILEGXStateAlignment as the guest state size of any architecture
must satisfy the LibVEX_GUEST_STATE_ALIGN requirement. So use that instead.
Modified:
trunk/priv/main_main.c
trunk/pub/libvex_guest_tilegx.h
Modified: trunk/priv/main_main.c
==============================================================================
--- trunk/priv/main_main.c (original)
+++ trunk/priv/main_main.c Mon Apr 27 15:24:48 2015
@@ -802,7 +802,7 @@
offB_HOST_EvC_FAILADDR = offsetof(VexGuestTILEGXState,host_EvC_FAILADDR);
vassert(vta->archinfo_guest.endness == VexEndnessLE);
vassert(0 ==
- sizeof(VexGuestTILEGXState) % VexGuestTILEGXStateAlignment);
+ sizeof(VexGuestTILEGXState) % LibVEX_GUEST_STATE_ALIGN);
vassert(sizeof( ((VexGuestTILEGXState*)0)->guest_CMSTART ) == 8);
vassert(sizeof( ((VexGuestTILEGXState*)0)->guest_CMLEN ) == 8);
vassert(sizeof( ((VexGuestTILEGXState*)0)->guest_NRADDR ) == 8);
Modified: trunk/pub/libvex_guest_tilegx.h
==============================================================================
--- trunk/pub/libvex_guest_tilegx.h (original)
+++ trunk/pub/libvex_guest_tilegx.h Mon Apr 27 15:24:48 2015
@@ -127,7 +127,6 @@
} VexGuestTILEGXState;
-#define VexGuestTILEGXStateAlignment 16
#define OFFSET_tilegx_r(_N) (8 * (_N))
/*---------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2015-04-27 14:05:00
|
Author: florian
Date: Mon Apr 27 15:04:52 2015
New Revision: 15146
Log:
Fix an outdated comment as pointed out in BZ #211256.
Modified:
trunk/NEWS
trunk/coregrind/launcher-linux.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Apr 27 15:04:52 2015
@@ -72,6 +72,7 @@
201435 Fix Darwin: -v does not show kernel version
210028 ppc32: Unhandled instruction vmhraddshs
= 338095
+211256 Fixed an outdated comment regarding the default platform.
211926 Avoid compilation warnings in valgrind.h with -pedantic
226609 Crediting upstream authors in man page
231257 Valgrind omits path when executing script from shebang line
Modified: trunk/coregrind/launcher-linux.c
==============================================================================
--- trunk/coregrind/launcher-linux.c (original)
+++ trunk/coregrind/launcher-linux.c Mon Apr 27 15:04:52 2015
@@ -341,14 +341,11 @@
}
/* Select a platform to use if we can't decide that by looking at
- the executable (eg because it's a shell script). Note that the
- default_platform is not necessarily either the primary or
- secondary build target. Instead it's chosen to maximise the
- chances that /bin/sh will work on it. Hence for a primary
- target of ppc64-linux we still choose ppc32-linux as the default
- target, because on most ppc64-linux setups, the basic /bin,
- /usr/bin, etc, stuff is built in 32-bit mode, not 64-bit
- mode. */
+ the executable (eg because it's a shell script). VG_PLATFORM is the
+ default_platform. Its value is defined in coregrind/Makefile.am and
+ typically it is the primary build target. Unless the primary build
+ target is not built is not built in which case VG_PLATFORM is the
+ secondary build target. */
if ((0==strcmp(VG_PLATFORM,"x86-linux")) ||
(0==strcmp(VG_PLATFORM,"amd64-linux")) ||
(0==strcmp(VG_PLATFORM,"ppc32-linux")) ||
|
|
From: Florian K. <fl...@ei...> - 2015-04-27 08:44:17
|
The ppc instruction decoder generates misleading error messages. This happens for instance for an altivec insn when the host does not have altivec support. E.g. disInstr(ppc): declined to decode an AltiVec insn. disInstr(ppc): unhandled instruction: 0x7E8029CE This is misleading and conceptually wrong. Decoding an insn and generating code for it are two different issues that need to be distinguished. If the insn cannot be decoded, a decoder failure should be reported. If we cannot generate code for the insn due to insufficient host capabilities, an emulation failure should be reported. This is what is done for s390. If you're interested search for emulation_failure in guest_s390_toIR.c Yesterday I was mislead and marked a bunch of BZ's related to unsupported altivec insns as fixed. I should probably add a clarifying comment that the insn is only supported on a host with altivec capabilities. But I'm not sure that assumption is correct. Is it ? Florian |
|
From: <sv...@va...> - 2015-04-26 19:24:04
|
Author: florian
Date: Sun Apr 26 20:23:56 2015
New Revision: 15145
Log:
Update. Mostly ppc insns that appear to have been fixed
Modified:
trunk/NEWS
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sun Apr 26 20:23:56 2015
@@ -62,13 +62,21 @@
where XXXXXX is the bug number as listed below.
116002 VG_(printf): Problems with justification of strings and integers
+126028 ppc32: Unhandled instruction mtfsb1
+131797 ppc32: Unhandled instruction twlle
+150526 ppc32: Unhandled instruction 0x7D29571E
155125 avoid cutting away file:lineno after long function name
+184711 ppc: Unhandled instruction mfpvr
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
+210028 ppc32: Unhandled instruction vmhraddshs
+ = 338095
211926 Avoid compilation warnings in valgrind.h with -pedantic
226609 Crediting upstream authors in man page
231257 Valgrind omits path when executing script from shebang line
269360 s390x: Fix addressing mode selection for compare-and-swap
+275814 ppc: Unhandled instructions 0x7D295F1E and 0x7D295F5E and vmhaddshs
333051 mmap of huge pages fails due to incorrect alignment
== 339163
334802 valgrind does not always explain why a given option is bad
|
|
From: Matthias S. <zz...@ge...> - 2015-04-26 19:12:23
|
On 12.04.2015 20:53, Matthias Schwarzott wrote: > Hi there! > > When executing valgrind automatically on a server, I sometimes wonder if > a process did finish successfully or did call abort (or was killed in > some other way). > I modified valgrind to always print the info about a terminating signal to the xml output. Patch is attached here: https://bugs.kde.org/show_bug.cgi?id=191069 About always printing the signal to normal stderr: Maybe there should be a cmdline option to enable this. Regards Matthias |
|
From: <sv...@va...> - 2015-04-25 18:23:29
|
Author: florian
Date: Sat Apr 25 19:23:21 2015
New Revision: 15144
Log:
Fix BZ #342683. Based on patch by Ivo Raisr.
What this does is to make sure that the initial client data segment
is marked as unaddressable. This is consistent with the behaviour of
brk when the data segment is shrunk. The "freed" memory is marked
as unaddressable.
Special tweaks were needed for s390 which was returning early from
the funtion to avoid sloppy register definedness initialisation.
Modified:
trunk/NEWS
trunk/coregrind/m_initimg/initimg-linux.c
trunk/memcheck/tests/dw4.stderr.exp
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sat Apr 25 19:23:21 2015
@@ -108,6 +108,7 @@
342353 Allow dumping full massif output while valgrind is still running
342603 Add I2C_SMBUS ioctl support
342635 OS X 10.10 (Yosemite) - missing system calls and fcntl code
+342683 Mark memory past the initial brk limit as unaddressable
342795 Internal glibc __GI_mempcpy call should be intercepted
343012 Unhandled syscall 319 (memfd_create)
343069 Patch updating v4l2 API support
Modified: trunk/coregrind/m_initimg/initimg-linux.c
==============================================================================
--- trunk/coregrind/m_initimg/initimg-linux.c (original)
+++ trunk/coregrind/m_initimg/initimg-linux.c Sat Apr 25 19:23:21 2015
@@ -1143,7 +1143,12 @@
VG_TRACK(post_reg_write, Vg_CoreStartup, /*tid*/1, VG_O_STACK_PTR, 8);
VG_TRACK(post_reg_write, Vg_CoreStartup, /*tid*/1, VG_O_FPC_REG, 4);
VG_TRACK(post_reg_write, Vg_CoreStartup, /*tid*/1, VG_O_INSTR_PTR, 8);
- return;
+
+ /* At the end of this function there is code to mark all guest state
+ registers as defined. For s390 that would be wrong, because the ABI
+ says that all registers except SP, IA, and FPC are undefined upon
+ process startup. */
+#define PRECISE_GUEST_REG_DEFINEDNESS_AT_STARTUP 1
# elif defined(VGP_mips32_linux)
vg_assert(0 == sizeof(VexGuestMIPS32State) % 16);
@@ -1192,9 +1197,20 @@
# error Unknown platform
# endif
+# if !defined(PRECISE_GUEST_REG_DEFINEDNESS_AT_STARTUP)
/* Tell the tool that we just wrote to the registers. */
VG_TRACK( post_reg_write, Vg_CoreStartup, /*tid*/1, /*offset*/0,
sizeof(VexGuestArchState));
+# endif
+
+ /* Tell the tool about the client data segment and then kill it which will
+ make it inaccessible/unaddressable. */
+ const NSegment *seg = VG_(am_find_nsegment)(VG_(brk_base));
+ vg_assert(seg);
+ vg_assert(seg->kind == SkAnonC);
+ VG_TRACK(new_mem_brk, VG_(brk_base), seg->end + 1 - VG_(brk_base),
+ 1/*tid*/);
+ VG_TRACK(die_mem_brk, VG_(brk_base), seg->end + 1 - VG_(brk_base));
}
#endif // defined(VGO_linux)
Modified: trunk/memcheck/tests/dw4.stderr.exp
==============================================================================
--- trunk/memcheck/tests/dw4.stderr.exp (original)
+++ trunk/memcheck/tests/dw4.stderr.exp Sat Apr 25 19:23:21 2015
@@ -27,8 +27,8 @@
by 0x........: main (dw4.c:82)
Address 0x........ is in a rw- mapped file valgrind-dw4-test.PID segment
-Uninitialised byte(s) found during client check request
- at 0x........: croak (dw4.c:32)
+Unaddressable byte(s) found during client check request
+ at 0x........: croak (dw4.c:25)
by 0x........: main (dw4.c:87)
Address 0x........ is 0 bytes after the brk data segment limit 0x........
|
|
From: <sv...@va...> - 2015-04-25 18:14:24
|
Author: florian
Date: Sat Apr 25 19:14:17 2015
New Revision: 15143
Log:
Fix the writev / readv wrappers. Do not read the array pointed to
by the 2nd argument, if the element count is negative.
Modified:
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/memcheck/tests/writev1.c
trunk/memcheck/tests/writev1.stderr.exp
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-generic.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c Sat Apr 25 19:14:17 2015
@@ -4006,7 +4006,8 @@
if (!ML_(fd_allowed)(ARG1, "readv", tid, False)) {
SET_STATUS_Failure( VKI_EBADF );
} else {
- PRE_MEM_READ( "readv(vector)", ARG2, ARG3 * sizeof(struct vki_iovec) );
+ if ((Int)ARG3 >= 0)
+ PRE_MEM_READ( "readv(vector)", ARG2, ARG3 * sizeof(struct vki_iovec) );
if (ARG2 != 0) {
/* ToDo: don't do any of the following if the vector is invalid */
@@ -4335,8 +4336,9 @@
if (!ML_(fd_allowed)(ARG1, "writev", tid, False)) {
SET_STATUS_Failure( VKI_EBADF );
} else {
- PRE_MEM_READ( "writev(vector)",
- ARG2, ARG3 * sizeof(struct vki_iovec) );
+ if ((Int)ARG3 >= 0)
+ PRE_MEM_READ( "writev(vector)",
+ ARG2, ARG3 * sizeof(struct vki_iovec) );
if (ARG2 != 0) {
/* ToDo: don't do any of the following if the vector is invalid */
vec = (struct vki_iovec *)ARG2;
Modified: trunk/memcheck/tests/writev1.c
==============================================================================
--- trunk/memcheck/tests/writev1.c (original)
+++ trunk/memcheck/tests/writev1.c Sat Apr 25 19:14:17 2015
@@ -80,7 +80,7 @@
fprintf(stderr, "expected errno = EINVAL, got %d\n", errno);
}
else
- fprintf(stderr, "Error writev returned a positive value\n");
+ fprintf(stderr, "Error readv returned a positive value\n");
unlink(f_name);
Modified: trunk/memcheck/tests/writev1.stderr.exp
==============================================================================
--- trunk/memcheck/tests/writev1.stderr.exp (original)
+++ trunk/memcheck/tests/writev1.stderr.exp Sat Apr 25 19:14:17 2015
@@ -5,15 +5,5 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Received EFAULT as expected
-Syscall param writev(vector) points to unaddressable byte(s)
- ...
- by 0x........: main (writev1.c:68)
- Address 0x........ is not stack'd, malloc'd or (recently) free'd
-
Received EINVAL as expected
-Syscall param readv(vector) points to unaddressable byte(s)
- ...
- by 0x........: main (writev1.c:76)
- Address 0x........ is not stack'd, malloc'd or (recently) free'd
-
Received EINVAL as expected
|
|
From: <sv...@va...> - 2015-04-25 14:53:43
|
Author: philippe
Date: Sat Apr 25 15:53:35 2015
New Revision: 15142
Log:
Replace adler32 by sdbm_hash in m_deduppoolalloc.c
adler32 is not very good as a hash function.
sdbm_hash gives more different keys that adler32,
and in a large majority of the cases, shorter chains.
Modified:
trunk/coregrind/m_deduppoolalloc.c
Modified: trunk/coregrind/m_deduppoolalloc.c
==============================================================================
--- trunk/coregrind/m_deduppoolalloc.c (original)
+++ trunk/coregrind/m_deduppoolalloc.c Sat Apr 25 15:53:35 2015
@@ -231,6 +231,19 @@
ddpa->ht_node_pa = NULL;
}
+
+// hash function used by gawk and SDBM.
+static UInt sdbm_hash (const UChar* buf, UInt len )
+{
+ UInt h;
+ UInt i;
+
+ h = 0;
+ for (i = 0; i < len; i++)
+ h = *buf++ + (h<<6) + (h<<16) - h;
+ return h;
+}
+
const void* VG_(allocEltDedupPA) (DedupPoolAlloc *ddpa, SizeT eltSzB,
const void *elt)
{
@@ -243,14 +256,7 @@
ddpa->nr_alloc_calls++;
- // Currently using adler32 as hash function.
- // Many references tells adler32 is bad as a hash function.
- // And effectively, some tests on dwarf debug string shows
- // a lot of collisions (at least for short elements).
- // (A lot can be 10% of the elements colliding, even on
- // small nr of elements such as 10_000).
- ht_elt.key = VG_(adler32) (0, NULL, 0);
- ht_elt.key = VG_(adler32) (ht_elt.key, elt, eltSzB);
+ ht_elt.key = sdbm_hash (elt, eltSzB);
ht_elt.eltSzB = eltSzB;
ht_elt.elt = elt;
|
|
From: <sv...@va...> - 2015-04-25 14:00:32
|
Author: philippe
Date: Sat Apr 25 15:00:24 2015
New Revision: 15141
Log:
Give statistics about RCEC helgrind hash table chains.
Improve statistic in coregrind hash table
Modified:
trunk/coregrind/m_hashtable.c
trunk/helgrind/libhb_core.c
Modified: trunk/coregrind/m_hashtable.c
==============================================================================
--- trunk/coregrind/m_hashtable.c (original)
+++ trunk/coregrind/m_hashtable.c Sat Apr 25 15:00:24 2015
@@ -320,8 +320,11 @@
ncno += cno_occurences[i];
}
VG_(message)(Vg_DebugMsg,
- "total nr of unique chains: %6d, keys %6d, elts %6d\n",
- ncno, nkey, nelt);
+ "total nr of unique slots: %6d, keys %6d, elts %6d."
+ " Avg chain len %3.1f\n",
+ ncno, nkey, nelt,
+ (Double)nelt/(Double)(ncno == cno_occurences[0] ?
+ 1 : ncno - cno_occurences[0]));
}
Modified: trunk/helgrind/libhb_core.c
==============================================================================
--- trunk/helgrind/libhb_core.c (original)
+++ trunk/helgrind/libhb_core.c Sat Apr 25 15:00:24 2015
@@ -911,10 +911,10 @@
*fixp = (Word)i;
return;
}
- }
+ }
- /*NOTREACHED*/
- tl_assert(0);
+ /*NOTREACHED*/
+ tl_assert(0);
}
@@ -6159,6 +6159,40 @@
(UWord)N_RCEC_TAB,
stats__ctxt_tab_curr, RCEC_referenced,
stats__ctxt_tab_max );
+ {
+# define MAXCHAIN 10
+ UInt chains[MAXCHAIN+1]; // [MAXCHAIN] gets all chains >= MAXCHAIN
+ UInt non0chain = 0;
+ UInt n;
+ UInt i;
+ RCEC *p;
+
+ for (i = 0; i <= MAXCHAIN; i++) chains[i] = 0;
+ for (i = 0; i < N_RCEC_TAB; i++) {
+ n = 0;
+ for (p = contextTab[i]; p; p = p->next)
+ n++;
+ if (n < MAXCHAIN)
+ chains[n]++;
+ else
+ chains[MAXCHAIN]++;
+ if (n > 0)
+ non0chain++;
+ }
+ VG_(printf)( " libhb: contextTab chain of [length]=nchain."
+ " Avg chain len %3.1f\n"
+ " ",
+ (Double)stats__ctxt_tab_curr
+ / (Double)(non0chain ? non0chain : 1));
+ for (i = 0; i <= MAXCHAIN; i++) {
+ if (chains[i] != 0)
+ VG_(printf)( "[%d%s]=%d ",
+ i, i == MAXCHAIN ? "+" : "",
+ chains[i]);
+ }
+ VG_(printf)( "\n");
+# undef MAXCHAIN
+ }
VG_(printf)( " libhb: contextTab: %lu queries, %lu cmps\n",
stats__ctxt_tab_qs,
stats__ctxt_tab_cmps );
|
|
From: <sv...@va...> - 2015-04-24 10:05:30
|
Author: florian
Date: Fri Apr 24 11:05:23 2015
New Revision: 15140
Log:
Check for any client stack segment. Rule out valgrind segments.
Modified:
trunk/coregrind/m_syswrap/syswrap-generic.c
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-generic.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c Fri Apr 24 11:05:23 2015
@@ -79,7 +79,8 @@
assume that sp starts near its highest possible value, and can
only go down to the start of the mmaped segment. */
seg = VG_(am_find_nsegment)(sp);
- if (seg && seg->kind != SkResvn) {
+ if (seg &&
+ VG_(am_is_valid_for_client)(sp, 1, VKI_PROT_READ | VKI_PROT_WRITE)) {
tst->client_stack_highest_byte = (Addr)VG_PGROUNDUP(sp)-1;
tst->client_stack_szB = tst->client_stack_highest_byte - seg->start + 1;
|
|
From: <sv...@va...> - 2015-04-23 21:28:19
|
Author: philippe
Date: Thu Apr 23 22:28:12 2015
New Revision: 15139
Log:
Add some internal documentation for 'svn ignore' maintenance;
reference it from README_DEVELOPERS_processes
Added:
trunk/docs/internals/svn-HOWTO.txt
Modified:
trunk/README_DEVELOPERS_processes
Modified: trunk/README_DEVELOPERS_processes
==============================================================================
--- trunk/README_DEVELOPERS_processes (original)
+++ trunk/README_DEVELOPERS_processes Thu Apr 23 22:28:12 2015
@@ -12,6 +12,9 @@
* Major release production:
See docs/internals/release-HOWTO.txt (currently a bit out of date)
+* Various guidelines/recommended usage for valgrind SVN
+ See docs/internals/svn-HOWTO.txt
+
* Minor/correction release production: TBD
Added: trunk/docs/internals/svn-HOWTO.txt
==============================================================================
--- trunk/docs/internals/svn-HOWTO.txt (added)
+++ trunk/docs/internals/svn-HOWTO.txt Thu Apr 23 22:28:12 2015
@@ -0,0 +1,38 @@
+-----------------------------------------------------------------------------
+Various guidelines/recommended usage for valgrind SVN
+-----------------------------------------------------------------------------
+
+Update the ignore property
+==========================
+For various type of files, the ignore property of the directory
+containing these files is to be updated.
+
+* Here is an example for a new test case:
+ $ svn stat
+ ? memcheck/tests/ppc32/power_ISA2_07
+ ? memcheck/tests/ppc64/power_ISA2_07
+
+ Grrr.....
+
+ $ cd memcheck/tests/ppc32
+ $ svn propget svn:ignore . > ignore-me
+ ...edit ignore-me, add executable to the list...
+ $ svn propset svn:ignore . -F ignore-me
+ $ rm ignore-me
+ $ svn commit
+
+ This is best done when a new testcase is added.
+
+* When adding a directory, look at the ignore property of a similar
+ directory for inspiration e.g.
+ $ svn propget svn:ignore auxprogs
+ .deps
+ getoff-amd64-darwin
+ getoff-x86-darwin
+ ...
+ libmpiwrap-x86-darwin.so.dSYM
+ Makefile
+ Makefile.in
+ valgrind-di-server
+ valgrind-listener
+
|
|
From: <sv...@va...> - 2015-04-23 15:20:11
|
Author: florian
Date: Thu Apr 23 16:20:00 2015
New Revision: 15138
Log:
Fix an assertion in the address space manager. BZ #345887.
The VG_(extend_stack) call needs to be properly guarded because the
passed-in address is not necessarily part of an extensible stack
segment. And an extensible stack segment is the only thing that
function should have to deal with.
Previously, the function VG_(am_addr_is_in_extensible_client_stack)
was introduced to guard VG_(extend_stack) but it was not added in all
places it should have been.
Also, extending the client stack during signal delivery (in sigframe-common.c)
was simply calling VG_(extend_stack) hoping it would do the right thing.
But that was not always the case. The new testcase
none/tests/linux/pthread-stack.c exercises this (3.10.1 errors out on it).
Renamed ML_(sf_extend_stack) to ML_(sf_maybe_extend_stack) and add
proper guard logic for VG_(extend_stack).
Testcases none/tests/{amd64|x86}-linux/bug345887.c by Ivo Raisr.
Added:
trunk/none/tests/amd64-linux/ (with props)
trunk/none/tests/amd64-linux/Makefile.am
trunk/none/tests/amd64-linux/bug345887.c
trunk/none/tests/amd64-linux/bug345887.stderr.exp
trunk/none/tests/amd64-linux/bug345887.vgtest
trunk/none/tests/amd64-linux/filter_minimal (with props)
trunk/none/tests/amd64-linux/filter_stderr (with props)
trunk/none/tests/linux/pthread-stack.c
trunk/none/tests/linux/pthread-stack.stderr.exp
trunk/none/tests/linux/pthread-stack.vgtest
trunk/none/tests/x86-linux/bug345887.c
trunk/none/tests/x86-linux/bug345887.stderr.exp
trunk/none/tests/x86-linux/bug345887.vgtest
trunk/none/tests/x86-linux/filter_minimal (with props)
Modified:
trunk/NEWS
trunk/configure.ac
trunk/coregrind/m_sigframe/priv_sigframe.h
trunk/coregrind/m_sigframe/sigframe-amd64-darwin.c
trunk/coregrind/m_sigframe/sigframe-amd64-linux.c
trunk/coregrind/m_sigframe/sigframe-arm-linux.c
trunk/coregrind/m_sigframe/sigframe-arm64-linux.c
trunk/coregrind/m_sigframe/sigframe-common.c
trunk/coregrind/m_sigframe/sigframe-mips32-linux.c
trunk/coregrind/m_sigframe/sigframe-mips64-linux.c
trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c
trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c
trunk/coregrind/m_sigframe/sigframe-s390x-linux.c
trunk/coregrind/m_sigframe/sigframe-tilegx-linux.c
trunk/coregrind/m_sigframe/sigframe-x86-darwin.c
trunk/coregrind/m_sigframe/sigframe-x86-linux.c
trunk/coregrind/m_signals.c
trunk/none/tests/Makefile.am
trunk/none/tests/linux/ (props changed)
trunk/none/tests/linux/Makefile.am
trunk/none/tests/x86-linux/ (props changed)
trunk/none/tests/x86-linux/Makefile.am
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Thu Apr 23 16:20:00 2015
@@ -151,6 +151,7 @@
345016 helgrind/tests/locked_vs_unlocked2 is failing sometimes
345394 Fix memcheck/tests/strchr on OS X
345637 Fix memcheck/tests/sendmsg on OS X
+345887 Fix an assertion in the address space manager
346307 fuse filesystem syscall deadlocks
n-i-bz Provide implementations of certain compiler builtins to support
compilers who may not provide those
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Thu Apr 23 16:20:00 2015
@@ -3033,6 +3033,7 @@
none/tests/tilegx/Makefile
none/tests/linux/Makefile
none/tests/darwin/Makefile
+ none/tests/amd64-linux/Makefile
none/tests/x86-linux/Makefile
exp-sgcheck/Makefile
exp-sgcheck/tests/Makefile
Modified: trunk/coregrind/m_sigframe/priv_sigframe.h
==============================================================================
--- trunk/coregrind/m_sigframe/priv_sigframe.h (original)
+++ trunk/coregrind/m_sigframe/priv_sigframe.h Thu Apr 23 16:20:00 2015
@@ -37,7 +37,8 @@
/* --------------- Implemented in sigframe-common.c ---------------*/
-Bool ML_(sf_extend_stack)( const ThreadState *tst, Addr addr, SizeT size );
+Bool ML_(sf_maybe_extend_stack)( const ThreadState *tst, Addr addr,
+ SizeT size, UInt flags );
#endif // __PRIV_SIGFRAME_H
Modified: trunk/coregrind/m_sigframe/sigframe-amd64-darwin.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-amd64-darwin.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-amd64-darwin.c Thu Apr 23 16:20:00 2015
@@ -109,7 +109,7 @@
entry to a function. */
tst = VG_(get_ThreadState)(tid);
- if (! ML_(sf_extend_stack)(tst, rsp, sp_top_of_frame - rsp))
+ if (! ML_(sf_maybe_extend_stack)(tst, rsp, sp_top_of_frame - rsp, flags))
return;
vg_assert(VG_IS_16_ALIGNED(rsp+8));
Modified: trunk/coregrind/m_sigframe/sigframe-amd64-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-amd64-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-amd64-linux.c Thu Apr 23 16:20:00 2015
@@ -412,7 +412,7 @@
rsp = VG_ROUNDDN(rsp, 16) - 8;
frame = (struct rt_sigframe *)rsp;
- if (! ML_(sf_extend_stack)(tst, rsp, sizeof(*frame)))
+ if (! ML_(sf_maybe_extend_stack)(tst, rsp, sizeof(*frame), flags))
return rsp_top_of_frame;
/* retaddr, siginfo, uContext fields are to be written */
Modified: trunk/coregrind/m_sigframe/sigframe-arm-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-arm-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-arm-linux.c Thu Apr 23 16:20:00 2015
@@ -185,7 +185,7 @@
sp -= size;
sp = VG_ROUNDDN(sp, 16);
- if(! ML_(sf_extend_stack)(tst, sp, size))
+ if (! ML_(sf_maybe_extend_stack)(tst, sp, size, flags))
I_die_here; // XXX Incorrect behavior
Modified: trunk/coregrind/m_sigframe/sigframe-arm64-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-arm64-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-arm64-linux.c Thu Apr 23 16:20:00 2015
@@ -173,7 +173,7 @@
sp -= size;
sp = VG_ROUNDDN(sp, 16);
- if (! ML_(sf_extend_stack)(tst, sp, size))
+ if (! ML_(sf_maybe_extend_stack)(tst, sp, size, flags))
return; // Give up. No idea if this is correct
struct rt_sigframe *rsf = (struct rt_sigframe *)sp;
Modified: trunk/coregrind/m_sigframe/sigframe-common.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-common.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-common.c Thu Apr 23 16:20:00 2015
@@ -54,16 +54,31 @@
/* Extend the stack segment downwards if needed so as to ensure the
new signal frames are mapped to something. Return a Bool
indicating whether or not the operation was successful. */
-Bool ML_(sf_extend_stack) ( const ThreadState *tst, Addr addr, SizeT size )
+Bool ML_(sf_maybe_extend_stack) ( const ThreadState *tst, Addr addr,
+ SizeT size, UInt flags )
{
ThreadId tid = tst->tid;
const NSegment *stackseg = NULL;
- if (VG_(extend_stack)(tid, addr)) {
+ if (flags & VKI_SA_ONSTACK) {
+ /* 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);
- if (0 && stackseg)
- VG_(printf)("frame=%#lx seg=%#lx-%#lx\n",
- addr, stackseg->start, stackseg->end);
+ } else if (VG_(am_addr_is_in_extensible_client_stack)(addr)) {
+ if (VG_(extend_stack)(tid, addr)) {
+ stackseg = VG_(am_find_nsegment)(addr);
+ if (0 && stackseg)
+ VG_(printf)("frame=%#lx seg=%#lx-%#lx\n",
+ addr, stackseg->start, stackseg->end);
+ }
+ } else if ((stackseg = VG_(am_find_nsegment)(addr)) &&
+ VG_(am_is_valid_for_client)(addr, 1,
+ VKI_PROT_READ | VKI_PROT_WRITE)) {
+ /* We come here for explicitly defined pthread-stacks which can be
+ located in any client segment. */
+ } else {
+ /* Something unexpected */
+ stackseg = NULL;
}
if (stackseg == NULL || !stackseg->hasR || !stackseg->hasW) {
Modified: trunk/coregrind/m_sigframe/sigframe-mips32-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-mips32-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-mips32-linux.c Thu Apr 23 16:20:00 2015
@@ -148,7 +148,7 @@
}
tst = VG_(get_ThreadState)(tid);
- if (! ML_(sf_extend_stack)(tst, sp, sp_top_of_frame - sp))
+ if (! ML_(sf_maybe_extend_stack)(tst, sp, sp_top_of_frame - sp, flags))
return;
vg_assert(VG_IS_8_ALIGNED(sp));
Modified: trunk/coregrind/m_sigframe/sigframe-mips64-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-mips64-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-mips64-linux.c Thu Apr 23 16:20:00 2015
@@ -135,7 +135,7 @@
sp = sp_top_of_frame - sizeof(struct rt_sigframe);
tst = VG_(get_ThreadState)(tid);
- if (! ML_(sf_extend_stack)(tst, sp, sp_top_of_frame - sp))
+ if (! ML_(sf_maybe_extend_stack)(tst, sp, sp_top_of_frame - sp, flags))
return;
sp = VG_ROUNDDN(sp, 16);
Modified: trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c Thu Apr 23 16:20:00 2015
@@ -650,7 +650,7 @@
tst = VG_(get_ThreadState)(tid);
- if (! ML_(sf_extend_stack)(tst, sp, sp_top_of_frame - sp))
+ if (! ML_(sf_maybe_extend_stack)(tst, sp, sp_top_of_frame - sp, flags))
return;
vg_assert(VG_IS_16_ALIGNED(sp));
Modified: trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c Thu Apr 23 16:20:00 2015
@@ -158,7 +158,7 @@
sp = sp_top_of_frame - sizeof(struct rt_sigframe);
tst = VG_(get_ThreadState)(tid);
- if (! ML_(sf_extend_stack)(tst, sp, sp_top_of_frame - sp))
+ if (! ML_(sf_maybe_extend_stack)(tst, sp, sp_top_of_frame - sp, flags))
return;
vg_assert(VG_IS_16_ALIGNED(sp));
Modified: trunk/coregrind/m_sigframe/sigframe-s390x-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-s390x-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-s390x-linux.c Thu Apr 23 16:20:00 2015
@@ -298,7 +298,7 @@
sp -= sizeof(*frame);
frame = (struct sigframe *)sp;
- if (! ML_(sf_extend_stack)(tst, sp, sizeof(*frame)))
+ if (! ML_(sf_maybe_extend_stack)(tst, sp, sizeof(*frame), flags))
return sp_top_of_frame;
/* retcode, sigNo, sc, sregs fields are to be written */
@@ -358,7 +358,7 @@
sp -= sizeof(*frame);
frame = (struct rt_sigframe *)sp;
- if (! ML_(sf_extend_stack)(tst, sp, sizeof(*frame)))
+ if (! ML_(sf_maybe_extend_stack)(tst, sp, sizeof(*frame), flags))
return sp_top_of_frame;
/* retcode, sigNo, sc, sregs fields are to be written */
Modified: trunk/coregrind/m_sigframe/sigframe-tilegx-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-tilegx-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-tilegx-linux.c Thu Apr 23 16:20:00 2015
@@ -158,7 +158,7 @@
sp = sp_top_of_frame - sizeof(struct rt_sigframe);
tst = VG_(get_ThreadState)(tid);
- if (! ML_(sf_extend_stack)(tst, sp, sizeof(struct rt_sigframe)))
+ if (! ML_(sf_maybe_extend_stack)(tst, sp, sizeof(struct rt_sigframe), flags))
return;
vg_assert(VG_IS_8_ALIGNED(sp));
Modified: trunk/coregrind/m_sigframe/sigframe-x86-darwin.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-x86-darwin.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-x86-darwin.c Thu Apr 23 16:20:00 2015
@@ -112,7 +112,7 @@
entry to a function. */
tst = VG_(get_ThreadState)(tid);
- if (! ML_(sf_extend_stack)(tst, esp, sp_top_of_frame - esp))
+ if (! ML_(sf_maybe_extend_stack)(tst, esp, sp_top_of_frame - esp, flags))
return;
vg_assert(VG_IS_16_ALIGNED(esp+4));
Modified: trunk/coregrind/m_sigframe/sigframe-x86-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-x86-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-x86-linux.c Thu Apr 23 16:20:00 2015
@@ -434,7 +434,7 @@
esp = VG_ROUNDDN(esp, 16);
frame = (struct sigframe *)esp;
- if (! ML_(sf_extend_stack)(tst, esp, sizeof(*frame)))
+ if (! ML_(sf_maybe_extend_stack)(tst, esp, sizeof(*frame), flags))
return esp_top_of_frame;
/* retaddr, sigNo, siguContext fields are to be written */
@@ -491,7 +491,7 @@
esp = VG_ROUNDDN(esp, 16);
frame = (struct rt_sigframe *)esp;
- if (! ML_(sf_extend_stack)(tst, esp, sizeof(*frame)))
+ if (! ML_(sf_maybe_extend_stack)(tst, esp, sizeof(*frame), flags))
return esp_top_of_frame;
/* retaddr, sigNo, pSiginfo, puContext fields are to be written */
Modified: trunk/coregrind/m_signals.c
==============================================================================
--- trunk/coregrind/m_signals.c (original)
+++ trunk/coregrind/m_signals.c Thu Apr 23 16:20:00 2015
@@ -1737,7 +1737,8 @@
if (tid == 1) { // main thread
Addr esp = VG_(get_SP)(tid);
Addr base = VG_PGROUNDDN(esp - VG_STACK_REDZONE_SZB);
- if (VG_(extend_stack)(tid, base)) {
+ if (VG_(am_addr_is_in_extensible_client_stack)(base) &&
+ VG_(extend_stack)(tid, base)) {
if (VG_(clo_trace_signals))
VG_(dmsg)(" -> extended stack base to %#lx\n",
VG_PGROUNDDN(esp));
@@ -2462,7 +2463,8 @@
then extend the stack segment.
*/
Addr base = VG_PGROUNDDN(esp - VG_STACK_REDZONE_SZB);
- if (VG_(extend_stack)(tid, base)) {
+ if (VG_(am_addr_is_in_extensible_client_stack)(base) &&
+ VG_(extend_stack)(tid, base)) {
if (VG_(clo_trace_signals))
VG_(dmsg)(" -> extended stack base to %#lx\n",
VG_PGROUNDDN(fault));
Modified: trunk/none/tests/Makefile.am
==============================================================================
--- trunk/none/tests/Makefile.am (original)
+++ trunk/none/tests/Makefile.am Thu Apr 23 16:20:00 2015
@@ -45,12 +45,15 @@
endif
# Platform-specific tests
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
+SUBDIRS += amd64-linux
+endif
if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
SUBDIRS += x86-linux
endif
DIST_SUBDIRS = x86 amd64 ppc32 ppc64 arm arm64 s390x mips32 mips64 tilegx \
- linux darwin x86-linux scripts .
+ linux darwin amd64-linux x86-linux scripts .
dist_noinst_SCRIPTS = \
filter_cmdline0 \
Added: trunk/none/tests/amd64-linux/Makefile.am
==============================================================================
--- trunk/none/tests/amd64-linux/Makefile.am (added)
+++ trunk/none/tests/amd64-linux/Makefile.am Thu Apr 23 16:20:00 2015
@@ -0,0 +1,15 @@
+
+include $(top_srcdir)/Makefile.tool-tests.am
+
+dist_noinst_SCRIPTS = \
+ filter_stderr filter_minimal
+
+EXTRA_DIST = \
+ bug345887.stderr.exp bug345887.vgtest
+
+check_PROGRAMS = \
+ bug345887
+
+AM_CFLAGS += @FLAG_M64@
+AM_CXXFLAGS += @FLAG_M64@
+AM_CCASFLAGS += @FLAG_M64@
Added: trunk/none/tests/amd64-linux/bug345887.c
==============================================================================
--- trunk/none/tests/amd64-linux/bug345887.c (added)
+++ trunk/none/tests/amd64-linux/bug345887.c Thu Apr 23 16:20:00 2015
@@ -0,0 +1,42 @@
+/* This test used to cause an assertion in the address space manager */
+
+__attribute__((noinline))
+static void inner(void)
+{
+ /* Set registers to apriori known values. */
+ __asm__ __volatile__(
+ "movq $0x101, %%rax\n"
+ "movq $0x102, %%rbx\n"
+ "movq $0x103, %%rcx\n"
+ "movq $0x104, %%rdx\n"
+ "movq $0x105, %%rsi\n"
+ "movq $0x106, %%rdi\n"
+ "movq $0x107, %%r8\n"
+ "movq $0x108, %%r9\n"
+ "movq $0x109, %%r10\n"
+ "movq $0x10a, %%r11\n"
+ "movq $0x10b, %%r12\n"
+ "movq $0x10c, %%r13\n"
+ "movq $0x10d, %%r14\n"
+ "movq $0x10e, %%r15\n"
+ // not %rbp as mdb is then not able to reconstruct stack trace
+ "movq $0x10f, %%rsp\n"
+ "movq $0x1234, (%%rax)\n" // should cause SEGV here
+ "ud2" // should never get here
+ : // no output registers
+ : // no input registers
+ : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi",
+ "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "%rsp");
+}
+
+__attribute__((noinline))
+static void outer(void)
+{
+ inner();
+}
+
+int main(int argc, const char *argv[])
+{
+ outer();
+ return 0;
+}
Added: trunk/none/tests/amd64-linux/bug345887.stderr.exp
==============================================================================
--- trunk/none/tests/amd64-linux/bug345887.stderr.exp (added)
+++ trunk/none/tests/amd64-linux/bug345887.stderr.exp Thu Apr 23 16:20:00 2015
@@ -0,0 +1,9 @@
+
+Process terminating with default action of signal 11 (SIGSEGV)
+ Access not within mapped region at address 0x........
+ at 0x........: inner (bug345887.c:7)
+ If you believe this happened as a result of a stack
+ overflow in your program's main thread (unlikely but
+ possible), you can try to increase the size of the
+ main thread stack using the --main-stacksize= flag.
+ The main thread stack size used in this run was ....
Added: trunk/none/tests/amd64-linux/bug345887.vgtest
==============================================================================
--- trunk/none/tests/amd64-linux/bug345887.vgtest (added)
+++ trunk/none/tests/amd64-linux/bug345887.vgtest Thu Apr 23 16:20:00 2015
@@ -0,0 +1,4 @@
+prog: bug345887
+vgopts: -q
+stderr_filter: filter_minimal
+cleanup: rm -f vgcore.*
Added: trunk/none/tests/amd64-linux/filter_minimal
==============================================================================
--- trunk/none/tests/amd64-linux/filter_minimal (added)
+++ trunk/none/tests/amd64-linux/filter_minimal Thu Apr 23 16:20:00 2015
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+dir=`dirname $0`
+
+# Remove ==pid== and **pid** strings
+perl -p -e 's/(==|\*\*)[0-9]{1,7}\1 //' |
+
+perl -p -e 's/0x[0-9A-Fa-f]+/0x......../g' |
+
+# Older bash versions print abnormal termination messages on the stderr
+# of the bash process. Newer bash versions redirect such messages properly.
+# Suppress any redirected abnormal termination messages. You can find the
+# complete list of messages in the bash source file siglist.c.
+perl -n -e 'print if !/^(Segmentation fault|Alarm clock|Aborted|Bus error)( \(core dumped\))?$/' |
+
+# Remove the size in "The main thread stack size..." message.
+sed "s/The main thread stack size used in this run was [0-9]*/The main thread stack size used in this run was .../"
+
+# NOTE: it is essential for the bug345887 testcase that the stderr
+# filtering does *not* remove lines beginning with --
Added: trunk/none/tests/amd64-linux/filter_stderr
==============================================================================
--- trunk/none/tests/amd64-linux/filter_stderr (added)
+++ trunk/none/tests/amd64-linux/filter_stderr Thu Apr 23 16:20:00 2015
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+dir=`dirname $0`
+
+# Remove ==pid== and --pid-- and **pid** strings
+perl -p -e 's/(==|--|\*\*)[0-9]{1,7}\1 //' |
+
+perl -p -e 's/0x[0-9A-Fa-f]+/0x......../g'
+
+# NOTE: it is essential for the bug345887 testcase that the stderr
+# filtering does *not* remove lines beginning with --
Modified: trunk/none/tests/linux/Makefile.am
==============================================================================
--- trunk/none/tests/linux/Makefile.am (original)
+++ trunk/none/tests/linux/Makefile.am Thu Apr 23 16:20:00 2015
@@ -9,6 +9,7 @@
mremap.vgtest \
mremap2.stderr.exp mremap2.stdout.exp mremap2.vgtest \
mremap3.stderr.exp mremap3.stdout.exp mremap3.vgtest \
+ pthread-stack.stderr.exp pthread-stack.vgtest \
stack-overflow.stderr.exp stack-overflow.vgtest
check_PROGRAMS = \
@@ -16,8 +17,12 @@
mremap \
mremap2 \
mremap3 \
+ pthread-stack \
stack-overflow
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
+
+# Special needs
+pthread_stack_LDADD = -lpthread
Added: trunk/none/tests/linux/pthread-stack.c
==============================================================================
--- trunk/none/tests/linux/pthread-stack.c (added)
+++ trunk/none/tests/linux/pthread-stack.c Thu Apr 23 16:20:00 2015
@@ -0,0 +1,109 @@
+/* This test causes an error in 3.10.1 and earlier versions like so:
+
+==8336== Can't extend stack to 0x4033f98 during signal delivery for thread 2:
+==8336== no stack segment
+
+ The reason was that only AnonC segments were considered as stack
+ segments. */
+
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <pthread.h>
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+static volatile char *lowest_j;
+static jmp_buf goback;
+
+static void sigsegv_handler(int signr)
+{
+ longjmp(goback, 1);
+}
+
+static void bad_things_till_guard_page(void)
+{
+ fprintf(stderr, "... doing bad things till guard page\n");
+ char j = 0;
+ char *p = &j;
+
+ for (;;) {
+ j = j + *p;
+ p = p - 400;
+ lowest_j = p;
+ }
+}
+
+static void say_something(void)
+{
+ fprintf(stderr, "plugh\n");
+}
+
+static void* child_func ( void* arg )
+{
+ if (setjmp(goback)) {
+ say_something();
+ } else
+ bad_things_till_guard_page();
+
+ return NULL;
+}
+
+int main(int argc, const char** argv)
+{
+ int r, fd;
+
+ /* We will discover the thread guard page using SEGV.
+ So, prepare an handler. */
+ struct sigaction sa;
+ sa.sa_handler = sigsegv_handler;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = 0;
+ if (sigaction (SIGSEGV, &sa, NULL) != 0)
+ perror("sigaction");
+
+ pthread_t child;
+
+ /* Create a file that will be used as stack for a pthread. */
+ const size_t file_size = 1024 * 1024;
+ const char file_name[] = "FILE";
+ fd = open(file_name, O_CREAT|O_WRONLY,
+ S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+ assert(fd > 0);
+ void *p = malloc(file_size);
+ assert(p != 0);
+ memset(p, 0, file_size);
+ int written = write(fd, p, file_size);
+ assert(written == file_size);
+ close(fd);
+
+ /* Create a file-based stack for the child */
+ fd = open(file_name, O_CREAT|O_RDWR,
+ S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+ assert(fd > 0);
+ const size_t stack_size = 256 * 1024;
+ assert(stack_size < file_size);
+ void *stack = mmap(NULL, stack_size, PROT_READ|PROT_WRITE,
+ MAP_PRIVATE, fd, 0);
+ assert(stack != (void *)-1);
+ pthread_attr_t attr;
+ pthread_attr_init(&attr);
+ r = pthread_attr_setstack(&attr, stack, stack_size);
+ assert(r == 0);
+
+ /* Create child run */
+ r = pthread_create(&child, &attr, child_func, NULL);
+ assert(r == 0);
+ r = pthread_join(child, NULL);
+ assert(r == 0);
+
+ /* Remove file */
+ unlink(file_name);
+ return 0;
+}
+
Added: trunk/none/tests/linux/pthread-stack.stderr.exp
==============================================================================
--- trunk/none/tests/linux/pthread-stack.stderr.exp (added)
+++ trunk/none/tests/linux/pthread-stack.stderr.exp Thu Apr 23 16:20:00 2015
@@ -0,0 +1,2 @@
+... doing bad things till guard page
+plugh
Added: trunk/none/tests/linux/pthread-stack.vgtest
==============================================================================
--- trunk/none/tests/linux/pthread-stack.vgtest (added)
+++ trunk/none/tests/linux/pthread-stack.vgtest Thu Apr 23 16:20:00 2015
@@ -0,0 +1,2 @@
+prog: pthread-stack
+vgopts: -q
Modified: trunk/none/tests/x86-linux/Makefile.am
==============================================================================
--- trunk/none/tests/x86-linux/Makefile.am (original)
+++ trunk/none/tests/x86-linux/Makefile.am Thu Apr 23 16:20:00 2015
@@ -2,14 +2,16 @@
include $(top_srcdir)/Makefile.tool-tests.am
dist_noinst_SCRIPTS = \
- filter_stderr
+ filter_stderr filter_minimal
EXTRA_DIST = \
+ bug345887.stderr.exp bug345887.vgtest \
hang.stderr.exp hang.vgtest \
seg_override.stderr.exp seg_override.stdout.exp seg_override.vgtest \
sigcontext.stdout.exp sigcontext.stderr.exp sigcontext.vgtest
check_PROGRAMS = \
+ bug345887 \
hang \
seg_override \
sigcontext
@@ -17,5 +19,3 @@
AM_CFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
AM_CCASFLAGS += @FLAG_M32@
-
-
Added: trunk/none/tests/x86-linux/bug345887.c
==============================================================================
--- trunk/none/tests/x86-linux/bug345887.c (added)
+++ trunk/none/tests/x86-linux/bug345887.c Thu Apr 23 16:20:00 2015
@@ -0,0 +1,33 @@
+/* This test used to cause an assertion in the address space manager */
+
+__attribute__((noinline))
+static void inner(void)
+{
+ /* Set other registers to apriori known values. */
+ __asm__ __volatile__(
+ "movl $0x101, %%eax\n"
+ "movl $0x102, %%ebx\n"
+ "movl $0x103, %%ecx\n"
+ "movl $0x104, %%edx\n"
+ "movl $0x105, %%esi\n"
+ "movl $0x106, %%edi\n"
+ // not %ebp as mdb is then not able to reconstruct stack trace
+ "movl $0x108, %%esp\n"
+ "movl $0x1234, (%%eax)\n" // should cause SEGV here
+ "ud2" // should never get here
+ : // no output registers
+ : // no input registers
+ : "memory", "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi", "%esp");
+}
+
+__attribute__((noinline))
+static void outer(void)
+{
+ inner();
+}
+
+int main(int argc, const char *argv[])
+{
+ outer();
+ return 0;
+}
Added: trunk/none/tests/x86-linux/bug345887.stderr.exp
==============================================================================
--- trunk/none/tests/x86-linux/bug345887.stderr.exp (added)
+++ trunk/none/tests/x86-linux/bug345887.stderr.exp Thu Apr 23 16:20:00 2015
@@ -0,0 +1,9 @@
+
+Process terminating with default action of signal 11 (SIGSEGV)
+ Access not within mapped region at address 0x........
+ at 0x........: inner (bug345887.c:7)
+ If you believe this happened as a result of a stack
+ overflow in your program's main thread (unlikely but
+ possible), you can try to increase the size of the
+ main thread stack using the --main-stacksize= flag.
+ The main thread stack size used in this run was ....
Added: trunk/none/tests/x86-linux/bug345887.vgtest
==============================================================================
--- trunk/none/tests/x86-linux/bug345887.vgtest (added)
+++ trunk/none/tests/x86-linux/bug345887.vgtest Thu Apr 23 16:20:00 2015
@@ -0,0 +1,4 @@
+prog: bug345887
+vgopts: -q
+stderr_filter: filter_minimal
+cleanup: rm -f vgcore.*
Added: trunk/none/tests/x86-linux/filter_minimal
==============================================================================
--- trunk/none/tests/x86-linux/filter_minimal (added)
+++ trunk/none/tests/x86-linux/filter_minimal Thu Apr 23 16:20:00 2015
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+dir=`dirname $0`
+
+# Remove ==pid== and **pid** strings
+perl -p -e 's/(==|\*\*)[0-9]{1,7}\1 //' |
+
+perl -p -e 's/0x[0-9A-Fa-f]+/0x......../g' |
+
+# Older bash versions print abnormal termination messages on the stderr
+# of the bash process. Newer bash versions redirect such messages properly.
+# Suppress any redirected abnormal termination messages. You can find the
+# complete list of messages in the bash source file siglist.c.
+perl -n -e 'print if !/^(Segmentation fault|Alarm clock|Aborted|Bus error)( \(core dumped\))?$/' |
+
+# Remove the size in "The main thread stack size..." message.
+sed "s/The main thread stack size used in this run was [0-9]*/The main thread stack size used in this run was .../"
+
+# NOTE: it is essential for the bug345887 testcase that the stderr
+# filtering does *not* remove lines beginning with --
|
|
From: Florian K. <fl...@ei...> - 2015-04-23 13:29:56
|
$ svn stat ? memcheck/tests/ppc32/power_ISA2_07 ? memcheck/tests/ppc64/power_ISA2_07 Grrr..... $ cd memcheck/tests/ppc32 $ svn propget svn:ignore . > ignore-me ...edit ignore-me, add executable to the list... $ svn propset svn:ignore . -F ignore-me $ rm ignore-me $ svn commit This is best done when a new testcase is added. Florian |
|
From: <sv...@va...> - 2015-04-23 13:17:29
|
Author: florian
Date: Thu Apr 23 14:17:20 2015
New Revision: 15137
Log:
Update list of ignored files.
Modified:
trunk/perf/ (props changed)
|
|
From: <sv...@va...> - 2015-04-22 21:17:56
|
Author: carll
Date: Wed Apr 22 22:17:48 2015
New Revision: 15136
Log:
There is an ABI change in how the PPC64 gcc compiler handles 128 bit arguments
are aligned with GCC 5.0. The compiler generates a "note" about this starting
with GCC 4.9. To avoid generating the "note", the passing of the arguments
were changed to a pointer to make it pass by reference rather then pass by
value.
bugzilla 346487.
Modified:
trunk/NEWS
trunk/none/tests/ppc32/test_dfp4.c
trunk/none/tests/ppc32/test_dfp5.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Apr 22 22:17:48 2015
@@ -164,6 +164,8 @@
346416 Add support for LL_IOC_PATH2FID and LL_IOC_GETPARENT Lustre ioctls
n-i-bz Enable rt_sigpending syscall on ppc64 linux.
346474 Added support for accessing the PPC64 TEXASRU register
+346487 Change PPC64 function calls with 128-bit values to use a pointer so
+ the compiler will not generate a note about an ABI change.
Release 3.10.1 (25 November 2014)
Modified: trunk/none/tests/ppc32/test_dfp4.c
==============================================================================
--- trunk/none/tests/ppc32/test_dfp4.c (original)
+++ trunk/none/tests/ppc32/test_dfp4.c Wed Apr 22 22:17:48 2015
@@ -93,9 +93,9 @@
* BF is the condition register bit field which can range from 0-7. But for
* testing purposes, we only use BF values of '0' and '5'.
*/
-static void _test_dtstdc(int BF, int DCM, dfp_val_t val1, dfp_val_t x1 __attribute__((unused)))
+static void _test_dtstdc(int BF, int DCM, dfp_val_t *val1, dfp_val_t *x1 __attribute__((unused)))
{
- _Decimal64 f14 = val1.dec_val;
+ _Decimal64 f14 = val1->dec_val;
if (DCM < 0 || DCM > 5 || !(BF == 0 || BF == 5)) {
fprintf(stderr, "Invalid inputs to asm test: a=%d, b=%d\n", BF, DCM);
return;
@@ -142,9 +142,9 @@
}
}
-static void _test_dtstdcq(int BF, int DCM, dfp_val_t val1, dfp_val_t x1 __attribute__((unused)))
+static void _test_dtstdcq(int BF, int DCM, dfp_val_t *val1, dfp_val_t *x1 __attribute__((unused)))
{
- _Decimal128 f14 = val1.dec_val128;
+ _Decimal128 f14 = val1->dec_val128;
if (DCM < 0 || DCM > 5 || !(BF == 0 || BF == 5)) {
fprintf(stderr, "Invalid inputs to asm test: a=%d, b=%d\n", BF, DCM);
return;
@@ -197,9 +197,9 @@
* BF is the condition register bit field which can range from 0-7. But for
* testing purposes, we only use BF values of '0' and '5'.
*/
-static void _test_dtstdg(int BF, int DGM, dfp_val_t val1, dfp_val_t x1 __attribute__((unused)))
+static void _test_dtstdg(int BF, int DGM, dfp_val_t *val1, dfp_val_t *x1 __attribute__((unused)))
{
- _Decimal64 f14 = val1.dec_val;
+ _Decimal64 f14 = val1->dec_val;
if (DGM < 0 || DGM > 5 || !(BF == 0 || BF == 5)) {
fprintf(stderr, "Invalid inputs to asm test: a=%d, b=%d\n", BF, DGM);
return;
@@ -246,9 +246,9 @@
}
}
-static void _test_dtstdgq(int BF, int DGM, dfp_val_t val1, dfp_val_t x1 __attribute__((unused)))
+static void _test_dtstdgq(int BF, int DGM, dfp_val_t *val1, dfp_val_t *x1 __attribute__((unused)))
{
- _Decimal128 f14 = val1.dec_val128;
+ _Decimal128 f14 = val1->dec_val128;
if (DGM < 0 || DGM > 5 || !(BF == 0 || BF == 5)) {
fprintf(stderr, "Invalid inputs to asm test: a=%d, b=%d\n", BF, DGM);
return;
@@ -300,10 +300,10 @@
* from 0-7, but for testing purposes, we only use BF values of '4' and '7'.
*/
static void
-_test_dtstex(int BF, int x __attribute__((unused)), dfp_val_t val1, dfp_val_t val2)
+_test_dtstex(int BF, int x __attribute__((unused)), dfp_val_t *val1, dfp_val_t *val2)
{
- _Decimal64 f14 = val1.dec_val;
- _Decimal64 f16 = val2.dec_val;
+ _Decimal64 f14 = val1->dec_val;
+ _Decimal64 f16 = val2->dec_val;
if (!(BF == 4 || BF == 7)) {
fprintf(stderr, "Invalid input to asm test: a=%d\n", BF);
return;
@@ -320,10 +320,10 @@
}
}
-static void _test_dtstexq(int BF, int x __attribute__((unused)), dfp_val_t val1, dfp_val_t val2)
+static void _test_dtstexq(int BF, int x __attribute__((unused)), dfp_val_t *val1, dfp_val_t *val2)
{
- _Decimal128 f14 = val1.dec_val128;
- _Decimal128 f16 = val2.dec_val128;
+ _Decimal128 f14 = val1->dec_val128;
+ _Decimal128 f16 = val2->dec_val128;
if (!(BF == 4 || BF == 7)) {
fprintf(stderr, "Invalid input to asm test: a=%d\n", BF);
return;
@@ -342,7 +342,7 @@
-typedef void (*test_func_t)(int a, int b, dfp_val_t val1, dfp_val_t val2);
+typedef void (*test_funcp_t)(int a, int b, dfp_val_t *val1, dfp_val_t *val2);
typedef void (*test_driver_func_t)(void);
typedef struct test_table
{
@@ -454,7 +454,7 @@
typedef struct dfp_test
{
- test_func_t test_func;
+ test_funcp_t test_func;
const char * name;
dfp_test_args_t * targs;
int num_tests;
@@ -464,7 +464,7 @@
typedef struct dfp_one_arg_test
{
- test_func_t test_func;
+ test_funcp_t test_func;
const char * name;
precision_type_t precision;
const char * op;
@@ -483,7 +483,7 @@
static void test_dfp_ClassAndGroupTest_ops(void)
{
- test_func_t func;
+ test_funcp_t func;
dfp_val_t test_val, dummy;
int k = 0;
@@ -509,7 +509,13 @@
unsigned int flags;
SET_FPSCR_ZERO;
SET_CR_XER_ZERO;
- (*func)(BF, data_class_OR_group, test_val, dummy);
+
+ /* There is an ABI change in how 128 bit arguments are aligned
+ * with GCC 5.0. The compiler generates a "note" about this
+ * starting with GCC 4.8. To avoid generating the "note", pass
+ * the address of the 128-bit arguments rather then the value.
+ */
+ (*func)(BF, data_class_OR_group, &test_val, &dummy);
GET_CR(flags);
condreg = ((flags >> (4 * (7-BF)))) & 0xf;
@@ -547,7 +553,7 @@
static void test_dfp_ExpTest_ops(void)
{
dfp_val_t test_val1, test_val2;
- test_func_t func;
+ test_funcp_t func;
int k = 0;
while ((func = dfp_ExpTest_tests[k].test_func)) {
@@ -577,7 +583,12 @@
SET_FPSCR_ZERO;
SET_CR_XER_ZERO;
- (*func)(BF, 0, test_val1, test_val2);
+ /* There is an ABI change in how 128 bit arguments are aligned
+ * with GCC 5.0. The compiler generates a "note" about this
+ * starting with GCC 4.8. To avoid generating the "note", pass
+ * the address of the 128-bit arguments rather then the value.
+ */
+ (*func)(BF, 0, &test_val1, &test_val2);
GET_CR(flags);
condreg = ((flags >> (4 * (7-BF)))) & 0xf;
Modified: trunk/none/tests/ppc32/test_dfp5.c
==============================================================================
--- trunk/none/tests/ppc32/test_dfp5.c (original)
+++ trunk/none/tests/ppc32/test_dfp5.c Wed Apr 22 22:17:48 2015
@@ -93,9 +93,9 @@
enum BF_vals { BF_val1 = 0, BF_val2 = 1, BF_val3 =6};
// The assembly-level instructions being tested
-static void _test_dtstsf(unsigned int BF, unsigned int ref_sig, dfp_val_t valB)
+static void _test_dtstsf(unsigned int BF, unsigned int ref_sig, dfp_val_t *valB)
{
- _Decimal64 f16 = valB.dec_val;
+ _Decimal64 f16 = valB->dec_val;
register HWord_t r14 __asm__ ("r14");
double f14;
r14 = (HWord_t)&ref_sig;
@@ -117,9 +117,9 @@
}
}
-static void _test_dtstsfq(unsigned int BF, unsigned int ref_sig, dfp_val_t valB)
+static void _test_dtstsfq(unsigned int BF, unsigned int ref_sig, dfp_val_t *valB)
{
- _Decimal128 f16 = valB.dec_val128;
+ _Decimal128 f16 = valB->dec_val128;
register HWord_t r14 __asm__ ("r14");
double f14;
r14 = (HWord_t)&ref_sig;
@@ -141,11 +141,11 @@
}
}
-static dfp_val_t _test_ddedpd(unsigned int SP, dfp_val_t valB)
+static dfp_val_t _test_ddedpd(unsigned int SP, dfp_val_t *valB)
{
_Decimal64 ret = 0;
dfp_val_t result;
- _Decimal64 f16 = valB.dec_val;
+ _Decimal64 f16 = valB->dec_val;
switch (SP) {
case 0:
__asm__ __volatile__ ("ddedpd. 0, %0, %1" : "=f" (ret) : "f" (f16));
@@ -168,11 +168,11 @@
}
-static dfp_val_t _test_ddedpdq(unsigned int SP, dfp_val_t valB)
+static dfp_val_t _test_ddedpdq(unsigned int SP, dfp_val_t *valB)
{
_Decimal128 ret = 0;
dfp_val_t result;
- _Decimal128 f16 = valB.dec_val128;
+ _Decimal128 f16 = valB->dec_val128;
switch (SP) {
case 0:
__asm__ __volatile__ ("ddedpdq 0, %0, %1" : "=f" (ret) : "f" (f16));
@@ -194,11 +194,11 @@
return result;
}
-static dfp_val_t _test_denbcd(unsigned int S, dfp_val_t valB)
+static dfp_val_t _test_denbcd(unsigned int S, dfp_val_t *valB)
{
_Decimal64 ret = 0;
dfp_val_t result;
- _Decimal64 f16 = valB.dec_val;
+ _Decimal64 f16 = valB->dec_val;
switch (S) {
case 0:
__asm__ __volatile__ ("denbcd. 0, %0, %1" : "=f" (ret) : "f" (f16));
@@ -215,11 +215,11 @@
}
-static dfp_val_t _test_denbcdq(unsigned int S, dfp_val_t valB)
+static dfp_val_t _test_denbcdq(unsigned int S, dfp_val_t *valB)
{
_Decimal128 ret = 0;
dfp_val_t result;
- _Decimal128 f16 = valB.dec_val128;
+ _Decimal128 f16 = valB->dec_val128;
switch (S) {
case 0:
__asm__ __volatile__ ("denbcdq 0, %0, %1" : "=f" (ret) : "f" (f16));
@@ -236,8 +236,8 @@
}
-typedef void (*test_func_t)(unsigned int imm, unsigned int imm2, dfp_val_t valB);
-typedef dfp_val_t (*test_func_bcd_t)(unsigned int imm, dfp_val_t valB);
+typedef void (*test_funcp_t)(unsigned int imm, unsigned int imm2, dfp_val_t *valB);
+typedef dfp_val_t (*test_func_bcdp_t)(unsigned int imm, dfp_val_t *valB);
typedef void (*test_driver_func_t)(void);
typedef struct test_table
{
@@ -384,7 +384,7 @@
typedef struct dfp_one_arg_test
{
- test_func_t test_func;
+ test_funcp_t test_func;
const char * name;
precision_type_t precision;
const char * op;
@@ -392,7 +392,7 @@
typedef struct dfp_one_arg_bcd_test
{
- test_func_bcd_t test_func;
+ test_func_bcdp_t test_func;
const char * name;
precision_type_t precision;
const char * op;
@@ -407,7 +407,7 @@
static void test_dfp_ddedpd_ops(void)
{
- test_func_bcd_t func;
+ test_func_bcdp_t func;
dfp_val_t test_val;
int k = 0;
@@ -428,7 +428,13 @@
for (SP = 0; SP < 4; SP++) {
dfp_val_t result;
- result = (*func)(SP, test_val);
+
+ /* There is an ABI change in how 128 bit arguments are aligned
+ * with GCC 5.0. The compiler generates a "note" about this
+ * starting with GCC 4.8. To avoid generating the "note", pass
+ * the address of the 128-bit arguments rather then the value.
+ */
+ result = (*func)(SP, &test_val);
printf("%s (SP=%d) %s", test_def.name, SP, test_def.op);
if (test_def.precision == LONG_TEST) {
printf("%016llx ==> %016llx\n", test_val.u64_val, result.u64_val);
@@ -453,7 +459,7 @@
static void test_dfp_denbcd_ops(void)
{
- test_func_bcd_t func;
+ test_func_bcdp_t func;
dfp_val_t test_val;
int num_test_vals;
@@ -490,7 +496,12 @@
test_val.u128.vall = bcd128_vals[(i * 2) + 1];
}
- result = (*func)(S, test_val);
+ /* There is an API change in how 128 bit arguments are aligned
+ * with GCC 5.0. The compiler generates a "note" about this
+ * starting with GCC 4.8. To avoid generating the "note", pass
+ * the address of the 128-bit arguments rather then the value.
+ */
+ result = (*func)(S, &test_val);
printf("%s (S=%d) %s", test_def.name, S, test_def.op);
if (test_def.precision == LONG_TEST) {
printf("%016llx ==> %016llx\n", test_val.u64_val, result.u64_val);
@@ -516,7 +527,7 @@
static void test_dfp_test_significance_ops(void)
{
- test_func_t func;
+ test_funcp_t func;
dfp_val_t test_valB;
int k = 0;
unsigned int BF_vals[] = {BF_val1, BF_val2, BF_val3};
@@ -545,7 +556,12 @@
BF = BF_vals[bf_idx];
SET_FPSCR_ZERO;
SET_CR_XER_ZERO;
- (*func)(BF, reference_sig, test_valB);
+ /* There is an ABI change in how 128 bit arguments are aligned
+ * with GCC 5.0. The compiler generates a "note" about this
+ * starting with GCC 4.9. To avoid generating the "note", pass
+ * the address of the 128-bit arguments rather then the value.
+ */
+ (*func)(BF, reference_sig, &test_valB);
GET_CR(flags);
condreg = ((flags >> (4 * (7-BF)))) & 0xf;
|
|
From: Carl E. L. <ce...@us...> - 2015-04-22 20:22:25
|
On Sun, 2015-04-19 at 07:57 -0700, Patrick J. LoPresti wrote: > On Sat, Apr 18, 2015 at 3:47 AM, Florian Krohm <fl...@ei...> wrote: > > > > What you describe would work but require additional configury. And that > > is something I would like to avoid. We already have 3000 lines of it. > > If will be less work to simply modify the test to not pass these values > > as function arguments. > > Assuming that is possible, I agree. Although even that demands > cluttering the source with a long comment if the needed approach is > unnatural. > > When it is impossible or inconvenient to modify the source, the > approach I have seen is to place all such warning suppressions in one > header file. And then dispatch on the compiler version in that header > (not in the configure script). Something like > <http://stackoverflow.com/a/18463996/768469>. > > This approach keeps the source uncluttered, and it adds little to the > testing burden since (a) it is simple enough to get right every time > and (b) these are just warning suppressions. > > This is part of the cost of keeping everything "-Wall clean" across > multiple platforms. But it is not a large cost compared to the > benefits. > > - Pat > The 128-bit function arguments are passed by value. By changing the arguments to pointers we can pass them by reference and thus avoid the compiler issue. The change is simple and doesn't impact the readability of the code. I put in a comment about why it is being passed by reference. I have changed a number of the function calls so far and it seems to take care of the issue. Just working on finishing up the rest. This source code change will fix the issue. Carl Love |
|
From: <sv...@va...> - 2015-04-22 16:28:30
|
Author: carll
Date: Wed Apr 22 17:28:22 2015
New Revision: 15135
Log:
Update NEWS file with bix for bugzilla 346474.
Modified:
trunk/NEWS
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Apr 22 17:28:22 2015
@@ -163,6 +163,7 @@
346324 Add support for the ppc instructions lbarx, lharx, stbcs, sthcs
346416 Add support for LL_IOC_PATH2FID and LL_IOC_GETPARENT Lustre ioctls
n-i-bz Enable rt_sigpending syscall on ppc64 linux.
+346474 Added support for accessing the PPC64 TEXASRU register
Release 3.10.1 (25 November 2014)
|
|
From: <sv...@va...> - 2015-04-22 16:17:14
|
Author: carll
Date: Wed Apr 22 17:17:06 2015
New Revision: 15134
Log:
Add support for the TEXASRU register. This register contains information on
transactional memory instruction summary information. This register contains
the upper 32-bits of the transaction information. Note, the valgrind
implementation of transactional memory instructions is limited. Currently, the
contents of the TEXASRU register will always return 0. The lower 64-bits of
the trasnaction information in the TEXASR register will contain the failure
information as setup by Valgrind.
The vex commit 3143 contains the changes needed to support the TEXASRU
register on PPC64.
The support requires changing the value of MAX_REG_WRITE_SIZE in
memcheck/mc_main.c from 1696 to 1712. The change is made in this
valgrind commit.
This patch addresses Bugzilla 346474
Modified:
trunk/memcheck/mc_main.c
Modified: trunk/memcheck/mc_main.c
==============================================================================
--- trunk/memcheck/mc_main.c (original)
+++ trunk/memcheck/mc_main.c Wed Apr 22 17:17:06 2015
@@ -4142,7 +4142,7 @@
static void mc_post_reg_write ( CorePart part, ThreadId tid,
PtrdiffT offset, SizeT size)
{
-# define MAX_REG_WRITE_SIZE 1696
+# define MAX_REG_WRITE_SIZE 1712
UChar area[MAX_REG_WRITE_SIZE];
tl_assert(size <= MAX_REG_WRITE_SIZE);
VG_(memset)(area, V_BITS8_DEFINED, size);
|
|
From: <sv...@va...> - 2015-04-22 16:15:48
|
Author: carll
Date: Wed Apr 22 17:15:41 2015
New Revision: 3143
Log:
Add support for the TEXASRU register. This register contains information on
transactional memory instruction summary information. This register contains
the upper 32-bits of the transaction information. Note, the valgrind
implementation of transactional memory instructions is limited. Currently, the
contents of the TEXASRU register will always return 0. The lower 64-bits of
the trasnaction information in the TEXASR register will contain the failure
information as setup by Valgrind.
This commit contains the changes needed to support the TEXASRU register on
PPC64.
This support requires changing the value of MAX_REG_WRITE_SIZE in
memcheck/mc_main.c from 1696 to 1712. The change is made in the corresponding
valgrind commit.
This patch addresses Bugzilla 346474
Modified:
trunk/priv/guest_ppc_toIR.c
trunk/pub/libvex_guest_ppc32.h
trunk/pub/libvex_guest_ppc64.h
Modified: trunk/priv/guest_ppc_toIR.c
==============================================================================
--- trunk/priv/guest_ppc_toIR.c (original)
+++ trunk/priv/guest_ppc_toIR.c Wed Apr 22 17:15:41 2015
@@ -286,6 +286,7 @@
#define OFFB_NRADDR_GPR2 offsetofPPCGuestState(guest_NRADDR_GPR2)
#define OFFB_TFHAR offsetofPPCGuestState(guest_TFHAR)
#define OFFB_TEXASR offsetofPPCGuestState(guest_TEXASR)
+#define OFFB_TEXASRU offsetofPPCGuestState(guest_TEXASRU)
#define OFFB_TFIAR offsetofPPCGuestState(guest_TFIAR)
@@ -436,6 +437,7 @@
PPC_GST_TFHAR, // Transactional Failure Handler Address Register
PPC_GST_TFIAR, // Transactional Failure Instruction Address Register
PPC_GST_TEXASR, // Transactional EXception And Summary Register
+ PPC_GST_TEXASRU, // Transactional EXception And Summary Register Upper
PPC_GST_MAX
} PPC_GST;
@@ -2739,6 +2741,9 @@
case PPC_GST_TEXASR:
return IRExpr_Get( OFFB_TEXASR, ty );
+ case PPC_GST_TEXASRU:
+ return IRExpr_Get( OFFB_TEXASRU, ty );
+
case PPC_GST_TFIAR:
return IRExpr_Get( OFFB_TFIAR, ty );
@@ -2907,6 +2912,12 @@
vassert( ty_src == Ity_I64 );
stmt( IRStmt_Put( OFFB_TEXASR, src ) );
break;
+
+ case PPC_GST_TEXASRU:
+ vassert( ty_src == Ity_I32 );
+ stmt( IRStmt_Put( OFFB_TEXASRU, src ) );
+ break;
+
case PPC_GST_TFIAR:
vassert( ty_src == Ity_I64 );
stmt( IRStmt_Put( OFFB_TFIAR, src ) );
@@ -3337,9 +3348,10 @@
static void storeTMfailure( Addr64 err_address, ULong tm_reason,
Addr64 handler_address )
{
- putGST( PPC_GST_TFIAR, mkU64( err_address ) );
- putGST( PPC_GST_TEXASR, mkU64( tm_reason ) );
- putGST( PPC_GST_TFHAR, mkU64( handler_address ) );
+ putGST( PPC_GST_TFIAR, mkU64( err_address ) );
+ putGST( PPC_GST_TEXASR, mkU64( tm_reason ) );
+ putGST( PPC_GST_TEXASRU, mkU32( 0 ) );
+ putGST( PPC_GST_TFHAR, mkU64( handler_address ) );
}
/*------------------------------------------------------------*/
@@ -7115,6 +7127,10 @@
DIP("mfspr r%u (TEXASR)\n", rD_addr);
putIReg( rD_addr, getGST( PPC_GST_TEXASR) );
break;
+ case 0x83: // 131
+ DIP("mfspr r%u (TEXASRU)\n", rD_addr);
+ putIReg( rD_addr, getGST( PPC_GST_TEXASRU) );
+ break;
case 0x100:
DIP("mfvrsave r%u\n", rD_addr);
putIReg( rD_addr, mkWidenFrom32(ty, getGST( PPC_GST_VRSAVE ),
Modified: trunk/pub/libvex_guest_ppc32.h
==============================================================================
--- trunk/pub/libvex_guest_ppc32.h (original)
+++ trunk/pub/libvex_guest_ppc32.h Wed Apr 22 17:15:41 2015
@@ -241,9 +241,10 @@
/* 1360 */ ULong guest_TFHAR; // Transaction Failure Handler Address Register
/* 1368 */ ULong guest_TEXASR; // Transaction EXception And Summary Register
/* 1376 */ ULong guest_TFIAR; // Transaction Failure Instruction Address Register
+ /* 1384 */ UInt guest_TEXASRU; // Transaction EXception And Summary Register Upper
/* Padding to make it have an 16-aligned size */
- /* 1384 */ UInt padding2;
+ /* 1388 */ UInt padding2;
}
VexGuestPPC32State;
Modified: trunk/pub/libvex_guest_ppc64.h
==============================================================================
--- trunk/pub/libvex_guest_ppc64.h (original)
+++ trunk/pub/libvex_guest_ppc64.h Wed Apr 22 17:15:41 2015
@@ -282,6 +282,12 @@
/* 1656 */ ULong guest_TFHAR; // Transaction Failure Handler Address Register
/* 1664 */ ULong guest_TEXASR; // Transaction EXception And Summary Register
/* 1672 */ ULong guest_TFIAR; // Transaction Failure Instruction Address Register
+ /* 1680 */ UInt guest_TEXASRU; // Transaction EXception And Summary Register Upper
+
+ /* Padding to make it have an 16-aligned size */
+ /* 1684 */ UInt padding1;
+ /* 1688 */ UInt padding2;
+ /* 1692 */ UInt padding3;
}
VexGuestPPC64State;
|
|
From: Mark W. <mj...@re...> - 2015-04-22 15:30:12
|
On Tue, 2015-04-21 at 10:58 +0200, Thomas Huth wrote: > The following patch seems to fix this issue for me, however since I am > not very experienced with valgrind yet, could somebody please have a > closer look whether this is the right way to deal with this missing > syscall? Yes, that is the correct way. I have installed your patch as valgrind svn r15133. With it programs using sigpending work under valgrind on ppc64. Thanks, Mark |
|
From: <sv...@va...> - 2015-04-22 15:29:12
|
Author: mjw
Date: Wed Apr 22 16:29:03 2015
New Revision: 15133
Log:
Enable rt_sigpending syscall on ppc64 linux.
Patch from Thomas Huth <th...@re...>
Modified:
trunk/NEWS
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Apr 22 16:29:03 2015
@@ -162,6 +162,7 @@
346267 Fix compiler warning about casting arguments, ppc64.
346324 Add support for the ppc instructions lbarx, lharx, stbcs, sthcs
346416 Add support for LL_IOC_PATH2FID and LL_IOC_GETPARENT Lustre ioctls
+n-i-bz Enable rt_sigpending syscall on ppc64 linux.
Release 3.10.1 (25 November 2014)
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c Wed Apr 22 16:29:03 2015
@@ -988,7 +988,7 @@
LINXY(__NR_rt_sigaction, sys_rt_sigaction), // 173
LINXY(__NR_rt_sigprocmask, sys_rt_sigprocmask), // 174
-// _____(__NR_rt_sigpending, sys_rt_sigpending), // 175
+ LINXY(__NR_rt_sigpending, sys_rt_sigpending), // 175
LINXY(__NR_rt_sigtimedwait, sys_rt_sigtimedwait), // 176
LINXY(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo), // 177
LINX_(__NR_rt_sigsuspend, sys_rt_sigsuspend), // 178
|
|
From: Florian K. <fl...@ei...> - 2015-04-22 14:20:40
|
On 22.04.2015 15:58, Julian Seward wrote: > > On 22/04/15 15:50, sv...@va... wrote: >> Author: florian >> - if (next == NULL || next->kind != SkResvn || seg->smode != SmUpper) >> + if (next == NULL || next->kind != SkResvn || next->smode != SmUpper) > > What's the severity of this? Is it a regression or was it always there? The error was in code that I had added at some point - perhaps a month ago. Not a regression. > How did you find it? I spotted it and it did not make any sense. The fix was obvious. Florian |
|
From: <sv...@va...> - 2015-04-22 14:16:19
|
Author: florian
Date: Wed Apr 22 15:16:11 2015
New Revision: 15132
Log:
Rename VG_(am_is_bogus_client_stack_pointer) to
VG_(am_addr_is_in_extensible_client_stack).
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/coregrind/m_syswrap/syswrap-main.c
trunk/coregrind/pub_core_aspacemgr.h
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Wed Apr 22 15:16:11 2015
@@ -1282,12 +1282,12 @@
}
-/* Check whether ADDR looks like a bogus stack pointer. Non-bogosity is
- defined as follows: ADDR is not bogus if
- (1) it points into an already mapped stack segment, OR
- (2) it points into a reservation segment into which an abutting SkAnonC
+/* Check whether ADDR looks like an address or address-to-be located in an
+ extensible client stack segment. Return true if
+ (1) ADDR is located in an already mapped stack segment, OR
+ (2) ADDR is located in a reservation segment into which an abutting SkAnonC
segment can be extended. */
-Bool VG_(am_is_bogus_client_stack_pointer)( Addr addr )
+Bool VG_(am_addr_is_in_extensible_client_stack)( Addr addr )
{
const NSegment *seg = nsegments + find_nsegment_idx(addr);
@@ -1297,17 +1297,17 @@
case SkFileV:
case SkFileC:
case SkShmC:
- return True;
+ return False;
case SkResvn: {
- if (seg->smode != SmUpper) return True;
+ 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. */
const NSegment *next = VG_(am_next_nsegment)(seg, /*forward*/ True);
- if (next == NULL || next->kind != SkAnonC) return True;
+ if (next == NULL || next->kind != SkAnonC) return False;
/* OK; looks like a stack segment */
- return False;
+ return True;
}
case SkAnonC: {
@@ -1315,10 +1315,10 @@
segment, then ADDR is a stack pointer into mapped memory. */
const NSegment *next = VG_(am_next_nsegment)(seg, /*forward*/ False);
if (next == NULL || next->kind != SkResvn || next->smode != SmUpper)
- return True;
+ return False;
/* OK; looks like a stack segment */
- return False;
+ return True;
}
default:
Modified: trunk/coregrind/m_syswrap/syswrap-main.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-main.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-main.c Wed Apr 22 15:16:11 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_is_bogus_client_stack_pointer)(stackMin))
+ if (VG_(am_addr_is_in_extensible_client_stack)(stackMin))
VG_(extend_stack)( tid, stackMin );
}
# endif
Modified: trunk/coregrind/pub_core_aspacemgr.h
==============================================================================
--- trunk/coregrind/pub_core_aspacemgr.h (original)
+++ trunk/coregrind/pub_core_aspacemgr.h Wed Apr 22 15:16:11 2015
@@ -91,8 +91,9 @@
extern Bool VG_(am_is_valid_for_client_or_free_or_resvn)
( Addr start, SizeT len, UInt prot );
-/* Check whether ADDR looks like a bogus stack pointer. */
-extern Bool VG_(am_is_bogus_client_stack_pointer)( Addr addr );
+/* 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 );
/* Trivial fn: return the total amount of space in anonymous mappings,
both for V and the client. Is used for printing stats in
|
|
From: Julian S. <js...@ac...> - 2015-04-22 14:07:34
|
On 22/04/15 15:50, sv...@va... wrote: > Author: florian > - if (next == NULL || next->kind != SkResvn || seg->smode != SmUpper) > + if (next == NULL || next->kind != SkResvn || next->smode != SmUpper) What's the severity of this? Is it a regression or was it always there? How did you find it? J |
|
From: <sv...@va...> - 2015-04-22 13:50:20
|
Author: florian
Date: Wed Apr 22 14:50:13 2015
New Revision: 15131
Log:
Fix a silly bug.
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 Wed Apr 22 14:50:13 2015
@@ -1314,7 +1314,7 @@
/* If the abutting segment towards lower addresses is an SkResvn
segment, then ADDR is a stack pointer into mapped memory. */
const NSegment *next = VG_(am_next_nsegment)(seg, /*forward*/ False);
- if (next == NULL || next->kind != SkResvn || seg->smode != SmUpper)
+ if (next == NULL || next->kind != SkResvn || next->smode != SmUpper)
return True;
/* OK; looks like a stack segment */
|