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
(6) |
|
2
(4) |
3
(9) |
4
(11) |
5
(16) |
6
(6) |
7
(1) |
8
(11) |
|
9
(11) |
10
(6) |
11
(10) |
12
(23) |
13
(23) |
14
(6) |
15
(10) |
|
16
(5) |
17
(13) |
18
(9) |
19
(4) |
20
(6) |
21
(16) |
22
(3) |
|
23
(5) |
24
(7) |
25
(6) |
26
(4) |
27
(8) |
28
|
29
(3) |
|
30
(2) |
31
(17) |
|
|
|
|
|
|
From: Ivo R. <ivo...@gm...> - 2015-08-31 22:59:52
|
2015-09-01 0:53 GMT+02:00 Philippe Waroquiers <phi...@sk... >: > On Mon, 2015-08-31 at 10:37 +0200, Mark Wielaard wrote: > > > --read-inline-info=yes > > > > > > My experience of the inlined-unwind functionality introduced in 3.10.0 > has > > > been positive, and I always use it. I think it's time to enable it by > > > default. > > > > Agreed. Although in theory this might cause subtle changes in > > suppression files (I haven't personally seen this, so it might only be > > theoretical). > Note that =yes is already the default in 3.10 on linux and android, > for memcheck/drd/helgrind. > > (and is now the default for solaris. Humph, at least the --help > is to be updated to add solaris). > Ivo, is inline info working properly on Solaris? > --read-inline-info=yes works like a charm on Solaris. All in all, it reads stuff produced by gcc toolchain (with the help of Solaris link editor, though). What part of "--help" do you have in mind? I. |
|
From: Philippe W. <phi...@sk...> - 2015-08-31 22:52:54
|
On Mon, 2015-08-31 at 10:37 +0200, Mark Wielaard wrote: > > --read-inline-info=yes > > > > My experience of the inlined-unwind functionality introduced in 3.10.0 has > > been positive, and I always use it. I think it's time to enable it by > > default. > > Agreed. Although in theory this might cause subtle changes in > suppression files (I haven't personally seen this, so it might only be > theoretical). Note that =yes is already the default in 3.10 on linux and android, for memcheck/drd/helgrind. (and is now the default for solaris. Humph, at least the --help is to be updated to add solaris). Ivo, is inline info working properly on solaris ? It is set to =no on Darwin (I think it was not working properly on MacOS). Rhys, any idea/experience with setting it to =yes on Darwin ? (and testing with big applications ? I think it was failing when reading the debug info). Note that inline info behaviour is tested explicitely by some memcheck/tests (e.g. inline, inlinfosuppobj, inlinfo, inltemplate). For most other tools, read inline info is not that useful as it is (mostly/only) useful for tools that are showing symbolic stacktraces during run or when reporting errors. Philippe |
|
From: <sv...@va...> - 2015-08-31 22:26:10
|
Author: florian
Date: Mon Aug 31 23:26:03 2015
New Revision: 15610
Log:
clang miscompiles faultstatus.c function test5().
First it choses %eax as the 1st operand of the bound insn.
Then it complains that %eax is invalid.
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 Mon Aug 31 23:26:03 2015
@@ -125,9 +125,13 @@
if !VGCONF_OS_IS_DARWIN
if !SOLARIS_SUN_STUDIO_AS
# Sun Studio assembler fails to assemble the bound instruction
+if !COMPILER_IS_CLANG
+# clang errors out complaining that %eax as the 1st operand in the bound
+# insn is an invalid operand.
check_PROGRAMS += faultstatus
endif
endif
+endif
if !SOLARIS_SUN_STUDIO_AS
# Sun Studio assembler fails to assemble pushw %fs, popw %fs
check_PROGRAMS += pushpopseg
|
|
From: <sv...@va...> - 2015-08-31 22:15:47
|
Author: philippe
Date: Mon Aug 31 23:15:40 2015
New Revision: 15609
Log:
Small additional change in NEWS for block_list
Modified:
trunk/NEWS
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Aug 31 23:15:40 2015
@@ -53,7 +53,7 @@
- The 'block_list' monitor command now accepts an optional argument
'limited <max_blocks>' to control the nr of block addresses
- printed. If a block has been found using an heuristic, then
+ printed. Also, if a block has been found using an heuristic, then
'block_list' will now show the heuristic after the block size.
- The C helper functions used to instrument loads on x86-linux and
|
|
From: <sv...@va...> - 2015-08-31 22:08:54
|
Author: philippe
Date: Mon Aug 31 23:08:47 2015
New Revision: 15608
Log:
Have block_list showing heuristic used for a block (if block was
found via an heuristic)
Modified:
trunk/NEWS
trunk/memcheck/docs/mc-manual.xml
trunk/memcheck/mc_leakcheck.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Aug 31 23:08:47 2015
@@ -53,7 +53,8 @@
- The 'block_list' monitor command now accepts an optional argument
'limited <max_blocks>' to control the nr of block addresses
- printed.
+ printed. If a block has been found using an heuristic, then
+ 'block_list' will now show the heuristic after the block size.
- The C helper functions used to instrument loads on x86-linux and
arm-linux (both 32-bit only) have been replaced by handwritten
Modified: trunk/memcheck/docs/mc-manual.xml
==============================================================================
--- trunk/memcheck/docs/mc-manual.xml (original)
+++ trunk/memcheck/docs/mc-manual.xml Mon Aug 31 23:08:47 2015
@@ -1918,7 +1918,8 @@
by a loss record number.
The <varname>block_list</varname> command shows the loss record information
followed by the addresses and sizes of the blocks which have been
- merged in the loss record.
+ merged in the loss record. If a block was found using an heuristic, the block size
+ is followed by the heuristic.
</para>
<para> If a directly lost block causes some other blocks to be indirectly
Modified: trunk/memcheck/mc_leakcheck.c
==============================================================================
--- trunk/memcheck/mc_leakcheck.c (original)
+++ trunk/memcheck/mc_leakcheck.c Mon Aug 31 23:08:47 2015
@@ -1585,8 +1585,13 @@
// We found an existing loss record matching this chunk.
// If this is the loss record we are looking for, output the pointer.
if (old_lr == lr_array[loss_record_nr]) {
- VG_(umsg)("%p[%lu]\n",
- (void *)ch->data, (SizeT)ch->szB);
+ if (ex->heuristic)
+ VG_(umsg)("%p[%lu] (found via heuristic %s)\n",
+ (void *)ch->data, (SizeT)ch->szB,
+ pp_heuristic (ex->heuristic));
+ else
+ VG_(umsg)("%p[%lu]\n",
+ (void *)ch->data, (SizeT)ch->szB);
remaining--;
if (ex->state != Reachable) {
// We can print the clique in all states, except Reachable.
|
Author: iraisr
Date: Mon Aug 31 22:31:09 2015
New Revision: 15607
Log:
Add support for ldsoexec on Solaris.
Solaris runtime linker allows to run dynamically linked programs indirectly, as:
ld.so.1 <dynamic_executable>
This is now possible under Valgrind as well.
Fixes BZ#351858.
Added:
trunk/memcheck/tests/amd64-solaris/ldsoexec.c
trunk/memcheck/tests/amd64-solaris/ldsoexec.stderr.exp
trunk/memcheck/tests/amd64-solaris/ldsoexec.vgtest
trunk/memcheck/tests/x86-solaris/ldsoexec.c
trunk/memcheck/tests/x86-solaris/ldsoexec.stderr.exp
trunk/memcheck/tests/x86-solaris/ldsoexec.vgtest
Modified:
trunk/NEWS
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/coregrind/m_syswrap/syswrap-solaris.c
trunk/coregrind/pub_core_aspacemgr.h
trunk/include/vki/vki-solaris.h
trunk/memcheck/tests/amd64-solaris/ (props changed)
trunk/memcheck/tests/amd64-solaris/Makefile.am
trunk/memcheck/tests/x86-solaris/ (props changed)
trunk/memcheck/tests/x86-solaris/Makefile.am
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Aug 31 22:31:09 2015
@@ -363,6 +363,7 @@
351474 Fix VG_(iseqsigset) as obvious
351534 Fix incorrect header guard
351756 Intercept platform_memchr$VARIANT$Haswell on OS X
+351858 ldsoexec support on Solaris
n-i-bz Provide implementations of certain compiler builtins to support
compilers that may not provide those
n-i-bz Old STABS code is still being compiled, but never used. Remove it.
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Mon Aug 31 22:31:09 2015
@@ -1265,6 +1265,15 @@
return is_valid_for(kinds, start, len, prot);
}
+/* Checks if a piece of memory consists of either free or reservation
+ segments. */
+Bool VG_(am_is_free_or_resvn)( Addr start, SizeT len )
+{
+ const UInt kinds = SkFree | SkResvn;
+
+ return is_valid_for(kinds, start, len, 0);
+}
+
Bool VG_(am_is_valid_for_valgrind) ( Addr start, SizeT len, UInt prot )
{
Modified: trunk/coregrind/m_syswrap/syswrap-solaris.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-solaris.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-solaris.c Mon Aug 31 22:31:09 2015
@@ -5416,6 +5416,7 @@
UInt segments = 0; /* loadable segments */
Addr start_addr = 0;
Addr end_addr = 0;
+ Addr elfbrk = 0;
SizeT max_align = VKI_PAGE_SIZE;
/* 1. First pass over phdrs - determine number, span and max alignment. */
@@ -5489,7 +5490,7 @@
return VG_(mk_SysRes_Error)(VKI_ENOTSUP);
}
- end_addr = phdr->p_vaddr + phdr->p_memsz + offset;
+ end_addr = elfbrk = phdr->p_vaddr + phdr->p_memsz + offset;
end_addr = VG_PGROUNDUP(end_addr);
if (phdr->p_align > max_align) {
max_align = phdr->p_align;
@@ -5550,21 +5551,27 @@
/* Now get the aspacemgr oraculum advisory.
Later on we mmap file-based and BSS mappings into this address space area
as required and leave the holes unmapped. */
- MapRequest mreq = {MAlign, max_align, span};
- Bool ok;
- start_addr = VG_(am_get_advisory)(&mreq, True /* forClient */, &ok);
- if (!ok) {
+ if (ehdr->e_type == VKI_ET_DYN) {
+ MapRequest mreq = {MAlign, max_align, span};
+ Bool ok;
+ start_addr = VG_(am_get_advisory)(&mreq, True /* forClient */, &ok);
+ if (!ok) {
+ if (VG_(clo_trace_syscalls))
+ VG_(debugLog)(3, "syswrap-solaris", "mmapobj_process_phdrs: "
+ "failed to reserve address space of %#lx bytes "
+ "with alignment %#lx\n", span, max_align);
+ return VG_(mk_SysRes_Error)(VKI_ENOMEM);
+ }
+ vg_assert(VG_ROUNDUP(start_addr, max_align) == start_addr);
+
if (VG_(clo_trace_syscalls))
- VG_(debugLog)(3, "syswrap-solaris", "mmapobj_process_phdrs: "
- "failed to reserve address space of %#lx bytes "
- "with alignment %#lx\n", span, max_align);
- return VG_(mk_SysRes_Error)(VKI_ENOMEM);
+ VG_(debugLog)(2, "syswrap-solaris", "PRE(sys_mmapobj): address space "
+ "reserved at: vaddr=%#lx size=%#lx\n",
+ start_addr, span);
+ } else {
+ vg_assert(ehdr->e_type == VKI_ET_EXEC);
+ /* ET_EXEC uses fixed mappings. Will be checked when processing phdrs. */
}
- vg_assert(VG_ROUNDUP(start_addr, max_align) == start_addr);
-
- if (VG_(clo_trace_syscalls))
- VG_(debugLog)(2, "syswrap-solaris", "PRE(sys_mmapobj): address space "
- "reserved at: vaddr=%#lx size=%#lx\n", start_addr, span);
/* This is an utterly ugly hack, the aspacemgr assumes that only one
segment is added at the time. However we add here multiple segments so
@@ -5593,7 +5600,6 @@
prot |= VKI_PROT_EXEC;
vki_mmapobj_result_t *mrp = &storage[*elements];
- mrp->mr_addr = (vki_caddr_t) (start_addr + phdr->p_vaddr);
mrp->mr_msize = phdr->p_memsz;
mrp->mr_fsize = phdr->p_filesz;
mrp->mr_offset = 0;
@@ -5602,16 +5608,27 @@
Off64T file_offset = phdr->p_offset;
if (idx == first_segment_idx) {
mrp->mr_flags = VKI_MR_HDR_ELF;
- if (phdr->p_offset > 0) {
- /* Include the ELF header into the first segment.
- This means we ignore p_offset from the program header
- and map from file offset 0. */
- mrp->mr_msize += phdr->p_offset;
- mrp->mr_fsize += phdr->p_offset;
- file_offset = 0;
+ if (ehdr->e_type == VKI_ET_DYN) {
+ if (phdr->p_offset > 0) {
+ /* Include the ELF header into the first segment.
+ This means we ignore p_offset from the program header
+ and map from file offset 0. */
+ mrp->mr_msize += phdr->p_offset;
+ mrp->mr_fsize += phdr->p_offset;
+ file_offset = 0;
+ }
+ } else {
+ vg_assert(ehdr->e_type == VKI_ET_EXEC);
+ start_addr = phdr->p_vaddr;
}
}
+ /* p_vaddr is absolute for ET_EXEC, and relative for ET_DYN. */
+ mrp->mr_addr = (vki_caddr_t) phdr->p_vaddr;
+ if (ehdr->e_type == VKI_ET_DYN) {
+ mrp->mr_addr += start_addr;
+ }
+
SizeT page_offset = (Addr) mrp->mr_addr & VKI_PAGEOFFSET;
if (page_offset > 0) {
vg_assert(file_offset >= page_offset);
@@ -5650,6 +5667,19 @@
mprotect_needed = True;
}
+ if (ehdr->e_type == VKI_ET_EXEC) {
+ /* Now check if the requested address space is available. */
+ if (!VG_(am_is_free_or_resvn)((Addr) mrp->mr_addr, mrp->mr_msize)) {
+ if (VG_(clo_trace_syscalls))
+ VG_(debugLog)(3, "syswrap-solaris", "mmapobj_process_phdrs: "
+ "requested segment at %#lx with size of "
+ "%#lx bytes is not available\n",
+ (Addr) mrp->mr_addr, (UWord) mrp->mr_msize);
+ res = VG_(mk_SysRes_Error)(VKI_EADDRINUSE);
+ goto mmap_error;
+ }
+ }
+
if (file_size > 0) {
res = VG_(am_mmap_file_fixed_client_flags)((Addr) mrp->mr_addr,
file_size, prot, flags, fd, file_offset);
@@ -5728,6 +5758,21 @@
}
}
+ if ((ehdr->e_type == VKI_ET_EXEC) && (!brk_segment_established)) {
+ vg_assert(VG_(brk_base) == VG_(brk_limit));
+ vg_assert(VG_(brk_base) == -1);
+ VG_(brk_base) = VG_(brk_limit) = elfbrk;
+
+ if (!VG_(setup_client_dataseg)()) {
+ VG_(umsg)("Cannot map memory to initialize brk segment in thread #%d "
+ "at %#lx\n", tid, VG_(brk_base));
+ res = VG_(mk_SysRes_Error)(VKI_ENOMEM);
+ goto mmap_error;
+ }
+
+ VG_(track_client_dataseg)(tid);
+ }
+
/* Restore VG_(clo_sanity_level). The scheduler will perform the aspacemgr
sanity check after the syscall. */
VG_(clo_sanity_level) = sanity_level;
@@ -5804,7 +5849,7 @@
}
VKI_ESZ(Ehdr) *ehdr = (VKI_ESZ(Ehdr) *) header;
- if (ehdr->e_type != VKI_ET_DYN) {
+ if ((ehdr->e_type != VKI_ET_EXEC) && (ehdr->e_type != VKI_ET_DYN)) {
VG_(unimplemented)("Syswrap of the mmapobj call with ELF type %u.",
ehdr->e_type);
/*NOTREACHED*/
Modified: trunk/coregrind/pub_core_aspacemgr.h
==============================================================================
--- trunk/coregrind/pub_core_aspacemgr.h (original)
+++ trunk/coregrind/pub_core_aspacemgr.h Mon Aug 31 22:31:09 2015
@@ -94,6 +94,10 @@
extern Bool VG_(am_is_valid_for_client_or_free_or_resvn)
( Addr start, SizeT len, UInt prot );
+/* Checks if a piece of memory consists of either free or reservation
+ segments. */
+extern Bool VG_(am_is_free_or_resvn)( Addr start, SizeT len );
+
/* 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 );
Modified: trunk/include/vki/vki-solaris.h
==============================================================================
--- trunk/include/vki/vki-solaris.h (original)
+++ trunk/include/vki/vki-solaris.h Mon Aug 31 22:31:09 2015
@@ -452,6 +452,7 @@
#define VKI_EOVERFLOW EOVERFLOW
#define VKI_ENOSYS ENOSYS
#define VKI_ERESTART ERESTART
+#define VKI_EADDRINUSE EADDRINUSE
#if defined(SOLARIS_EXECVE_SYSCALL_TAKES_FLAGS)
Modified: trunk/memcheck/tests/amd64-solaris/Makefile.am
==============================================================================
--- trunk/memcheck/tests/amd64-solaris/Makefile.am (original)
+++ trunk/memcheck/tests/amd64-solaris/Makefile.am Mon Aug 31 22:31:09 2015
@@ -8,14 +8,16 @@
context_gpr.stderr.exp context_gpr.stdout.exp context_gpr.vgtest \
context_rflags.stderr.exp context_rflags.stdout.exp context_rflags.vgtest \
context_rflags2.stderr.exp context_rflags2.stdout.exp context_rflags2.vgtest \
- context_sse.stderr.exp context_sse.stdout.exp context_sse.vgtest
+ context_sse.stderr.exp context_sse.stdout.exp context_sse.vgtest \
+ ldsoexec.stderr.exp ldsoexec.vgtest
check_PROGRAMS = \
context_fpu \
context_gpr \
context_rflags \
context_rflags2 \
- context_sse
+ context_sse \
+ ldsoexec
AM_CFLAGS += @FLAG_M64@
AM_CXXFLAGS += @FLAG_M64@
Added: trunk/memcheck/tests/amd64-solaris/ldsoexec.c
==============================================================================
--- trunk/memcheck/tests/amd64-solaris/ldsoexec.c (added)
+++ trunk/memcheck/tests/amd64-solaris/ldsoexec.c Mon Aug 31 22:31:09 2015
@@ -0,0 +1,3 @@
+int main(void) {
+ return 0;
+}
Added: trunk/memcheck/tests/amd64-solaris/ldsoexec.stderr.exp
==============================================================================
(empty)
Added: trunk/memcheck/tests/amd64-solaris/ldsoexec.vgtest
==============================================================================
--- trunk/memcheck/tests/amd64-solaris/ldsoexec.vgtest (added)
+++ trunk/memcheck/tests/amd64-solaris/ldsoexec.vgtest Mon Aug 31 22:31:09 2015
@@ -0,0 +1,2 @@
+prog: /lib/64/ld.so.1 ./ldsoexec
+vgopts: -q
Modified: trunk/memcheck/tests/x86-solaris/Makefile.am
==============================================================================
--- trunk/memcheck/tests/x86-solaris/Makefile.am (original)
+++ trunk/memcheck/tests/x86-solaris/Makefile.am Mon Aug 31 22:31:09 2015
@@ -10,7 +10,8 @@
context_eflags2.stderr.exp context_eflags2.stdout.exp context_eflags2.vgtest \
context_fpu.stderr.exp context_fpu.stdout.exp context_fpu.vgtest \
context_gpr.stderr.exp context_gpr.stdout.exp context_gpr.vgtest \
- context_sse.stderr.exp context_sse.stdout.exp context_sse.vgtest
+ context_sse.stderr.exp context_sse.stdout.exp context_sse.vgtest \
+ ldsoexec.stderr.exp ldsoexec.vgtest
check_PROGRAMS = \
scalar \
@@ -18,7 +19,8 @@
context_eflags2 \
context_fpu \
context_gpr \
- context_sse
+ context_sse \
+ ldsoexec
if SOLARIS_OLD_SYSCALLS
check_PROGRAMS += scalar_obsolete
Added: trunk/memcheck/tests/x86-solaris/ldsoexec.c
==============================================================================
--- trunk/memcheck/tests/x86-solaris/ldsoexec.c (added)
+++ trunk/memcheck/tests/x86-solaris/ldsoexec.c Mon Aug 31 22:31:09 2015
@@ -0,0 +1,3 @@
+int main(void) {
+ return 0;
+}
Added: trunk/memcheck/tests/x86-solaris/ldsoexec.stderr.exp
==============================================================================
(empty)
Added: trunk/memcheck/tests/x86-solaris/ldsoexec.vgtest
==============================================================================
--- trunk/memcheck/tests/x86-solaris/ldsoexec.vgtest (added)
+++ trunk/memcheck/tests/x86-solaris/ldsoexec.vgtest Mon Aug 31 22:31:09 2015
@@ -0,0 +1,2 @@
+prog: /lib/ld.so.1 ./ldsoexec
+vgopts: -q
|
|
From: <sv...@va...> - 2015-08-31 21:18:25
|
Author: florian
Date: Mon Aug 31 22:18:18 2015
New Revision: 15606
Log:
Ensure the testcase compiles with clang.
clang up to and including 3.6.2 does not recognise the fxsave64
and fxrstor64 mnemonics. It does recognise rex64/fxsave etc..
Related to BZ #339636.
Modified:
trunk/memcheck/tests/amd64/fxsave-amd64.c
Modified: trunk/memcheck/tests/amd64/fxsave-amd64.c
==============================================================================
--- trunk/memcheck/tests/amd64/fxsave-amd64.c (original)
+++ trunk/memcheck/tests/amd64/fxsave-amd64.c Mon Aug 31 22:18:18 2015
@@ -17,7 +17,7 @@
__attribute__((noinline))
void do_fxsave ( void* p, int rexw ) {
if (rexw) {
-#if defined(VGO_linux) || defined(VGO_solaris)
+#if (defined(VGO_linux) || defined(VGO_solaris)) && ! defined(__clang__)
asm __volatile__("fxsave64 (%0)" : : "r" (p) : "memory" );
#else
asm __volatile__("rex64/fxsave (%0)" : : "r" (p) : "memory" );
@@ -30,7 +30,7 @@
__attribute__((noinline))
void do_fxrstor ( void* p, int rexw ) {
if (rexw) {
-#if defined(VGO_linux) || defined(VGO_solaris)
+#if (defined(VGO_linuxx) || defined(VGO_solaris)) && ! defined(__clang__)
asm __volatile__("fxrstor64 (%0)" : : "r" (p) : "memory" );
#else
asm __volatile__("rex64/fxrstor (%0)" : : "r" (p) : "memory" );
|
|
From: Florian K. <fl...@ei...> - 2015-08-31 20:57:41
|
On 26.06.2015 03:19, Lukasz Marek wrote: > Hi, > > For some time I wanted to write valgrdind tool that tracks "resources". > It is something you mention on webpage as a proposal. Yes, a generalised resource checker would be quite useful to have. If you're serious about it, open a bug in bugzilla, explain what your plans are and add any patches there as well. Patches sent to the mailing list typically get forgotten about. Bugzilla is here: http://valgrind.org/support/bug_reports.html > > For now I have 2 questions, I hope you don't mind, they may seem trivial > for you, but can't find answer myself. > 1. does result of VG_(record_ExeContext) have to be freed in some way? No. It does not look like it. > 2. is there way to check if valgrind's tool have some leaks? Running > valgrind under valgrind? :) Yes. Look at README_DEVELOPERS and read the section about Self-hosting. Florian |
|
From: <sv...@va...> - 2015-08-31 20:33:45
|
Author: florian
Date: Mon Aug 31 21:33:36 2015
New Revision: 15605
Log:
Comment out unused functions to avoid clang warnings.
Modified:
trunk/none/tests/x86-linux/seg_override.c
Modified: trunk/none/tests/x86-linux/seg_override.c
==============================================================================
--- trunk/none/tests/x86-linux/seg_override.c (original)
+++ trunk/none/tests/x86-linux/seg_override.c Mon Aug 31 21:33:36 2015
@@ -34,6 +34,7 @@
} HighWord;
} LDT_ENTRY;
+#if 0
inline static void *wine_ldt_get_base( const LDT_ENTRY *ent )
{
return (void *)(ent->BaseLow |
@@ -46,7 +47,7 @@
if (ent->HighWord.Bits.Granularity) limit = (limit << 12) | 0xfff;
return limit;
}
-
+#endif
/* our copy of the ldt */
LDT_ENTRY ldt_copy[8192];
|
|
From: Julian S. <js...@ac...> - 2015-08-31 15:34:45
|
On 31/08/15 17:22, Florian Krohm wrote: > Isn't this NEWS-worthy? As well as the changes in r15600 and 15601? Ach; I updated NEWS but forgot to commit it. Done; r15604. J |
|
From: <sv...@va...> - 2015-08-31 15:33:29
|
Author: sewardj
Date: Mon Aug 31 16:33:17 2015
New Revision: 15604
Log:
Note changed command line option defaults.
Modified:
trunk/NEWS
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Aug 31 16:33:17 2015
@@ -26,18 +26,25 @@
Pentium 4. 3.10.1 wrongly claimed to be a Core 2, which is SSSE3.
* The JIT's register allocator is significantly faster, making the JIT
- as a whole somewhat faster, so JIT-intensive activities (like
- program startup) are modestly faster, around 5%.
+ as a whole somewhat faster, so JIT-intensive activities, for example
+ program startup, are modestly faster, around 5%.
* ==================== TOOL CHANGES ====================
* Memcheck:
- - Default value for --keep-stacktraces has been changed to alloc-and-free.
- This has a small cost in memory (one word per malloc-ed block) but
- allows memcheck to e.g. give the 3 stacktraces of a dangling reference:
- Where the block was allocated, where it was freed, and where it is
- acccessed after free.
+ - The default value for --keep-stacktraces has been changed from
+ "malloc-then-free" to "malloc-and-free". This has a small cost in
+ memory (one word per malloc-ed block) but allows Memcheck to show the
+ 3 stacktraces of a dangling reference: Where the block was allocated,
+ where it was freed, and where it is acccessed after free.
+
+ - The default value for --partial-loads-ok has been changed from "no" to
+ "yes", so as to avoid false positive errors resulting from some kinds
+ of vectorised loops.
+
+* The default values for some command line options have been changed to
+ be more suitable for common use cases:
- A new monitor command 'xb <addr> <len>' shows the validity bits of
<len> bytes at <addr>. The monitor command 'xb' is easier to use
@@ -88,8 +95,18 @@
* ==================== OTHER CHANGES ====================
+* The default value for the --smc-check option has been changed from
+ "stack" to "all-non-file" on targets that provide automatic D-I
+ cache coherence (x86, amd64 and s390x). The result is to provide,
+ by default, transparent support for JIT generated and self-modifying
+ code on all targets.
+
+* Mac OS X only: the default value for the --dsymutil option has been
+ changed from "no" to "yes", since any serious usage on Mac OS X
+ always required it to be "yes".
+
* The command line options --db-attach and --db-command have been removed.
- They were deprecated in 3.10.0
+ They were deprecated in 3.10.0.
* When a process dies due to a signal, Valgrind now shows the signal
and the stacktrace at default verbosity (i.e. verbosity 1).
|
|
From: Florian K. <fl...@ei...> - 2015-08-31 15:22:49
|
On 31.08.2015 16:37, sv...@va... wrote: > Author: sewardj > Date: Mon Aug 31 15:37:25 2015 > New Revision: 15603 > > Log: > Change the default setting for --dsymutil from =no to =yes, since > in practice it needs to be permanently enabled on OS X. No change > on other platforms. > > Modified: > trunk/coregrind/m_main.c > trunk/coregrind/m_options.c > trunk/docs/xml/manual-core.xml > trunk/none/tests/cmdline1.stdout.exp > trunk/none/tests/cmdline2.stdout.exp Isn't this NEWS-worthy? As well as the changes in r15600 and 15601? Florian |
Author: sewardj
Date: Mon Aug 31 15:37:25 2015
New Revision: 15603
Log:
Change the default setting for --dsymutil from =no to =yes, since
in practice it needs to be permanently enabled on OS X. No change
on other platforms.
Modified:
trunk/coregrind/m_main.c
trunk/coregrind/m_options.c
trunk/docs/xml/manual-core.xml
trunk/none/tests/cmdline1.stdout.exp
trunk/none/tests/cmdline2.stdout.exp
Modified: trunk/coregrind/m_main.c
==============================================================================
--- trunk/coregrind/m_main.c (original)
+++ trunk/coregrind/m_main.c Mon Aug 31 15:37:25 2015
@@ -134,7 +134,7 @@
" --suppressions=<filename> suppress errors described in <filename>\n"
" --gen-suppressions=no|yes|all print suppressions for errors? [no]\n"
" --input-fd=<number> file descriptor for input [0=stdin]\n"
-" --dsymutil=no|yes run dsymutil on Mac OS X when helpful? [no]\n"
+" --dsymutil=no|yes run dsymutil on Mac OS X when helpful? [yes]\n"
" --max-stackframe=<number> assume stack switch for SP changes larger\n"
" than <number> bytes [2000000]\n"
" --main-stacksize=<number> set size of main thread's stack (in bytes)\n"
Modified: trunk/coregrind/m_options.c
==============================================================================
--- trunk/coregrind/m_options.c (original)
+++ trunk/coregrind/m_options.c Mon Aug 31 15:37:25 2015
@@ -130,7 +130,7 @@
Word VG_(clo_valgrind_stacksize) = VG_DEFAULT_STACK_ACTIVE_SZB;
Bool VG_(clo_wait_for_gdb) = False;
UInt VG_(clo_kernel_variant) = 0;
-Bool VG_(clo_dsymutil) = False;
+Bool VG_(clo_dsymutil) = True;
Bool VG_(clo_sigill_diag) = True;
UInt VG_(clo_unw_stack_scan_thresh) = 0; /* disabled by default */
UInt VG_(clo_unw_stack_scan_frames) = 5;
Modified: trunk/docs/xml/manual-core.xml
==============================================================================
--- trunk/docs/xml/manual-core.xml (original)
+++ trunk/docs/xml/manual-core.xml Mon Aug 31 15:37:25 2015
@@ -1470,7 +1470,7 @@
<varlistentry id="opt.dsymutil" xreflabel="--dsymutil">
<term>
- <option><![CDATA[--dsymutil=no|yes [no] ]]></option>
+ <option><![CDATA[--dsymutil=no|yes [yes] ]]></option>
</term>
<listitem>
<para>This option is only relevant when running Valgrind on
Modified: trunk/none/tests/cmdline1.stdout.exp
==============================================================================
--- trunk/none/tests/cmdline1.stdout.exp (original)
+++ trunk/none/tests/cmdline1.stdout.exp Mon Aug 31 15:37:25 2015
@@ -48,7 +48,7 @@
--suppressions=<filename> suppress errors described in <filename>
--gen-suppressions=no|yes|all print suppressions for errors? [no]
--input-fd=<number> file descriptor for input [0=stdin]
- --dsymutil=no|yes run dsymutil on Mac OS X when helpful? [no]
+ --dsymutil=no|yes run dsymutil on Mac OS X when helpful? [yes]
--max-stackframe=<number> assume stack switch for SP changes larger
than <number> bytes [2000000]
--main-stacksize=<number> set size of main thread's stack (in bytes)
Modified: trunk/none/tests/cmdline2.stdout.exp
==============================================================================
--- trunk/none/tests/cmdline2.stdout.exp (original)
+++ trunk/none/tests/cmdline2.stdout.exp Mon Aug 31 15:37:25 2015
@@ -48,7 +48,7 @@
--suppressions=<filename> suppress errors described in <filename>
--gen-suppressions=no|yes|all print suppressions for errors? [no]
--input-fd=<number> file descriptor for input [0=stdin]
- --dsymutil=no|yes run dsymutil on Mac OS X when helpful? [no]
+ --dsymutil=no|yes run dsymutil on Mac OS X when helpful? [yes]
--max-stackframe=<number> assume stack switch for SP changes larger
than <number> bytes [2000000]
--main-stacksize=<number> set size of main thread's stack (in bytes)
|
|
From: <sv...@va...> - 2015-08-31 14:24:22
|
Author: sewardj
Date: Mon Aug 31 15:24:14 2015
New Revision: 15602
Log:
Revisit r15601 (Change the --smc-check default value to =all-non-file.)
to restrict the change to those architectures that do provide automatic
D-I coherence (x86, amd64, s390x). This commit restores the default
value for all other architectures back to its pre r15601 state, so as not
to burden those architectures unnecessarily with =all-non-file.
Also, this rewrites the relevant manual section.
Modified:
trunk/coregrind/m_options.c
trunk/docs/xml/manual-core.xml
Modified: trunk/coregrind/m_options.c
==============================================================================
--- trunk/coregrind/m_options.c (original)
+++ trunk/coregrind/m_options.c Mon Aug 31 15:24:14 2015
@@ -129,13 +129,26 @@
Word VG_(clo_main_stacksize) = 0; /* use client's rlimit.stack */
Word VG_(clo_valgrind_stacksize) = VG_DEFAULT_STACK_ACTIVE_SZB;
Bool VG_(clo_wait_for_gdb) = False;
-VgSmc VG_(clo_smc_check) = Vg_SmcAllNonFile;
UInt VG_(clo_kernel_variant) = 0;
Bool VG_(clo_dsymutil) = False;
Bool VG_(clo_sigill_diag) = True;
UInt VG_(clo_unw_stack_scan_thresh) = 0; /* disabled by default */
UInt VG_(clo_unw_stack_scan_frames) = 5;
+// Set clo_smc_check so that it provides transparent self modifying
+// code support for "correct" programs at the smallest achievable
+// expense for this arch.
+#if defined(VGA_x86) || defined(VGA_amd64) || defined(VGA_s390x)
+VgSmc VG_(clo_smc_check) = Vg_SmcAllNonFile;
+#elif defined(VGA_ppc32) || defined(VGA_ppc64be) || defined(VGA_ppc64le) \
+ || defined(VGA_arm) || defined(VGA_arm64) \
+ || defined(VGA_mips32) || defined(VGA_mips64) \
+ || defined(VGA_tilegx)
+VgSmc VG_(clo_smc_check) = Vg_SmcStack;
+#else
+# error "Unknown arch"
+#endif
+
#if defined(VGO_darwin)
UInt VG_(clo_resync_filter) = 1; /* enabled, but quiet */
#else
Modified: trunk/docs/xml/manual-core.xml
==============================================================================
--- trunk/docs/xml/manual-core.xml (original)
+++ trunk/docs/xml/manual-core.xml Mon Aug 31 15:24:14 2015
@@ -1704,60 +1704,60 @@
<varlistentry id="opt.smc-check" xreflabel="--smc-check">
<term>
- <option><![CDATA[--smc-check=<none|stack|all|all-non-file> [default: all-non-file] ]]></option>
+ <option><![CDATA[--smc-check=<none|stack|all|all-non-file>
+ [default: all-non-file for x86/amd64/s390x, stack for other archs] ]]></option>
</term>
<listitem>
<para>This option controls Valgrind's detection of self-modifying
- code. If no checking is done, if a program executes some code, then
- overwrites it with new code, and executes the new code, Valgrind will
- continue to execute the translations it made for the old code. This
- will likely lead to incorrect behaviour and/or crashes.</para>
-
- <para>Valgrind has four levels of self-modifying code detection:
- no detection, detect self-modifying code on the stack (which is used by
- GCC to implement nested functions), detect self-modifying code
- everywhere, and detect self-modifying code everywhere except in
- file-backed mappings.
-
- Note that the default option will catch the vast majority
- of cases, including the case where a JIT
- compiler dynamically generates code <emphasis>and</emphasis>
- subsequently overwrites part or all of it. Running with
- <varname>all</varname> will slow Valgrind down noticeably.
- Running with
- <varname>none</varname> will rarely speed things up, since very little
- code gets dynamically generated in most programs. The
- <function>VALGRIND_DISCARD_TRANSLATIONS</function> client
- request is an alternative to <option>--smc-check=all</option>
- and <option>--smc-check=all-non-file</option>
- that requires more programmer effort but allows Valgrind to run
- your program faster, by telling it precisely when translations
- need to be re-made.
- <!-- commented out because it causes broken links in the man page
- ; see <xref
- linkend="manual-core-adv.clientreq"/> for more details.
- -->
- </para>
-
+ code. If no checking is done, when a program executes some code, then
+ overwrites it with new code, and executes the new code, Valgrind will
+ continue to execute the translations it made for the old code. This
+ will likely lead to incorrect behaviour and/or crashes.</para>
+ <para>For "modern" architectures -- anything that's not x86,
+ amd64 or s390x -- the default is <varname>stack</varname>.
+ This is because a correct program must take explicit action
+ to reestablish D-I cache coherence following code
+ modification. Valgrind observes and honours such actions,
+ with the result that self-modifying code is transparently
+ handled with zero extra cost.</para>
+ <para>For x86, amd64 and s390x, the program is not required to
+ notify the hardware of required D-I coherence syncing. Hence
+ the default is <varname>all-non-file</varname>, which covers
+ the normal case of generating code into an anonymous
+ (non-file-backed) mmap'd area.</para>
+ <para>The meanings of the four available settings are as
+ follows. No detection (<varname>none</varname>),
+ detect self-modifying code
+ on the stack (which is used by GCC to implement nested
+ functions) (<varname>stack</varname>), detect self-modifying code
+ everywhere (<varname>all</varname>), and detect
+ self-modifying code everywhere except in file-backed
+ mappings (<varname>all-non-file</varname>).</para>
+ <para>Running with <varname>all</varname> will slow Valgrind
+ down noticeably. Running with <varname>none</varname> will
+ rarely speed things up, since very little code gets
+ dynamically generated in most programs. The
+ <function>VALGRIND_DISCARD_TRANSLATIONS</function> client
+ request is an alternative to <option>--smc-check=all</option>
+ and <option>--smc-check=all-non-file</option>
+ that requires more programmer effort but allows Valgrind to run
+ your program faster, by telling it precisely when translations
+ need to be re-made.
+ <!-- commented out because it causes broken links in the man page
+ ; see <xref
+ linkend="manual-core-adv.clientreq"/> for more details.
+ -->
+ </para>
<para><option>--smc-check=all-non-file</option> provides a
- cheaper but more limited version
- of <option>--smc-check=all</option>. It adds checks to any
- translations that do not originate from file-backed memory
- mappings. Typical applications that generate code, for example
- JITs in web browsers, generate code into anonymous mmaped areas,
- whereas the "fixed" code of the browser always lives in
- file-backed mappings. <option>--smc-check=all-non-file</option>
- takes advantage of this observation, limiting the overhead of
- checking to code which is likely to be JIT generated.</para>
-
- <para>Some architectures (including POWER/PPC, ARM and MIPS)
- require programs which create code at runtime to flush the
- instruction cache in between code generation and first use.
- Valgrind observes and honours such instructions. Hence, on
- those targets, Valgrind always provides
- complete, transparent support for self-modifying code. It is
- only on platforms such as x86/Linux, AMD64/Linux, x86/Darwin,
- AMD64/Darwin and S390/Linux that you need to use this option.</para>
+ cheaper but more limited version
+ of <option>--smc-check=all</option>. It adds checks to any
+ translations that do not originate from file-backed memory
+ mappings. Typical applications that generate code, for example
+ JITs in web browsers, generate code into anonymous mmaped areas,
+ whereas the "fixed" code of the browser always lives in
+ file-backed mappings. <option>--smc-check=all-non-file</option>
+ takes advantage of this observation, limiting the overhead of
+ checking to code which is likely to be JIT generated.</para>
</listitem>
</varlistentry>
|
Author: sewardj
Date: Mon Aug 31 14:05:35 2015
New Revision: 15601
Log:
Change the --smc-check default value to =all-non-file.
Modified:
trunk/coregrind/m_main.c
trunk/coregrind/m_options.c
trunk/docs/xml/manual-core.xml
trunk/none/tests/cmdline1.stdout.exp
trunk/none/tests/cmdline2.stdout.exp
trunk/perf/bigcode.c
trunk/perf/bigcode1.vgperf
trunk/perf/bigcode2.vgperf
Modified: trunk/coregrind/m_main.c
==============================================================================
--- trunk/coregrind/m_main.c (original)
+++ trunk/coregrind/m_main.c Mon Aug 31 14:05:35 2015
@@ -160,7 +160,7 @@
" --allow-mismatched-debuginfo=no|yes [no]\n"
" for the above two flags only, accept debuginfo\n"
" objects that don't \"match\" the main object\n"
-" --smc-check=none|stack|all|all-non-file [stack]\n"
+" --smc-check=none|stack|all|all-non-file [all-non-file]\n"
" checks for self-modifying code: none, only for\n"
" code found in stacks, for all code, or for all\n"
" code except that from file-backed mappings\n"
Modified: trunk/coregrind/m_options.c
==============================================================================
--- trunk/coregrind/m_options.c (original)
+++ trunk/coregrind/m_options.c Mon Aug 31 14:05:35 2015
@@ -129,7 +129,7 @@
Word VG_(clo_main_stacksize) = 0; /* use client's rlimit.stack */
Word VG_(clo_valgrind_stacksize) = VG_DEFAULT_STACK_ACTIVE_SZB;
Bool VG_(clo_wait_for_gdb) = False;
-VgSmc VG_(clo_smc_check) = Vg_SmcStack;
+VgSmc VG_(clo_smc_check) = Vg_SmcAllNonFile;
UInt VG_(clo_kernel_variant) = 0;
Bool VG_(clo_dsymutil) = False;
Bool VG_(clo_sigill_diag) = True;
Modified: trunk/docs/xml/manual-core.xml
==============================================================================
--- trunk/docs/xml/manual-core.xml (original)
+++ trunk/docs/xml/manual-core.xml Mon Aug 31 14:05:35 2015
@@ -1704,7 +1704,7 @@
<varlistentry id="opt.smc-check" xreflabel="--smc-check">
<term>
- <option><![CDATA[--smc-check=<none|stack|all|all-non-file> [default: stack] ]]></option>
+ <option><![CDATA[--smc-check=<none|stack|all|all-non-file> [default: all-non-file] ]]></option>
</term>
<listitem>
<para>This option controls Valgrind's detection of self-modifying
@@ -1720,15 +1720,16 @@
file-backed mappings.
Note that the default option will catch the vast majority
- of cases. The main case it will not catch is programs such as JIT
- compilers that dynamically generate code <emphasis>and</emphasis>
- subsequently overwrite part or all of it. Running with
+ of cases, including the case where a JIT
+ compiler dynamically generates code <emphasis>and</emphasis>
+ subsequently overwrites part or all of it. Running with
<varname>all</varname> will slow Valgrind down noticeably.
Running with
<varname>none</varname> will rarely speed things up, since very little
- code gets put on the stack for most programs. The
+ code gets dynamically generated in most programs. The
<function>VALGRIND_DISCARD_TRANSLATIONS</function> client
request is an alternative to <option>--smc-check=all</option>
+ and <option>--smc-check=all-non-file</option>
that requires more programmer effort but allows Valgrind to run
your program faster, by telling it precisely when translations
need to be re-made.
@@ -1749,14 +1750,14 @@
takes advantage of this observation, limiting the overhead of
checking to code which is likely to be JIT generated.</para>
- <para>Some architectures (including ppc32, ppc64, ARM and MIPS)
+ <para>Some architectures (including POWER/PPC, ARM and MIPS)
require programs which create code at runtime to flush the
instruction cache in between code generation and first use.
Valgrind observes and honours such instructions. Hence, on
- ppc32/Linux, ppc64/Linux and ARM/Linux, Valgrind always provides
+ those targets, Valgrind always provides
complete, transparent support for self-modifying code. It is
- only on platforms such as x86/Linux, AMD64/Linux, x86/Darwin and
- AMD64/Darwin that you need to use this option.</para>
+ only on platforms such as x86/Linux, AMD64/Linux, x86/Darwin,
+ AMD64/Darwin and S390/Linux that you need to use this option.</para>
</listitem>
</varlistentry>
Modified: trunk/none/tests/cmdline1.stdout.exp
==============================================================================
--- trunk/none/tests/cmdline1.stdout.exp (original)
+++ trunk/none/tests/cmdline1.stdout.exp Mon Aug 31 14:05:35 2015
@@ -74,7 +74,7 @@
--allow-mismatched-debuginfo=no|yes [no]
for the above two flags only, accept debuginfo
objects that don't "match" the main object
- --smc-check=none|stack|all|all-non-file [stack]
+ --smc-check=none|stack|all|all-non-file [all-non-file]
checks for self-modifying code: none, only for
code found in stacks, for all code, or for all
code except that from file-backed mappings
Modified: trunk/none/tests/cmdline2.stdout.exp
==============================================================================
--- trunk/none/tests/cmdline2.stdout.exp (original)
+++ trunk/none/tests/cmdline2.stdout.exp Mon Aug 31 14:05:35 2015
@@ -74,7 +74,7 @@
--allow-mismatched-debuginfo=no|yes [no]
for the above two flags only, accept debuginfo
objects that don't "match" the main object
- --smc-check=none|stack|all|all-non-file [stack]
+ --smc-check=none|stack|all|all-non-file [all-non-file]
checks for self-modifying code: none, only for
code found in stacks, for all code, or for all
code except that from file-backed mappings
Modified: trunk/perf/bigcode.c
==============================================================================
--- trunk/perf/bigcode.c (original)
+++ trunk/perf/bigcode.c Mon Aug 31 14:05:35 2015
@@ -8,6 +8,19 @@
// to make a difference), but under Valgrind the one running more code is
// significantly slower due to the extra translation time.
+// 31 Aug 2015: this only "works" on x86/amd64/s390 by accident; the
+// test is essentially kludged. This "generates" code into memory
+// (the mmap'd area) and the executes it. But historically and even
+// after this commit (r15601), the test has been run without
+// --smc-check=all or all-non-file. That just happens to work because
+// the "generated" code is never modified, so there's never a
+// translated-vs-reality coherence problem. Really we ought to run
+// with the new-as-of-r15601 default --smc-check=all-non-file, but that
+// hugely slows it down and makes the results non-comparable with
+// pre r15601 results, so instead the .vgperf files now specify the
+// old default value --smc-check=stack explicitly.
+
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Modified: trunk/perf/bigcode1.vgperf
==============================================================================
--- trunk/perf/bigcode1.vgperf (original)
+++ trunk/perf/bigcode1.vgperf Mon Aug 31 14:05:35 2015
@@ -1 +1,2 @@
prog: bigcode
+vgopts: --smc-check=stack
Modified: trunk/perf/bigcode2.vgperf
==============================================================================
--- trunk/perf/bigcode2.vgperf (original)
+++ trunk/perf/bigcode2.vgperf Mon Aug 31 14:05:35 2015
@@ -1,2 +1,3 @@
prog: bigcode
args: 0
+vgopts: --smc-check=stack
|
Author: sewardj
Date: Mon Aug 31 11:36:02 2015
New Revision: 15600
Log:
Make --partial-loads-ok=yes the default on all platforms, not just OS X.
Modified:
trunk/memcheck/docs/mc-manual.xml
trunk/memcheck/mc_main.c
trunk/memcheck/tests/partial_load_dflt.stderr.exp
trunk/memcheck/tests/partial_load_dflt.stderr.exp64
trunk/memcheck/tests/test-plo-no.vgtest
Modified: trunk/memcheck/docs/mc-manual.xml
==============================================================================
--- trunk/memcheck/docs/mc-manual.xml (original)
+++ trunk/memcheck/docs/mc-manual.xml Mon Aug 31 11:36:02 2015
@@ -947,7 +947,7 @@
<varlistentry id="opt.partial-loads-ok" xreflabel="--partial-loads-ok">
<term>
- <option><![CDATA[--partial-loads-ok=<yes|no> [default: no] ]]></option>
+ <option><![CDATA[--partial-loads-ok=<yes|no> [default: yes] ]]></option>
</term>
<listitem>
<para>Controls how Memcheck handles 32-, 64-, 128- and 256-bit
@@ -965,8 +965,7 @@
<para>Note that code that behaves in this way is in violation of
the ISO C/C++ standards, and should be considered broken. If
- at all possible, such code should be fixed. This option should be
- used only as a last resort.</para>
+ at all possible, such code should be fixed.</para>
</listitem>
</varlistentry>
Modified: trunk/memcheck/mc_main.c
==============================================================================
--- trunk/memcheck/mc_main.c (original)
+++ trunk/memcheck/mc_main.c Mon Aug 31 11:36:02 2015
@@ -5689,15 +5689,10 @@
/*--- Command line args ---*/
/*------------------------------------------------------------*/
-/* --partial-loads-ok: enable by default on MacOS. The MacOS system
- graphics libraries are heavily vectorised, and not enabling this by
- default causes lots of false errors. */
-#if defined(VGO_darwin)
+/* 31 Aug 2015: Vectorised code is now so widespread that
+ --partial-loads-ok needs to be enabled by default on all platforms.
+ Not doing so causes lots of false errors. */
Bool MC_(clo_partial_loads_ok) = True;
-#else
-Bool MC_(clo_partial_loads_ok) = False;
-#endif
-
Long MC_(clo_freelist_vol) = 20*1000*1000LL;
Long MC_(clo_freelist_big_blocks) = 1*1000*1000LL;
LeakCheckMode MC_(clo_leak_check) = LC_Summary;
@@ -5874,11 +5869,6 @@
static void mc_print_usage(void)
{
- const HChar* plo_default = "no";
-# if defined(VGO_darwin)
- plo_default = "yes";
-# endif
-
VG_(printf)(
" --leak-check=no|summary|full search for memory leaks at exit? [summary]\n"
" --leak-resolution=low|med|high differentiation of leak stack traces [high]\n"
@@ -5899,7 +5889,7 @@
" same as --show-leak-kinds=definite\n"
" --undef-value-errors=no|yes check for undefined value errors [yes]\n"
" --track-origins=no|yes show origins of undefined values? [no]\n"
-" --partial-loads-ok=no|yes too hard to explain here; see manual [%s]\n"
+" --partial-loads-ok=no|yes too hard to explain here; see manual [yes]\n"
" --freelist-vol=<number> volume of freed blocks queue [20000000]\n"
" --freelist-big-blocks=<number> releases first blocks with size>= [1000000]\n"
" --workaround-gcc296-bugs=no|yes self explanatory [no]\n"
@@ -5909,7 +5899,6 @@
" --keep-stacktraces=alloc|free|alloc-and-free|alloc-then-free|none\n"
" stack trace(s) to keep for malloc'd/free'd areas [alloc-and-free]\n"
" --show-mismatched-frees=no|yes show frees that don't match the allocator? [yes]\n"
-, plo_default
);
}
Modified: trunk/memcheck/tests/partial_load_dflt.stderr.exp
==============================================================================
--- trunk/memcheck/tests/partial_load_dflt.stderr.exp (original)
+++ trunk/memcheck/tests/partial_load_dflt.stderr.exp Mon Aug 31 11:36:02 2015
@@ -1,11 +1,5 @@
Invalid read of size 4
- at 0x........: main (partial_load.c:16)
- Address 0x........ is 0 bytes inside a block of size 3 alloc'd
- at 0x........: calloc (vg_replace_malloc.c:...)
- by 0x........: main (partial_load.c:14)
-
-Invalid read of size 4
at 0x........: main (partial_load.c:23)
Address 0x........ is 1 bytes inside a block of size 4 alloc'd
at 0x........: calloc (vg_replace_malloc.c:...)
@@ -31,4 +25,4 @@
For a detailed leak analysis, rerun with: --leak-check=full
For counts of detected and suppressed errors, rerun with: -v
-ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
Modified: trunk/memcheck/tests/partial_load_dflt.stderr.exp64
==============================================================================
--- trunk/memcheck/tests/partial_load_dflt.stderr.exp64 (original)
+++ trunk/memcheck/tests/partial_load_dflt.stderr.exp64 Mon Aug 31 11:36:02 2015
@@ -1,11 +1,5 @@
Invalid read of size 8
- at 0x........: main (partial_load.c:16)
- Address 0x........ is 0 bytes inside a block of size 7 alloc'd
- at 0x........: calloc (vg_replace_malloc.c:...)
- by 0x........: main (partial_load.c:14)
-
-Invalid read of size 8
at 0x........: main (partial_load.c:23)
Address 0x........ is 1 bytes inside a block of size 8 alloc'd
at 0x........: calloc (vg_replace_malloc.c:...)
@@ -31,4 +25,4 @@
For a detailed leak analysis, rerun with: --leak-check=full
For counts of detected and suppressed errors, rerun with: -v
-ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
Modified: trunk/memcheck/tests/test-plo-no.vgtest
==============================================================================
--- trunk/memcheck/tests/test-plo-no.vgtest (original)
+++ trunk/memcheck/tests/test-plo-no.vgtest Mon Aug 31 11:36:02 2015
@@ -1,2 +1,2 @@
prog: test-plo
-vgopts: -q --keep-stacktraces=alloc-then-free
+vgopts: -q --partial-loads-ok=no --keep-stacktraces=alloc-then-free
|
|
From: Mark W. <mj...@re...> - 2015-08-31 08:37:45
|
On Thu, 2015-08-27 at 13:58 +0200, Julian Seward wrote: > I would also like to propose the following changes: > > --smc-check=all-non-file > > So as to give transparent support for JIT generated code. No perf effect > on "normal" (file-backed) code. Yes, please. I always forget myself, and if any run time generated code is involved not having it on is really confusing. > --dsymutil=yes > > Since you always need to use this on MacOS, else stack traces are missing > or wrong. No opinion here. But if MacOS users find it useful, lets do it. > --read-inline-info=yes > > My experience of the inlined-unwind functionality introduced in 3.10.0 has > been positive, and I always use it. I think it's time to enable it by > default. Agreed. Although in theory this might cause subtle changes in suppression files (I haven't personally seen this, so it might only be theoretical). Cheers, Mark |