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
(9) |
2
(11) |
3
(3) |
4
(7) |
5
(15) |
|
6
(10) |
7
(9) |
8
(12) |
9
(10) |
10
(6) |
11
(12) |
12
(12) |
|
13
(11) |
14
(14) |
15
(18) |
16
(15) |
17
(19) |
18
(15) |
19
(9) |
|
20
|
21
(5) |
22
(10) |
23
(15) |
24
(18) |
25
(20) |
26
(15) |
|
27
(14) |
28
(11) |
29
(17) |
30
(17) |
31
(23) |
|
|
|
From: <sv...@va...> - 2014-07-30 18:41:01
|
Author: florian
Date: Wed Jul 30 18:40:52 2014
New Revision: 14211
Log:
Fix copyright years.
Modified:
trunk/coregrind/m_initimg/priv_initimg_pathscan.h
Modified: trunk/coregrind/m_initimg/priv_initimg_pathscan.h
==============================================================================
--- trunk/coregrind/m_initimg/priv_initimg_pathscan.h (original)
+++ trunk/coregrind/m_initimg/priv_initimg_pathscan.h Wed Jul 30 18:40:52 2014
@@ -8,7 +8,7 @@
This file is part of Valgrind, a dynamic binary instrumentation
framework.
- Copyright (C) 2006-2007 OpenWorks LLP
+ Copyright (C) 2006-2013 OpenWorks LLP
in...@op...
This program is free software; you can redistribute it and/or
|
Author: florian
Date: Wed Jul 30 14:24:10 2014
New Revision: 14210
Log:
Change VG_(readlink) and VG_(resolve_filename) to return pointer to
dynamically allocated string which will be overwritten with each
invocation. Fix call sites.
Modified:
branches/BUF_REMOVAL/coregrind/m_coredump/coredump-elf.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/debuginfo.c
branches/BUF_REMOVAL/coregrind/m_libcfile.c
branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-generic.c
branches/BUF_REMOVAL/coregrind/pub_core_libcfile.h
branches/BUF_REMOVAL/include/pub_tool_libcfile.h
Modified: branches/BUF_REMOVAL/coregrind/m_coredump/coredump-elf.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_coredump/coredump-elf.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_coredump/coredump-elf.c Wed Jul 30 14:24:10 2014
@@ -193,7 +193,7 @@
static void fill_prpsinfo(const ThreadState *tst,
struct vki_elf_prpsinfo *prpsinfo)
{
- static HChar name[VKI_PATH_MAX];
+ HChar *name;
VG_(memset)(prpsinfo, 0, sizeof(*prpsinfo));
@@ -220,7 +220,7 @@
prpsinfo->pr_uid = 0;
prpsinfo->pr_gid = 0;
- if (VG_(resolve_filename)(VG_(cl_exec_fd), name, VKI_PATH_MAX)) {
+ if (VG_(resolve_filename)(VG_(cl_exec_fd), &name)) {
HChar *n = name+VG_(strlen)(name)-1;
while (n > name && *n != '/')
Modified: branches/BUF_REMOVAL/coregrind/m_debuginfo/debuginfo.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_debuginfo/debuginfo.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_debuginfo/debuginfo.c Wed Jul 30 14:24:10 2014
@@ -1090,7 +1090,6 @@
{
Int i, r, sz_exename;
ULong obj_mtime, pdb_mtime;
- HChar exename[VKI_PATH_MAX];
HChar* pdbname = NULL;
HChar* dot;
SysRes sres;
@@ -1111,21 +1110,23 @@
time into obj_mtime. */
r = VG_(fstat)(fd_obj, &stat_buf);
if (r == -1)
- goto out; /* stat failed ?! */
+ return; /* stat failed ?! */
vg_assert(r == 0);
obj_mtime = stat_buf.mtime;
- /* and get its name into exename[]. */
- vg_assert(VKI_PATH_MAX > 100); /* to ensure /proc/self/fd/%d is safe */
- VG_(memset)(exename, 0, sizeof(exename));
- VG_(sprintf)(exename, "/proc/self/fd/%d", fd_obj);
- /* convert exename from a symlink to real name .. overwrites the
- old contents of the buffer. Ick. */
- sz_exename = VG_(readlink)(exename, exename, sizeof(exename)-2 );
+ /* and get its name into exename. */
+ HChar tmp[64]; // large enough
+ VG_(sprintf)(tmp, "/proc/self/fd/%d", fd_obj);
+
+ /* convert tmp from a symlink to real name */
+ HChar *exe;
+ sz_exename = VG_(readlink)(tmp, &exe);
+
if (sz_exename == -1)
- goto out; /* readlink failed ?! */
- vg_assert(sz_exename >= 0 && sz_exename < sizeof(exename));
- vg_assert(exename[sizeof(exename)-1] == 0);
+ return; /* readlink failed ?! */
+
+ HChar exename[sz_exename + 1];
+ VG_(strcpy)(exename, exe); // make a copy on the stack
if (VG_(clo_verbosity) > 0) {
VG_(message)(Vg_UserMsg, "LOAD_PDB_DEBUGINFO: objname: %s\n", exename);
Modified: branches/BUF_REMOVAL/coregrind/m_libcfile.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_libcfile.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_libcfile.c Wed Jul 30 14:24:10 2014
@@ -70,14 +70,18 @@
/* Given a file descriptor, attempt to deduce its filename. To do
this, we use /proc/self/fd/<FD>. If this doesn't point to a file,
- or if it doesn't exist, we return False. */
-Bool VG_(resolve_filename) ( Int fd, HChar* buf, Int n_buf )
+ or if it doesn't exist, we return False.
+ Upon successful completion *result contains the filename. The
+ filename will be overwritten with the next invocation so callers
+ need to copy the filename if needed. *result is NULL if the filename
+ cannot be deduced. */
+Bool VG_(resolve_filename) ( Int fd, HChar** result )
{
# if defined(VGO_linux)
- HChar tmp[64];
+ HChar tmp[64]; // large enough
VG_(sprintf)(tmp, "/proc/self/fd/%d", fd);
- VG_(memset)(buf, 0, n_buf);
- if (VG_(readlink)(tmp, buf, n_buf) > 0 && buf[0] == '/')
+
+ if (VG_(readlink)(tmp, result) > 0 && (*result)[0] == '/')
return True;
else
return False;
@@ -85,12 +89,16 @@
# elif defined(VGO_darwin)
HChar tmp[VKI_MAXPATHLEN+1];
if (0 == VG_(fcntl)(fd, VKI_F_GETPATH, (UWord)tmp)) {
- if (n_buf > 0) {
- VG_(strncpy)( buf, tmp, n_buf < sizeof(tmp) ? n_buf : sizeof(tmp) );
- buf[n_buf-1] = 0;
- }
- if (tmp[0] == '/') return True;
+ static HChar *buf = NULL;
+
+ if (buf == NULL)
+ buf = VG_(arena_malloc)(VG_AR_CORE, VKI_MAXPATHLEN+1);
+ VG_(strcpy)( buf, tmp );
+
+ *result = buf;
+ if (result[0] == '/') return True;
}
+ *result = NULL;
return False;
# else
@@ -507,17 +515,51 @@
}
-Int VG_(readlink) (const HChar* path, HChar* buf, UInt bufsiz)
+/* Perform the readlink operation on path. Upon successful completion
+ *result points to a dynamically allocated buffer that contains the
+ untruncated contents of the symbolic link. The string is properly
+ terminated with '\0'. The return value is the number of characters
+ written to that buffer not counting the terminating '\0' character.
+ This buffer will be overwritten in the next invocation so callers
+ need to copy the result if needed.
+ If the operation fails, the function returns -1 and *result is NULL. */
+Int VG_(readlink) (const HChar* path, HChar** result)
{
SysRes res;
- /* res = readlink( path, buf, bufsiz ); */
+ static HChar *buf = NULL;
+ static UInt bufsiz = 0;
+
+ if (buf == NULL) { // 1st time
+ bufsiz = VKI_PATH_MAX;
+ buf = VG_(arena_malloc)(VG_AR_CORE, "readlink", bufsiz);
+ }
+
+ while (42) {
# if defined(VGP_arm64_linux)
- res = VG_(do_syscall4)(__NR_readlinkat, VKI_AT_FDCWD,
+ res = VG_(do_syscall4)(__NR_readlinkat, VKI_AT_FDCWD,
(UWord)path, (UWord)buf, bufsiz);
# else
- res = VG_(do_syscall3)(__NR_readlink, (UWord)path, (UWord)buf, bufsiz);
+ res = VG_(do_syscall3)(__NR_readlink, (UWord)path, (UWord)buf, bufsiz);
# endif
- return sr_isError(res) ? -1 : sr_Res(res);
+ if (sr_isError(res)) {
+ *result = NULL;
+ return -1;
+ }
+ UInt num_char_written = sr_Res(res);
+
+ if (num_char_written == bufsiz) {
+ // Buffer was too small. Increase size and retry.
+ bufsiz += VKI_PATH_MAX;
+ buf = VG_(arena_realloc)(VG_AR_CORE, "readlink", buf, bufsiz);
+ continue;
+ }
+
+ vg_assert(num_char_written < bufsiz); // paranoia
+
+ buf[num_char_written] = '\0'; // properly terminate
+ *result = buf;
+ return num_char_written;
+ }
}
Int VG_(getdents) (Int fd, struct vki_dirent *dirp, UInt count)
Modified: branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-generic.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-generic.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_syswrap/syswrap-generic.c Wed Jul 30 14:24:10 2014
@@ -591,9 +591,9 @@
// Record opening of an fd, and find its name.
void ML_(record_fd_open_named)(ThreadId tid, Int fd)
{
- static HChar buf[VKI_PATH_MAX];
+ HChar* buf;
HChar* name;
- if (VG_(resolve_filename)(fd, buf, VKI_PATH_MAX))
+ if (VG_(resolve_filename)(fd, &buf))
name = buf;
else
name = NULL;
Modified: branches/BUF_REMOVAL/coregrind/pub_core_libcfile.h
==============================================================================
--- branches/BUF_REMOVAL/coregrind/pub_core_libcfile.h (original)
+++ branches/BUF_REMOVAL/coregrind/pub_core_libcfile.h Wed Jul 30 14:24:10 2014
@@ -44,7 +44,7 @@
extern Int VG_(fcntl) ( Int fd, Int cmd, Addr arg );
/* Convert an fd into a filename */
-extern Bool VG_(resolve_filename) ( Int fd, HChar* buf, Int n_buf );
+extern Bool VG_(resolve_filename) ( Int fd, HChar** buf );
/* Return the size of a file, or -1 in case of error */
extern Long VG_(fsize) ( Int fd );
Modified: branches/BUF_REMOVAL/include/pub_tool_libcfile.h
==============================================================================
--- branches/BUF_REMOVAL/include/pub_tool_libcfile.h (original)
+++ branches/BUF_REMOVAL/include/pub_tool_libcfile.h Wed Jul 30 14:24:10 2014
@@ -91,7 +91,7 @@
extern SysRes VG_(poll) (struct vki_pollfd *fds, Int nfds, Int timeout);
-extern Int VG_(readlink)( const HChar* path, HChar* buf, UInt bufsize );
+extern Int VG_(readlink)( const HChar* path, HChar** buf );
extern Int VG_(getdents)( Int fd, struct vki_dirent *dirp, UInt count );
extern const HChar* VG_(basename)( const HChar* path );
|
|
From: <sv...@va...> - 2014-07-30 11:57:06
|
Author: florian
Date: Wed Jul 30 11:56:59 2014
New Revision: 14209
Log:
In VG_(redir_notify_new_DebugInfo) use a large enough buffer
allocated on the stack.
Modified:
branches/BUF_REMOVAL/coregrind/m_redir.c
Modified: branches/BUF_REMOVAL/coregrind/m_redir.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_redir.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_redir.c Wed Jul 30 11:56:59 2014
@@ -445,15 +445,15 @@
pointing to files inside the valgrind build directories. */
struct vg_stat newdi_stat;
SysRes newdi_res;
- HChar in_vglib_filename[VKI_PATH_MAX];
struct vg_stat in_vglib_stat;
SysRes in_vglib_res;
newdi_res = VG_(stat)(newdi_filename, &newdi_stat);
-
- VG_(strncpy) (in_vglib_filename, VG_(libdir), VKI_PATH_MAX);
- VG_(strncat) (in_vglib_filename, "/", VKI_PATH_MAX);
- VG_(strncat) (in_vglib_filename, newdi_basename, VKI_PATH_MAX);
+
+ HChar in_vglib_filename[VG_(strlen)(VG_(libdir)) + 1 +
+ VG_(strlen)(newdi_basename) + 1];
+ VG_(sprintf)("%s/%s", VG_(libdir), newdi_basename);
+
in_vglib_res = VG_(stat)(in_vglib_filename, &in_vglib_stat);
/* If we find newdi_basename in inner VALGRIND_LIB
|
|
From: <sv...@va...> - 2014-07-30 11:42:46
|
Author: florian
Date: Wed Jul 30 11:42:38 2014
New Revision: 14208
Log:
In read_dot_valgrindrc use a large enough buffer allocated on the
stack.
Also assert that the passed in directory is not NULL. This is
true at all call sites. The old code would have attempted to read
/.valgrindrc for dir == NULL and I don't think we want that.
Modified:
branches/BUF_REMOVAL/coregrind/m_commandline.c
Modified: branches/BUF_REMOVAL/coregrind/m_commandline.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_commandline.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_commandline.c Wed Jul 30 11:42:38 2014
@@ -59,10 +59,13 @@
SysRes fd;
struct vg_stat stat_buf;
HChar* f_clo = NULL;
- HChar filename[VKI_PATH_MAX];
+ const HChar dot_valgrindrc[] = ".valgrindrc";
+
+ vg_assert(dir != NULL);
+
+ HChar filename[VG_(strlen)(dir) + 1 + VG_(strlen)(dot_valgrindrc) + 1];
+ VG_(sprintf)(filename, "%s/%s", dir, dot_valgrindrc);
- VG_(snprintf)(filename, VKI_PATH_MAX, "%s/.valgrindrc",
- ( NULL == dir ? "" : dir ) );
fd = VG_(open)(filename, 0, VKI_S_IRUSR);
if ( !sr_isError(fd) ) {
Int res = VG_(fstat)( sr_Res(fd), &stat_buf );
|
|
From: <sv...@va...> - 2014-07-30 11:18:49
|
Author: florian
Date: Wed Jul 30 11:18:38 2014
New Revision: 14207
Log:
Harmles tweak in VG_(record_startup_wd) to not allocate too much
memory.
Modified:
branches/BUF_REMOVAL/coregrind/m_libcfile.c
Modified: branches/BUF_REMOVAL/coregrind/m_libcfile.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_libcfile.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_libcfile.c Wed Jul 30 11:18:38 2014
@@ -432,7 +432,7 @@
there is a problem. */
Bool VG_(record_startup_wd) ( void )
{
- Int szB = VKI_PATH_MAX;
+ Int szB = 0;
vg_assert(!startup_wd_acquired);
# if defined(VGO_linux)
|
|
From: Rich C. <rc...@wi...> - 2014-07-30 05:13:01
|
valgrind revision: 14206
VEX revision: 2910
C compiler: gcc (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388]
GDB: GNU gdb (GDB; openSUSE Factory) 7.6.50.20130731-cvs
Assembler: GNU assembler (GNU Binutils; openSUSE Factory) 2.23.2
C library: GNU C Library (GNU libc) stable release version 2.18 (git )
uname -mrs: Linux 3.11.4-3-desktop x86_64
Vendor version: Welcome to openSUSE 13.1 "Bottle" Beta 1 - Kernel %r (%t).
Nightly build on rodan ( Linux 3.11.4-3-desktop x86_64 )
Started at 2014-07-29 19:22:01 CDT
Ended at 2014-07-30 00:12:49 CDT
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 607 tests, 5 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/err_disable3 (stderr)
memcheck/tests/err_disable4 (stderr)
memcheck/tests/threadname (stderr)
memcheck/tests/threadname_xml (stderr)
exp-sgcheck/tests/hackedbz2 (stderr)
--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old
+ perl perf/vg_perf --tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old perf
-- Running tests in perf ----------------------------------------------
-- bigcode1 --
bigcode1 valgrind-new:0.48s no: 7.8s (16.3x, -----) me:15.0s (31.3x, -----) ca:61.2s (127.5x, -----) he: 9.0s (18.7x, -----) ca:25.5s (53.1x, -----) dr: 8.7s (18.2x, -----) ma: 9.1s (18.9x, -----)
bigcode1 valgrind-old:0.48s no: 7.8s (16.4x, -0.4%) me:15.1s (31.4x, -0.2%) ca:61.3s (127.6x, -0.1%) he: 8.9s (18.6x, 0.4%) ca:25.6s (53.4x, -0.5%) dr: 8.7s (18.2x, -0.1%) ma: 9.1s (18.9x, 0.0%)
-- bigcode2 --
bigcode2 valgrind-new:0.49s no:18.6s (38.0x, -----) me:38.5s (78.6x, -----) ca:105.2s (214.6x, -----) he:22.5s (45.9x, -----) ca:40.9s (83.4x, -----) dr:21.2s (43.3x, -----) ma:21.4s (43.6x, -----)
bigcode2 valgrind-old:0.49s no:18.8s (38.3x, -0.7%) me:38.6s (78.8x, -0.2%) ca:105.7s (215.7x, -0.5%) he:22.3s (45.5x, 0.7%) ca:41.1s (83.8x, -0.5%) dr:21.3s (43.5x, -0.4%) ma:21.4s (43.7x, -0.2%)
-- bz2 --
bz2 valgrind-new:2.32s no:10.2s ( 4.4x, -----) me:27.3s (11.8x, -----) ca:58.7s (25.3x, -----) he:39.6s (17.1x, -----) ca:75.9s (32.7x, -----) dr:57.2s (24.7x, -----) ma: 9.8s ( 4.2x, -----)
bz2 valgrind-old:2.32s no:10.2s ( 4.4x, -0.2%) me:27.3s (11.8x, 0.1%) ca:59.0s (25.4x, -0.5%) he:39.4s (17.0x, 0.6%) ca:76.1s (32.8x, -0.4%) dr:57.3s (24.7x, -0.1%) ma: 9.8s ( 4.2x, -0.1%)
-- fbench --
fbench valgrind-new:1.44s no: 5.5s ( 3.8x, -----) me:17.8s (12.4x, -----) ca:27.3s (19.0x, -----) he:12.9s ( 9.0x, -----) ca:21.6s (15.0x, -----) dr:13.0s ( 9.0x, -----) ma: 5.6s ( 3.9x, -----)
fbench valgrind-old:1.44s no: 5.4s ( 3.8x, 0.6%) me:17.8s (12.4x, -0.1%) ca:27.4s (19.0x, -0.4%) he:13.1s ( 9.1x, -1.7%) ca:21.7s (15.1x, -0.6%) dr:13.0s ( 9.0x, -0.4%) ma: 5.6s ( 3.9x, 0.4%)
-- ffbench --
ffbench valgrind-new:1.01s no: 3.7s ( 3.7x, -----) me:12.1s (11.9x, -----) ca: 8.2s ( 8.1x, -----) he:21.6s (21.4x, -----) ca:27.4s (27.2x, -----) dr:17.1s (16.9x, -----) ma: 3.7s ( 3.6x, -----)
ffbench valgrind-old:1.01s no: 3.7s ( 3.7x, 0.0%) me:12.1s (11.9x, 0.1%) ca: 8.3s ( 8.2x, -1.8%) he:21.5s (21.3x, 0.6%) ca:27.6s (27.3x, -0.5%) dr:17.1s (16.9x, -0.1%) ma: 3.7s ( 3.6x, 0.3%)
-- heap --
heap valgrind-new:0.41s no: 3.3s ( 8.1x, -----) me:22.1s (53.8x, -----) ca:31.6s (77.1x, -----) he:30.8s (75.0x, -----) ca:22.8s (55.5x, -----) dr:20.8s (50.7x, -----) ma:22.5s (54.9x, -----)
heap valgrind-old:0.41s no: 3.3s ( 8.1x, 0.3%) me:22.0s (53.7x, 0.1%) ca:31.2s (76.2x, 1.1%) he:30.8s (75.1x, -0.1%) ca:22.9s (55.8x, -0.5%) dr:20.7s (50.4x, 0.5%) ma:38.3s (93.3x,-69.9%)
-- heap_pdb4 --
heap_pdb4 valgrind-new:0.55s no: 3.6s ( 6.6x, -----) me:41.7s (75.8x, -----) ca:34.1s (62.1x, -----) he:35.7s (64.9x, -----) ca:24.9s (45.3x, -----) dr:23.1s (42.0x, -----) ma:24.0s (43.6x, -----)
heap_pdb4 valgrind-old:0.55s no: 3.7s ( 6.7x, -1.9%) me:41.6s (75.6x, 0.3%) ca:34.0s (61.9x, 0.3%) he:35.9s (65.2x, -0.5%) ca:25.0s (45.5x, -0.4%) dr:23.2s (42.1x, -0.2%) ma:39.9s (72.6x,-66.3%)
-- many-loss-records --
many-loss-records valgrind-new:0.05s no: 1.2s (25.0x, -----) me: 5.8s (115.6x, -----) ca: 5.1s (102.2x, -----) he: 5.3s (106.0x, -----) ca: 4.1s (81.4x, -----) dr: 4.8s (95.2x, -----) ma: 4.7s (94.4x, -----)
many-loss-records valgrind-old:0.05s no: 1.3s (25.2x, -0.8%) me: 5.9s (117.4x, -1.6%) ca: 5.2s (104.6x, -2.3%) he: 5.2s (104.8x, 1.1%) ca: 4.2s (84.0x, -3.2%) dr: 4.7s (94.8x, 0.4%) ma: 6.9s (138.8x,-47.0%)
-- many-xpts --
many-xpts valgrind-new:0.15s no: 1.5s (10.1x, -----) me: 7.0s (46.8x, -----) ca:12.9s (86.0x, -----) he: 9.9s (65.7x, -----) ca: 5.8s (38.9x, -----) dr: 6.3s (41.7x, -----) ma: 7.3s (48.8x, -----)
many-xpts valgrind-old:0.15s no: 1.5s (10.2x, -0.7%) me: 7.0s (46.8x, 0.0%) ca:13.1s (87.1x, -1.2%) he: 9.9s (66.3x, -0.9%) ca: 6.0s (39.8x, -2.2%) dr: 6.3s (41.9x, -0.3%) ma: 9.9s (66.0x,-35.2%)
-- sarp --
sarp valgrind-new:0.10s no: 1.5s (14.6x, -----) me: 9.4s (94.1x, -----) ca: 8.4s (84.5x, -----) he:30.7s (307.0x, -----) ca: 5.5s (55.5x, -----) dr: 4.1s (40.7x, -----) ma: 1.6s (15.5x, -----)
sarp valgrind-old:0.10s no: 1.5s (14.6x, 0.0%) me: 9.4s (94.1x, 0.0%) ca: 8.5s (85.1x, -0.7%) he:31.1s (310.9x, -1.3%) ca: 5.7s (56.5x, -1.8%) dr: 4.1s (40.9x, -0.5%) ma: 1.6s (15.5x, 0.0%)
-- tinycc --
tinycc valgrind-new:0.76s no: 7.6s (10.0x, -----) me:37.2s (48.9x, -----) ca:47.6s (62.6x, -----) he:45.3s (59.6x, -----) ca:45.0s (59.1x, -----) dr:37.7s (49.6x, -----) ma:12.0s (15.8x, -----)
tinycc valgrind-old:0.76s no: 7.6s (10.0x, -0.1%) me:37.3s (49.0x, -0.2%) ca:48.1s (63.3x, -1.1%) he:45.6s (60.0x, -0.6%) ca:45.3s (59.6x, -0.8%) dr:38.0s (50.0x, -0.8%) ma:14.2s (18.8x,-18.5%)
-- Finished tests in perf ----------------------------------------------
== 11 programs, 154 timings =================
real 164m29.226s
user 162m27.099s
sys 1m48.357s
=================================================
./valgrind-new/exp-sgcheck/tests/hackedbz2.stderr.diff-glibc28-amd64
=================================================
--- hackedbz2.stderr.exp-glibc28-amd64 2014-07-29 20:23:21.681912852 -0500
+++ hackedbz2.stderr.out 2014-07-29 21:27:08.617133462 -0500
@@ -1,7 +1,6 @@
Invalid read of size 1
- at 0x........: vex_strlen (hackedbz2.c:1006)
- by 0x........: add_to_myprintf_buf (hackedbz2.c:1284)
+ at 0x........: add_to_myprintf_buf (hackedbz2.c:1006)
by 0x........: vex_printf (hackedbz2.c:1155)
by 0x........: BZ2_compressBlock (hackedbz2.c:4039)
by 0x........: handle_compress (hackedbz2.c:4761)
=================================================
./valgrind-new/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2014-07-29 20:27:42.989771027 -0500
+++ err_disable3.stderr.out 2014-07-29 20:48:05.193029744 -0500
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-new/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2014-07-29 20:28:38.714380382 -0500
+++ err_disable4.stderr.out 2014-07-29 20:48:09.487075768 -0500
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:41)
- by 0x........: child_fn_2 (err_disable4.c:55)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:68)
=================================================
./valgrind-new/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2014-07-29 20:28:38.800381319 -0500
+++ threadname.stderr.out 2014-07-29 20:54:19.278041116 -0500
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:53)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:53)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:38)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:38)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:26)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:26)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-new/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2014-07-29 20:27:42.985770983 -0500
+++ threadname_xml.stderr.out 2014-07-29 20:54:21.323063055 -0500
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
=================================================
./valgrind-old/exp-sgcheck/tests/hackedbz2.stderr.diff-glibc28-amd64
=================================================
--- hackedbz2.stderr.exp-glibc28-amd64 2014-07-29 19:23:13.313881929 -0500
+++ hackedbz2.stderr.out 2014-07-29 20:21:36.343760144 -0500
@@ -1,7 +1,6 @@
Invalid read of size 1
- at 0x........: vex_strlen (hackedbz2.c:1006)
- by 0x........: add_to_myprintf_buf (hackedbz2.c:1284)
+ at 0x........: add_to_myprintf_buf (hackedbz2.c:1006)
by 0x........: vex_printf (hackedbz2.c:1155)
by 0x........: BZ2_compressBlock (hackedbz2.c:4039)
by 0x........: handle_compress (hackedbz2.c:4761)
=================================================
./valgrind-old/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2014-07-29 19:23:04.005777942 -0500
+++ err_disable3.stderr.out 2014-07-29 19:42:28.478790524 -0500
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-old/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2014-07-29 19:23:06.320803805 -0500
+++ err_disable4.stderr.out 2014-07-29 19:42:32.684837424 -0500
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:41)
- by 0x........: child_fn_2 (err_disable4.c:55)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:68)
=================================================
./valgrind-old/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2014-07-29 19:22:59.785730794 -0500
+++ threadname.stderr.out 2014-07-29 19:48:41.286941638 -0500
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:53)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:53)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:38)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:38)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:26)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:26)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-old/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2014-07-29 19:23:02.794764412 -0500
+++ threadname_xml.stderr.out 2014-07-29 19:48:43.337964434 -0500
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
|
|
From: Christian B. <bor...@de...> - 2014-07-30 04:11:55
|
valgrind revision: 14206 VEX revision: 2910 C compiler: gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973] GDB: GNU gdb (GDB) SUSE (7.5.1-0.7.29) Assembler: GNU assembler (GNU Binutils; SUSE Linux Enterprise 11) 2.23.1 C library: GNU C Library stable release version 2.11.3 (20110527) uname -mrs: Linux 3.0.101-0.31-default s390x Vendor version: Welcome to SUSE Linux Enterprise Server 11 SP3 (s390x) - Kernel %r (%t). Nightly build on sless390 ( SUSE Linux Enterprise Server 11 SP3 gcc 4.3.4 on z196 (s390x) ) Started at 2014-07-30 03:45:01 CEST Ended at 2014-07-30 06:11:42 CEST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 657 tests, 3 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/origin5-bz2 (stderr) helgrind/tests/pth_cond_destroy_busy (stderr) helgrind/tests/tc20_verifywrap (stderr) --tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old -- Running tests in perf ---------------------------------------------- -- bigcode1 -- bigcode1 valgrind-new:0.23s no: 4.8s (21.0x, -----) me: 6.2s (27.0x, -----) ca:26.5s (115.2x, -----) he: 5.5s (23.7x, -----) ca: 9.1s (39.7x, -----) dr: 4.8s (20.8x, -----) ma: 3.9s (17.1x, -----) bigcode1 valgrind-old:0.23s no: 4.8s (21.1x, -0.2%) me: 6.3s (27.3x, -1.3%) ca:26.5s (115.3x, -0.1%) he: 5.5s (23.8x, -0.2%) ca: 9.2s (39.9x, -0.4%) dr: 4.8s (20.8x, 0.0%) ma: 3.9s (17.1x, 0.0%) -- bigcode2 -- bigcode2 valgrind-new:0.24s no: 7.8s (32.3x, -----) me:13.1s (54.7x, -----) ca:39.1s (162.9x, -----) he:10.6s (44.0x, -----) ca:14.3s (59.6x, -----) dr: 8.9s (37.1x, -----) ma: 7.3s (30.5x, -----) bigcode2 valgrind-old:0.24s no: 7.8s (32.5x, -0.5%) me:13.1s (54.7x, -0.1%) ca:39.2s (163.5x, -0.4%) he:10.5s (43.9x, 0.2%) ca:14.2s (59.3x, 0.5%) dr: 9.0s (37.4x, -0.8%) ma: 7.4s (31.0x, -1.4%) -- bz2 -- bz2 valgrind-new:0.70s no: 6.6s ( 9.5x, -----) me:12.7s (18.1x, -----) ca:30.6s (43.7x, -----) he:19.8s (28.3x, -----) ca:34.3s (49.1x, -----) dr:28.8s (41.1x, -----) ma: 4.1s ( 5.9x, -----) bz2 valgrind-old:0.70s no: 6.6s ( 9.5x, -0.3%) me:12.7s (18.1x, 0.0%) ca:30.8s (44.0x, -0.6%) he:19.8s (28.2x, 0.3%) ca:34.6s (49.4x, -0.6%) dr:28.9s (41.3x, -0.6%) ma: 4.1s ( 5.9x, -0.2%) -- fbench -- fbench valgrind-new:0.41s no: 1.6s ( 3.9x, -----) me: 4.2s (10.3x, -----) ca: 9.4s (22.8x, -----) he: 6.3s (15.3x, -----) ca: 7.2s (17.6x, -----) dr: 5.5s (13.5x, -----) ma: 1.6s ( 4.0x, -----) fbench valgrind-old:0.41s no: 1.6s ( 3.9x, -0.0%) me: 4.3s (10.5x, -1.7%) ca: 9.4s (23.0x, -1.0%) he: 6.3s (15.4x, -0.3%) ca: 7.3s (17.9x, -1.5%) dr: 5.5s (13.4x, 0.2%) ma: 1.7s ( 4.0x, -0.6%) -- ffbench -- ffbench valgrind-new:0.20s no: 1.2s ( 5.9x, -----) me: 3.0s (14.8x, -----) ca: 3.0s (15.0x, -----) he:45.2s (226.0x, -----) ca: 9.6s (48.0x, -----) dr: 6.9s (34.6x, -----) ma: 1.0s ( 4.8x, -----) ffbench valgrind-old:0.20s no: 1.2s ( 5.9x, 0.0%) me: 2.9s (14.7x, 1.0%) ca: 3.1s (15.6x, -3.7%) he:45.2s (225.8x, 0.1%) ca: 9.7s (48.4x, -0.9%) dr: 6.9s (34.5x, 0.1%) ma: 1.0s ( 4.8x, 0.0%) -- heap -- heap valgrind-new:0.22s no: 2.4s (10.7x, -----) me: 8.8s (40.2x, -----) ca:13.2s (60.0x, -----) he:12.7s (57.6x, -----) ca:11.3s (51.5x, -----) dr: 7.7s (35.0x, -----) ma: 7.8s (35.4x, -----) heap valgrind-old:0.22s no: 2.5s (11.1x, -4.3%) me: 8.8s (39.9x, 0.8%) ca:13.2s (60.2x, -0.5%) he:12.7s (57.7x, -0.2%) ca:11.4s (51.8x, -0.6%) dr: 7.4s (33.7x, 3.8%) ma:29.5s (134.2x,-279.1%) -- heap_pdb4 -- heap_pdb4 valgrind-new:0.22s no: 2.6s (11.6x, -----) me:12.9s (58.8x, -----) ca:14.3s (64.9x, -----) he:14.0s (63.5x, -----) ca:12.4s (56.3x, -----) dr: 8.7s (39.4x, -----) ma: 8.0s (36.4x, -----) heap_pdb4 valgrind-old:0.22s no: 2.6s (11.6x, 0.0%) me:12.8s (58.0x, 1.4%) ca:14.3s (65.0x, -0.1%) he:14.0s (63.5x, -0.1%) ca:12.4s (56.5x, -0.3%) dr: 8.4s (38.1x, 3.3%) ma:29.5s (134.3x,-269.2%) -- many-loss-records -- many-loss-records valgrind-new:0.02s no: 0.5s (27.0x, -----) me: 2.1s (105.0x, -----) ca: 1.9s (97.0x, -----) he: 2.1s (107.0x, -----) ca: 1.9s (96.0x, -----) dr: 1.7s (86.0x, -----) ma: 1.7s (83.5x, -----) many-loss-records valgrind-old:0.02s no: 0.5s (27.0x, 0.0%) me: 2.1s (106.0x, -1.0%) ca: 2.0s (102.0x, -5.2%) he: 2.1s (107.5x, -0.5%) ca: 2.0s (100.0x, -4.2%) dr: 1.7s (83.0x, 3.5%) ma: 5.1s (253.5x,-203.6%) -- many-xpts -- many-xpts valgrind-new:0.07s no: 0.7s ( 9.7x, -----) me: 3.2s (45.4x, -----) ca:368.3s (5260.9x, -----) he: 6.6s (94.6x, -----) ca: 2.8s (40.3x, -----) dr: 2.5s (35.4x, -----) ma: 2.6s (36.9x, -----) many-xpts valgrind-old:0.07s no: 0.7s ( 9.7x, 0.0%) me: 3.2s (45.1x, 0.6%) ca:366.4s (5235.0x, 0.5%) he: 6.6s (94.1x, 0.5%) ca: 2.9s (41.1x, -2.1%) dr: 2.4s (34.7x, 2.0%) ma: 5.9s (84.6x,-129.5%) -- sarp -- sarp valgrind-new:0.03s no: 0.6s (20.7x, -----) me: 3.5s (115.0x, -----) ca: 3.2s (106.3x, -----) he:17.3s (576.0x, -----) ca: 2.0s (68.3x, -----) dr: 1.3s (44.7x, -----) ma: 0.5s (16.0x, -----) sarp valgrind-old:0.03s no: 0.6s (20.3x, 1.6%) me: 3.5s (115.3x, -0.3%) ca: 3.3s (109.0x, -2.5%) he:17.9s (597.0x, -3.6%) ca: 2.1s (70.0x, -2.4%) dr: 1.3s (44.7x, 0.0%) ma: 0.5s (16.3x, -2.1%) -- tinycc -- tinycc valgrind-new:0.22s no: 3.2s (14.4x, -----) me:14.5s (65.8x, -----) ca:30.0s (136.5x, -----) he:28.3s (128.7x, -----) ca:21.3s (96.7x, -----) dr:20.6s (93.6x, -----) ma: 3.9s (17.6x, -----) tinycc valgrind-old:0.22s no: 3.2s (14.5x, -0.6%) me:14.5s (66.0x, -0.2%) ca:30.2s (137.3x, -0.6%) he:28.3s (128.5x, 0.1%) ca:21.5s (97.5x, -0.8%) dr:20.4s (92.6x, 1.0%) ma: 7.2s (33.0x,-87.3%) -- Finished tests in perf ---------------------------------------------- == 11 programs, 154 timings ================= real 113m34.555s user 112m48.221s sys 0m36.429s |
|
From: Tom H. <to...@co...> - 2014-07-30 03:34:01
|
valgrind revision: 14206
VEX revision: 2910
C compiler: gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
GDB:
Assembler: GNU assembler version 2.18.50.0.6-2 20080403
C library: GNU C Library stable release version 2.8
uname -mrs: Linux 3.15.3-200.fc20.x86_64 x86_64
Vendor version: Fedora release 9 (Sulphur)
Nightly build on bristol ( )
Started at 2014-07-30 03:51:14 BST
Ended at 2014-07-30 04:33:36 BST
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 660 tests, 1 stderr failure, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/amd64/insn-pcmpistri (stderr)
none/tests/amd64/sse4-64 (stdout)
--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old
-- Running tests in perf ----------------------------------------------
-- bigcode1 --
*** Command returned non-zero (32512)
*** See perf.{cmd,stdout,stderr} to determine what went wrong.
real 0m0.013s
user 0m0.008s
sys 0m0.001s
|
|
From: Tom H. <to...@co...> - 2014-07-30 02:50:02
|
valgrind revision: 14206
VEX revision: 2910
C compiler: gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2)
GDB: GNU gdb (GDB) Fedora (7.3.1-48.fc15)
Assembler: GNU assembler version 2.21.51.0.6-6.fc15 20110118
C library: GNU C Library stable release version 2.14.1
uname -mrs: Linux 3.15.3-200.fc20.x86_64 x86_64
Vendor version: Fedora release 15 (Lovelock)
Nightly build on bristol ( )
Started at 2014-07-30 03:13:02 BST
Ended at 2014-07-30 03:49:46 BST
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... done
Regression test results follow
== 692 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old
-- Running tests in perf ----------------------------------------------
-- bigcode1 --
*** Command returned non-zero (32512)
*** See perf.{cmd,stdout,stderr} to determine what went wrong.
real 0m0.013s
user 0m0.006s
sys 0m0.003s
|
|
From: Tom H. <to...@co...> - 2014-07-30 02:38:54
|
valgrind revision: 14206
VEX revision: 2910
C compiler: gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2)
GDB: GNU gdb (GDB) Fedora (7.3.50.20110722-16.fc16)
Assembler: GNU assembler version 2.21.53.0.1-6.fc16 20110716
C library: GNU C Library development release version 2.14.90
uname -mrs: Linux 3.15.3-200.fc20.x86_64 x86_64
Vendor version: Fedora release 16 (Verne)
Nightly build on bristol ( )
Started at 2014-07-30 03:02:06 BST
Ended at 2014-07-30 03:38:38 BST
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... done
Regression test results follow
== 692 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old
-- Running tests in perf ----------------------------------------------
-- bigcode1 --
*** Command returned non-zero (32512)
*** See perf.{cmd,stdout,stderr} to determine what went wrong.
real 0m0.010s
user 0m0.005s
sys 0m0.003s
|
|
From: Tom H. <to...@co...> - 2014-07-30 02:29:41
|
valgrind revision: 14206
VEX revision: 2910
C compiler: gcc (GCC) 4.7.2 20120921 (Red Hat 4.7.2-2)
GDB: GNU gdb (GDB) Fedora (7.4.50.20120120-54.fc17)
Assembler: GNU assembler version 2.22.52.0.1-10.fc17 20120131
C library: GNU C Library stable release version 2.15
uname -mrs: Linux 3.15.3-200.fc20.x86_64 x86_64
Vendor version: Fedora release 17 (Beefy Miracle)
Nightly build on bristol ( )
Started at 2014-07-30 02:51:16 BST
Ended at 2014-07-30 03:29:25 BST
Results differ from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 692 tests, 5 stderr failures, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
gdbserver_tests/mcinfcallRU (stderr)
gdbserver_tests/mcinfcallWSRU (stderr)
gdbserver_tests/mcmain_pic (stderr)
memcheck/tests/err_disable4 (stderr)
exp-sgcheck/tests/preen_invars (stdout)
exp-sgcheck/tests/preen_invars (stderr)
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 692 tests, 4 stderr failures, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
gdbserver_tests/mcinfcallRU (stderr)
gdbserver_tests/mcinfcallWSRU (stderr)
gdbserver_tests/mcmain_pic (stderr)
exp-sgcheck/tests/preen_invars (stdout)
exp-sgcheck/tests/preen_invars (stderr)
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short 2014-07-30 03:09:59.629216101 +0100
--- new.short 2014-07-30 03:29:25.861891551 +0100
***************
*** 8,10 ****
! == 692 tests, 4 stderr failures, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
gdbserver_tests/mcinfcallRU (stderr)
--- 8,10 ----
! == 692 tests, 5 stderr failures, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
gdbserver_tests/mcinfcallRU (stderr)
***************
*** 12,13 ****
--- 12,14 ----
gdbserver_tests/mcmain_pic (stderr)
+ memcheck/tests/err_disable4 (stderr)
exp-sgcheck/tests/preen_invars (stdout)
--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old
-- Running tests in perf ----------------------------------------------
-- bigcode1 --
*** Command returned non-zero (32512)
*** See perf.{cmd,stdout,stderr} to determine what went wrong.
real 0m0.048s
user 0m0.003s
sys 0m0.006s
|
|
From: Tom H. <to...@co...> - 2014-07-30 02:19:03
|
valgrind revision: 14206
VEX revision: 2910
C compiler: gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8)
GDB: GNU gdb (GDB) Fedora 7.5.1-42.fc18
Assembler: GNU assembler version 2.23.51.0.1-10.fc18 20120806
C library: GNU C Library stable release version 2.16
uname -mrs: Linux 3.15.3-200.fc20.x86_64 x86_64
Vendor version: Fedora release 18 (Spherical Cow)
Nightly build on bristol ( )
Started at 2014-07-30 02:41:19 BST
Ended at 2014-07-30 03:18:49 BST
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 692 tests, 1 stderr failure, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
exp-sgcheck/tests/preen_invars (stdout)
exp-sgcheck/tests/preen_invars (stderr)
--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old
-- Running tests in perf ----------------------------------------------
-- bigcode1 --
*** Command returned non-zero (32512)
*** See perf.{cmd,stdout,stderr} to determine what went wrong.
real 0m0.026s
user 0m0.005s
sys 0m0.003s
|
|
From: Tom H. <to...@co...> - 2014-07-30 02:12:02
|
valgrind revision: 14206
VEX revision: 2910
C compiler: gcc (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1)
GDB: GNU gdb (GDB) Fedora 7.6.1-46.fc19
Assembler: GNU assembler version 2.23.52.0.1-9.fc19 20130226
C library: GNU C Library (GNU libc) stable release version 2.17
uname -mrs: Linux 3.15.3-200.fc20.x86_64 x86_64
Vendor version: Fedora release 19 (Schrödingerâs Cat)
Nightly build on bristol ( )
Started at 2014-07-30 02:31:34 BST
Ended at 2014-07-30 03:11:50 BST
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 692 tests, 1 stderr failure, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
exp-sgcheck/tests/hackedbz2 (stderr)
--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old
-- Running tests in perf ----------------------------------------------
-- bigcode1 --
*** Command returned non-zero (32512)
*** See perf.{cmd,stdout,stderr} to determine what went wrong.
real 0m0.051s
user 0m0.004s
sys 0m0.004s
|
Author: florian
Date: Tue Jul 29 22:42:30 2014
New Revision: 14206
Log:
Avoid fixed size buffer startup_wd for VG_(record_startup_wd).
Change VG_(get_startup_wd) to simply return the string.
Fix call sites.
We could even fold both functions into a single one with the
benefit of giving the two associated global variables function
scope.
Modified:
branches/BUF_REMOVAL/coregrind/m_commandline.c
branches/BUF_REMOVAL/coregrind/m_libcfile.c
branches/BUF_REMOVAL/coregrind/m_main.c
branches/BUF_REMOVAL/coregrind/m_options.c
branches/BUF_REMOVAL/include/pub_tool_libcfile.h
Modified: branches/BUF_REMOVAL/coregrind/m_commandline.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_commandline.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_commandline.c Tue Jul 29 22:42:30 2014
@@ -222,9 +222,8 @@
// Don't read ./.valgrindrc if "." is the same as "$HOME", else its
// contents will be applied twice. (bug #142488)
if (home) {
- HChar cwd[VKI_PATH_MAX+1];
- Bool cwd_ok = VG_(get_startup_wd)(cwd, VKI_PATH_MAX);
- f2_clo = ( (cwd_ok && VG_STREQ(home, cwd))
+ const HChar *cwd = VG_(get_startup_wd)();
+ f2_clo = ( VG_STREQ(home, cwd)
? NULL : read_dot_valgrindrc(".") );
}
Modified: branches/BUF_REMOVAL/coregrind/m_libcfile.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_libcfile.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_libcfile.c Tue Jul 29 22:42:30 2014
@@ -417,14 +417,13 @@
return sr_isError(res) ? (-1) : 0;
}
-/* The working directory at startup. AIX doesn't provide an easy
- system call to do getcwd, but fortunately we don't need arbitrary
- getcwd support. All that is really needed is to note the cwd at
+/* The working directory at startup.
+ All that is really needed is to note the cwd at
process startup. Hence VG_(record_startup_wd) notes it (in a
platform dependent way) and VG_(get_startup_wd) produces the noted
value. Hence: */
-static HChar startup_wd[VKI_PATH_MAX];
-static Bool startup_wd_acquired = False;
+static HChar *startup_wd;
+static Bool startup_wd_acquired = False;
/* Record the process' working directory at startup. Is intended to
be called exactly once, at startup, before the working directory
@@ -433,37 +432,40 @@
there is a problem. */
Bool VG_(record_startup_wd) ( void )
{
- const Int szB = sizeof(startup_wd);
+ Int szB = VKI_PATH_MAX;
vg_assert(!startup_wd_acquired);
- vg_assert(szB >= 512 && szB <= 16384/*let's say*/); /* stay sane */
- VG_(memset)(startup_wd, 0, szB);
+
# if defined(VGO_linux)
/* Simple: just ask the kernel */
- { SysRes res
- = VG_(do_syscall2)(__NR_getcwd, (UWord)startup_wd, szB-1);
- vg_assert(startup_wd[szB-1] == 0);
- if (sr_isError(res)) {
- return False;
- } else {
- startup_wd_acquired = True;
- return True;
- }
- }
+ SysRes res;
+ do {
+ szB += VKI_PATH_MAX;
+ startup_wd =
+ VG_(arena_realloc)(VG_AR_CORE, "startup_wd", startup_wd, szB);
+ VG_(memset)(startup_wd, 0, szB);
+ res = VG_(do_syscall2)(__NR_getcwd, (UWord)startup_wd, szB-1);
+ } while (sr_isError(res));
+
+ vg_assert(startup_wd[szB-1] == 0);
+ startup_wd_acquired = True;
+ return True;
+
# elif defined(VGO_darwin)
/* We can't ask the kernel, so instead rely on launcher-*.c to
tell us the startup path. Note the env var is keyed to the
parent's PID, not ours, since our parent is the launcher
process. */
- { HChar envvar[100];
+ { HChar envvar[100]; // large enough
HChar* wd = NULL;
VG_(memset)(envvar, 0, sizeof(envvar));
VG_(sprintf)(envvar, "VALGRIND_STARTUP_PWD_%d_XYZZY",
(Int)VG_(getppid)());
wd = VG_(getenv)( envvar );
- if (wd == NULL || (1+VG_(strlen)(wd) >= szB))
+ if (wd == NULL)
return False;
- VG_(strncpy_safely)(startup_wd, wd, szB);
- vg_assert(startup_wd[szB-1] == 0);
+ SizeT need = VG_(strlen)(wd) + 1;
+ startup_wd = VG_(arena_malloc)(VG_AR_CORE, "startup_wd", need);
+ VG_(strcpy)(startup_wd, wd);
startup_wd_acquired = True;
return True;
}
@@ -472,16 +474,12 @@
# endif
}
-/* Copy the previously acquired startup_wd into buf[0 .. size-1],
- or return False if buf isn't big enough. */
-Bool VG_(get_startup_wd) ( HChar* buf, SizeT size )
+/* Return the previously acquired startup_wd. */
+const HChar *VG_(get_startup_wd) ( void )
{
vg_assert(startup_wd_acquired);
- vg_assert(startup_wd[ sizeof(startup_wd)-1 ] == 0);
- if (1+VG_(strlen)(startup_wd) >= size)
- return False;
- VG_(strncpy_safely)(buf, startup_wd, size);
- return True;
+
+ return startup_wd;
}
SysRes VG_(poll) (struct vki_pollfd *fds, Int nfds, Int timeout)
Modified: branches/BUF_REMOVAL/coregrind/m_main.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_main.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_main.c Tue Jul 29 22:42:30 2014
@@ -1743,12 +1743,7 @@
VG_(err_config_error)( "Can't establish current working "
"directory at startup\n");
}
- { HChar buf[VKI_PATH_MAX+1];
- Bool ok = VG_(get_startup_wd)( buf, sizeof(buf) );
- vg_assert(ok);
- buf[VKI_PATH_MAX] = 0;
- VG_(debugLog)(1, "main", "... %s\n", buf );
- }
+ VG_(debugLog)(1, "main", "... %s\n", VG_(get_startup_wd)() );
//============================================================
// Command line argument handling order:
Modified: branches/BUF_REMOVAL/coregrind/m_options.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_options.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_options.c Tue Jul 29 22:42:30 2014
@@ -142,12 +142,11 @@
// expanding %p and %q entries. Returns a new, malloc'd string.
HChar* VG_(expand_file_name)(const HChar* option_name, const HChar* format)
{
- static HChar base_dir[VKI_PATH_MAX];
+ const HChar *base_dir;
Int len, i = 0, j = 0;
HChar* out;
- Bool ok = VG_(get_startup_wd)(base_dir, VKI_PATH_MAX);
- tl_assert(ok);
+ base_dir = VG_(get_startup_wd)();
if (VG_STREQ(format, "")) {
// Empty name, bad.
Modified: branches/BUF_REMOVAL/include/pub_tool_libcfile.h
==============================================================================
--- branches/BUF_REMOVAL/include/pub_tool_libcfile.h (original)
+++ branches/BUF_REMOVAL/include/pub_tool_libcfile.h Tue Jul 29 22:42:30 2014
@@ -102,7 +102,7 @@
/* Copy the working directory at startup into buf[0 .. size-1], or return
False if buf is too small. */
-extern Bool VG_(get_startup_wd) ( HChar* buf, SizeT size );
+extern const HChar *VG_(get_startup_wd) ( void );
#endif // __PUB_TOOL_LIBCFILE_H
|
|
From: <sv...@va...> - 2014-07-29 20:19:12
|
Author: philippe
Date: Tue Jul 29 20:19:04 2014
New Revision: 14205
Log:
Announce now in NEWS that now all locks are announced.
Modified:
trunk/NEWS
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Tue Jul 29 20:19:04 2014
@@ -20,6 +20,8 @@
* Helgrind:
- Race condition error message with allocated blocks also show
the thread nr that allocated the racy block.
+ - All locks referenced by an error message are now announced.
+ Previously, some error messages were just showing the lock addresses.
- The message indicating where a lock was first observed now also
describes the address/location of the lock.
- Helgrind now understands the Ada task termination rules
|
|
From: <sv...@va...> - 2014-07-29 20:08:25
|
Author: philippe
Date: Tue Jul 29 20:08:15 2014
New Revision: 14204
Log:
Helgrind lock related error msg improvements.
* Add lock announcements in various helgrind errors that were not
announcing the locks
* ensure locks are also announced in xml (note that this is compatible
with xml protocol version 4, so no impact on GUI which properly
implement the protocol)
Changes done:
* Like other HG record_error functions, HG_(record_error_LockOrder) is
now passing Lock* rather than lock guest addresses.
* update exp files for tests that were showing locks without announcing them
* change tc14_laog_dinphils.c and tc15_laog_lockdel.c so as to
have same sizes on 32 and 64 bits systems for allocated or symbol sizes.
* factorise all code that was announcing first lock observation
* enable xml lock announcement
Modified:
trunk/helgrind/hg_errors.c
trunk/helgrind/hg_errors.h
trunk/helgrind/hg_main.c
trunk/helgrind/tests/annotate_rwlock.stderr.exp
trunk/helgrind/tests/hg02_deadlock.stderr.exp
trunk/helgrind/tests/locked_vs_unlocked1_fwd.stderr.exp
trunk/helgrind/tests/locked_vs_unlocked1_rev.stderr.exp
trunk/helgrind/tests/locked_vs_unlocked2.stderr.exp
trunk/helgrind/tests/locked_vs_unlocked3.stderr.exp
trunk/helgrind/tests/tc09_bad_unlock.stderr.exp
trunk/helgrind/tests/tc10_rec_lock.stderr.exp
trunk/helgrind/tests/tc12_rwl_trivial.stderr.exp
trunk/helgrind/tests/tc13_laog1.stderr.exp
trunk/helgrind/tests/tc14_laog_dinphils.c
trunk/helgrind/tests/tc14_laog_dinphils.stderr.exp
trunk/helgrind/tests/tc15_laog_lockdel.c
trunk/helgrind/tests/tc15_laog_lockdel.stderr.exp
trunk/helgrind/tests/tc20_verifywrap.stderr.exp
Modified: trunk/helgrind/hg_errors.c
==============================================================================
--- trunk/helgrind/hg_errors.c (original)
+++ trunk/helgrind/hg_errors.c Tue Jul 29 20:08:15 2014
@@ -331,8 +331,8 @@
Thread* thr;
/* The first 4 fields describe the previously observed
(should-be) ordering. */
- Addr shouldbe_earlier_ga;
- Addr shouldbe_later_ga;
+ Lock* shouldbe_earlier_lk;
+ Lock* shouldbe_later_lk;
ExeContext* shouldbe_earlier_ec;
ExeContext* shouldbe_later_ec;
/* In principle we need to record two more stacks, from
@@ -566,8 +566,8 @@
void HG_(record_error_LockOrder)(
Thread* thr,
- Addr shouldbe_earlier_ga,
- Addr shouldbe_later_ga,
+ Lock* shouldbe_earlier_lk,
+ Lock* shouldbe_later_lk,
ExeContext* shouldbe_earlier_ec,
ExeContext* shouldbe_later_ec,
ExeContext* actual_earlier_ec
@@ -579,9 +579,13 @@
init_XError(&xe);
xe.tag = XE_LockOrder;
xe.XE.LockOrder.thr = thr;
- xe.XE.LockOrder.shouldbe_earlier_ga = shouldbe_earlier_ga;
+ xe.XE.LockOrder.shouldbe_earlier_lk
+ = mk_LockP_from_LockN(shouldbe_earlier_lk,
+ False/*!allowed_to_be_invalid*/);
xe.XE.LockOrder.shouldbe_earlier_ec = shouldbe_earlier_ec;
- xe.XE.LockOrder.shouldbe_later_ga = shouldbe_later_ga;
+ xe.XE.LockOrder.shouldbe_later_lk
+ = mk_LockP_from_LockN(shouldbe_later_lk,
+ False/*!allowed_to_be_invalid*/);
xe.XE.LockOrder.shouldbe_later_ec = shouldbe_later_ec;
xe.XE.LockOrder.actual_earlier_ec = actual_earlier_ec;
// FIXME: tid vs thr
@@ -766,14 +770,19 @@
tl_assert(lk->magic == LockP_MAGIC);
if (VG_(clo_xml)) {
- /* fixme: add announcement */
+ if (lk->appeared_at) {
+ emit( " <auxwhat>Lock at %p was first observed</auxwhat>\n",
+ (void*)lk );
+ VG_(pp_ExeContext)( lk->appeared_at );
+ }
+
} else {
if (lk->appeared_at) {
- VG_(umsg)( "Lock at %p was first observed\n",
+ VG_(umsg)( " Lock at %p was first observed\n",
(void*)lk->guestaddr );
VG_(pp_ExeContext)( lk->appeared_at );
} else {
- VG_(umsg)( "Lock at %p : no stacktrace for first observation\n",
+ VG_(umsg)( " Lock at %p : no stacktrace for first observation\n",
(void*)lk->guestaddr );
}
HG_(get_and_pp_addrdescr) (lk->guestaddr);
@@ -948,8 +957,8 @@
emit( " <text>Thread #%d: lock order \"%p before %p\" "
"violated</text>\n",
(Int)xe->XE.LockOrder.thr->errmsg_index,
- (void*)xe->XE.LockOrder.shouldbe_earlier_ga,
- (void*)xe->XE.LockOrder.shouldbe_later_ga );
+ (void*)xe->XE.LockOrder.shouldbe_earlier_lk->guestaddr,
+ (void*)xe->XE.LockOrder.shouldbe_later_lk->guestaddr );
emit( " <hthreadid>%d</hthreadid>\n",
(Int)xe->XE.LockOrder.thr->errmsg_index );
emit( " </xwhat>\n" );
@@ -958,24 +967,26 @@
&& xe->XE.LockOrder.shouldbe_later_ec) {
emit( " <auxwhat>Required order was established by "
"acquisition of lock at %p</auxwhat>\n",
- (void*)xe->XE.LockOrder.shouldbe_earlier_ga );
+ (void*)xe->XE.LockOrder.shouldbe_earlier_lk->guestaddr );
VG_(pp_ExeContext)( xe->XE.LockOrder.shouldbe_earlier_ec );
emit( " <auxwhat>followed by a later acquisition "
"of lock at %p</auxwhat>\n",
- (void*)xe->XE.LockOrder.shouldbe_later_ga );
+ (void*)xe->XE.LockOrder.shouldbe_later_lk->guestaddr );
VG_(pp_ExeContext)( xe->XE.LockOrder.shouldbe_later_ec );
}
+ announce_LockP ( xe->XE.LockOrder.shouldbe_earlier_lk );
+ announce_LockP ( xe->XE.LockOrder.shouldbe_later_lk );
} else {
emit( "Thread #%d: lock order \"%p before %p\" violated\n",
(Int)xe->XE.LockOrder.thr->errmsg_index,
- (void*)xe->XE.LockOrder.shouldbe_earlier_ga,
- (void*)xe->XE.LockOrder.shouldbe_later_ga );
+ (void*)xe->XE.LockOrder.shouldbe_earlier_lk->guestaddr,
+ (void*)xe->XE.LockOrder.shouldbe_later_lk->guestaddr );
emit( "\n" );
emit( "Observed (incorrect) order is: "
"acquisition of lock at %p\n",
- (void*)xe->XE.LockOrder.shouldbe_later_ga);
+ (void*)xe->XE.LockOrder.shouldbe_later_lk->guestaddr);
if (xe->XE.LockOrder.actual_earlier_ec) {
VG_(pp_ExeContext)(xe->XE.LockOrder.actual_earlier_ec);
} else {
@@ -983,20 +994,23 @@
}
emit( "\n" );
emit(" followed by a later acquisition of lock at %p\n",
- (void*)xe->XE.LockOrder.shouldbe_earlier_ga);
+ (void*)xe->XE.LockOrder.shouldbe_earlier_lk->guestaddr);
VG_(pp_ExeContext)( VG_(get_error_where)(err) );
if (xe->XE.LockOrder.shouldbe_earlier_ec
&& xe->XE.LockOrder.shouldbe_later_ec) {
emit("\n");
emit( "Required order was established by "
"acquisition of lock at %p\n",
- (void*)xe->XE.LockOrder.shouldbe_earlier_ga );
+ (void*)xe->XE.LockOrder.shouldbe_earlier_lk->guestaddr );
VG_(pp_ExeContext)( xe->XE.LockOrder.shouldbe_earlier_ec );
emit( "\n" );
emit( " followed by a later acquisition of lock at %p\n",
- (void*)xe->XE.LockOrder.shouldbe_later_ga );
+ (void*)xe->XE.LockOrder.shouldbe_later_lk->guestaddr );
VG_(pp_ExeContext)( xe->XE.LockOrder.shouldbe_later_ec );
}
+ emit("\n");
+ announce_LockP ( xe->XE.LockOrder.shouldbe_earlier_lk );
+ announce_LockP ( xe->XE.LockOrder.shouldbe_later_lk );
}
@@ -1080,12 +1094,7 @@
(Int)xe->XE.UnlockForeign.owner->errmsg_index );
emit( " </xwhat>\n" );
VG_(pp_ExeContext)( VG_(get_error_where)(err) );
-
- if (xe->XE.UnlockForeign.lock->appeared_at) {
- emit( " <auxwhat>Lock at %p was first observed</auxwhat>\n",
- (void*)xe->XE.UnlockForeign.lock->guestaddr );
- VG_(pp_ExeContext)( xe->XE.UnlockForeign.lock->appeared_at );
- }
+ announce_LockP ( xe->XE.UnlockForeign.lock );
} else {
@@ -1095,11 +1104,7 @@
(void*)xe->XE.UnlockForeign.lock->guestaddr,
(Int)xe->XE.UnlockForeign.owner->errmsg_index );
VG_(pp_ExeContext)( VG_(get_error_where)(err) );
- if (xe->XE.UnlockForeign.lock->appeared_at) {
- emit( " Lock at %p was first observed\n",
- (void*)xe->XE.UnlockForeign.lock->guestaddr );
- VG_(pp_ExeContext)( xe->XE.UnlockForeign.lock->appeared_at );
- }
+ announce_LockP ( xe->XE.UnlockForeign.lock );
}
@@ -1121,11 +1126,7 @@
(Int)xe->XE.UnlockUnlocked.thr->errmsg_index );
emit( " </xwhat>\n" );
VG_(pp_ExeContext)( VG_(get_error_where)(err) );
- if (xe->XE.UnlockUnlocked.lock->appeared_at) {
- emit( " <auxwhat>Lock at %p was first observed</auxwhat>\n",
- (void*)xe->XE.UnlockUnlocked.lock->guestaddr );
- VG_(pp_ExeContext)( xe->XE.UnlockUnlocked.lock->appeared_at );
- }
+ announce_LockP ( xe->XE.UnlockUnlocked.lock);
} else {
@@ -1133,11 +1134,7 @@
(Int)xe->XE.UnlockUnlocked.thr->errmsg_index,
(void*)xe->XE.UnlockUnlocked.lock->guestaddr );
VG_(pp_ExeContext)( VG_(get_error_where)(err) );
- if (xe->XE.UnlockUnlocked.lock->appeared_at) {
- emit( " Lock at %p was first observed\n",
- (void*)xe->XE.UnlockUnlocked.lock->guestaddr );
- VG_(pp_ExeContext)( xe->XE.UnlockUnlocked.lock->appeared_at );
- }
+ announce_LockP ( xe->XE.UnlockUnlocked.lock);
}
Modified: trunk/helgrind/hg_errors.h
==============================================================================
--- trunk/helgrind/hg_errors.h (original)
+++ trunk/helgrind/hg_errors.h Tue Jul 29 20:08:15 2014
@@ -63,7 +63,7 @@
const HChar* );
/* see the implementation for meaning of these params */
-void HG_(record_error_LockOrder) ( Thread*, Addr, Addr,
+void HG_(record_error_LockOrder) ( Thread*, Lock*, Lock*,
ExeContext*, ExeContext*,
ExeContext* );
Modified: trunk/helgrind/hg_main.c
==============================================================================
--- trunk/helgrind/hg_main.c (original)
+++ trunk/helgrind/hg_main.c Tue Jul 29 20:08:15 2014
@@ -3802,7 +3802,7 @@
tl_assert(found->src_ec);
tl_assert(found->dst_ec);
HG_(record_error_LockOrder)(
- thr, lk->guestaddr, other->guestaddr,
+ thr, lk, other,
found->src_ec, found->dst_ec, other->acquired_at );
} else {
/* Hmm. This can't happen (can it?) */
@@ -3852,7 +3852,7 @@
held by this thread, with its 'acquired_at'. */
HG_(record_error_LockOrder)(
- thr, lk->guestaddr, other->guestaddr,
+ thr, lk, other,
NULL, NULL, other->acquired_at );
}
}
Modified: trunk/helgrind/tests/annotate_rwlock.stderr.exp
==============================================================================
--- trunk/helgrind/tests/annotate_rwlock.stderr.exp (original)
+++ trunk/helgrind/tests/annotate_rwlock.stderr.exp Tue Jul 29 20:08:15 2014
@@ -99,7 +99,7 @@
----------------------------------------------------------------
-Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: rwlock_init (annotate_rwlock.c:54)
by 0x........: main (annotate_rwlock.c:161)
Address 0x........ is 0 bytes inside data symbol "s_rwlock"
Modified: trunk/helgrind/tests/hg02_deadlock.stderr.exp
==============================================================================
--- trunk/helgrind/tests/hg02_deadlock.stderr.exp (original)
+++ trunk/helgrind/tests/hg02_deadlock.stderr.exp Tue Jul 29 20:08:15 2014
@@ -34,5 +34,18 @@
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
+ by 0x........: main (hg02_deadlock.c:32)
+ Address 0x........ is 0 bytes inside data symbol "m1"
+
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
+ by 0x........: t1 (hg02_deadlock.c:10)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+ Address 0x........ is 0 bytes inside data symbol "m2"
+
+
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Modified: trunk/helgrind/tests/locked_vs_unlocked1_fwd.stderr.exp
==============================================================================
--- trunk/helgrind/tests/locked_vs_unlocked1_fwd.stderr.exp (original)
+++ trunk/helgrind/tests/locked_vs_unlocked1_fwd.stderr.exp Tue Jul 29 20:08:15 2014
@@ -14,7 +14,7 @@
----------------------------------------------------------------
-Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
by 0x........: child_fn (locked_vs_unlocked1.c:18)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
Modified: trunk/helgrind/tests/locked_vs_unlocked1_rev.stderr.exp
==============================================================================
--- trunk/helgrind/tests/locked_vs_unlocked1_rev.stderr.exp (original)
+++ trunk/helgrind/tests/locked_vs_unlocked1_rev.stderr.exp Tue Jul 29 20:08:15 2014
@@ -14,7 +14,7 @@
----------------------------------------------------------------
-Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
by 0x........: child_fn (locked_vs_unlocked1.c:18)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
Modified: trunk/helgrind/tests/locked_vs_unlocked2.stderr.exp
==============================================================================
--- trunk/helgrind/tests/locked_vs_unlocked2.stderr.exp (original)
+++ trunk/helgrind/tests/locked_vs_unlocked2.stderr.exp Tue Jul 29 20:08:15 2014
@@ -14,17 +14,17 @@
----------------------------------------------------------------
-Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
by 0x........: main (locked_vs_unlocked2.c:58)
Address 0x........ is 0 bytes inside data symbol "mx2a"
-Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
by 0x........: main (locked_vs_unlocked2.c:59)
Address 0x........ is 0 bytes inside data symbol "mx2b"
-Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
by 0x........: main (locked_vs_unlocked2.c:57)
Address 0x........ is 0 bytes inside data symbol "mx1b"
Modified: trunk/helgrind/tests/locked_vs_unlocked3.stderr.exp
==============================================================================
--- trunk/helgrind/tests/locked_vs_unlocked3.stderr.exp (original)
+++ trunk/helgrind/tests/locked_vs_unlocked3.stderr.exp Tue Jul 29 20:08:15 2014
@@ -14,7 +14,7 @@
----------------------------------------------------------------
-Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
by 0x........: main (locked_vs_unlocked3.c:51)
Address 0x........ is 0 bytes inside data symbol "mx"
Modified: trunk/helgrind/tests/tc09_bad_unlock.stderr.exp
==============================================================================
--- trunk/helgrind/tests/tc09_bad_unlock.stderr.exp (original)
+++ trunk/helgrind/tests/tc09_bad_unlock.stderr.exp Tue Jul 29 20:08:15 2014
@@ -9,10 +9,13 @@
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:27)
by 0x........: main (tc09_bad_unlock.c:49)
- Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:23)
by 0x........: main (tc09_bad_unlock.c:49)
+ Address 0x........ is on thread #x's stack
+ in frame #x, created by nearly_main (tc09_bad_unlock.c:16)
+
---Thread-Announcement------------------------------------------
@@ -29,10 +32,13 @@
by 0x........: child_fn (tc09_bad_unlock.c:11)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
- Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:31)
by 0x........: main (tc09_bad_unlock.c:49)
+ Address 0x........ is on thread #x's stack
+ in frame #x, created by nearly_main (tc09_bad_unlock.c:16)
+
----------------------------------------------------------------
@@ -56,10 +62,13 @@
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:27)
by 0x........: main (tc09_bad_unlock.c:50)
- Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:23)
by 0x........: main (tc09_bad_unlock.c:49)
+ Address 0x........ is on thread #x's stack
+ in frame #x, created by nearly_main (tc09_bad_unlock.c:16)
+
----------------------------------------------------------------
@@ -94,10 +103,13 @@
by 0x........: child_fn (tc09_bad_unlock.c:11)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
- Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:31)
by 0x........: main (tc09_bad_unlock.c:49)
+ Address 0x........ is on thread #x's stack
+ in frame #x, created by nearly_main (tc09_bad_unlock.c:16)
+
----------------------------------------------------------------
Modified: trunk/helgrind/tests/tc10_rec_lock.stderr.exp
==============================================================================
--- trunk/helgrind/tests/tc10_rec_lock.stderr.exp (original)
+++ trunk/helgrind/tests/tc10_rec_lock.stderr.exp Tue Jul 29 20:08:15 2014
@@ -16,10 +16,13 @@
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: nearly_main (tc10_rec_lock.c:42)
by 0x........: main (tc10_rec_lock.c:47)
- Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
by 0x........: nearly_main (tc10_rec_lock.c:24)
by 0x........: main (tc10_rec_lock.c:47)
+ Address 0x........ is on thread #x's stack
+ in frame #x, created by nearly_main (tc10_rec_lock.c:15)
+
----------------------------------------------------------------
Modified: trunk/helgrind/tests/tc12_rwl_trivial.stderr.exp
==============================================================================
--- trunk/helgrind/tests/tc12_rwl_trivial.stderr.exp (original)
+++ trunk/helgrind/tests/tc12_rwl_trivial.stderr.exp Tue Jul 29 20:08:15 2014
@@ -9,10 +9,13 @@
at 0x........: pthread_rwlock_unlock_WRK (hg_intercepts.c:...)
by 0x........: pthread_rwlock_unlock (hg_intercepts.c:...)
by 0x........: main (tc12_rwl_trivial.c:35)
- Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_rwlock_init_WRK (hg_intercepts.c:...)
by 0x........: pthread_rwlock_init (hg_intercepts.c:...)
by 0x........: main (tc12_rwl_trivial.c:24)
+ Address 0x........ is on thread #x's stack
+ in frame #x, created by main (tc12_rwl_trivial.c:20)
+
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Modified: trunk/helgrind/tests/tc13_laog1.stderr.exp
==============================================================================
--- trunk/helgrind/tests/tc13_laog1.stderr.exp (original)
+++ trunk/helgrind/tests/tc13_laog1.stderr.exp Tue Jul 29 20:08:15 2014
@@ -23,5 +23,18 @@
at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
by 0x........: main (tc13_laog1.c:18)
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (hg_intercepts.c:...)
+ by 0x........: main (tc13_laog1.c:14)
+ Address 0x........ is on thread #x's stack
+ in frame #x, created by main (tc13_laog1.c:11)
+
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (hg_intercepts.c:...)
+ by 0x........: main (tc13_laog1.c:15)
+ Address 0x........ is on thread #x's stack
+ in frame #x, created by main (tc13_laog1.c:11)
+
+
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Modified: trunk/helgrind/tests/tc14_laog_dinphils.c
==============================================================================
--- trunk/helgrind/tests/tc14_laog_dinphils.c (original)
+++ trunk/helgrind/tests/tc14_laog_dinphils.c Tue Jul 29 20:08:15 2014
@@ -2,12 +2,15 @@
#include <pthread.h>
#include <stdlib.h>
#include <unistd.h>
-
+#include <assert.h>
/* Naive dining philosophers with inconsistent lock acquisition
ordering. */
static pthread_t phil[5];
-static pthread_mutex_t chop[5];
+static struct {
+ pthread_mutex_t m;
+ char pad[120 - sizeof(pthread_mutex_t)];
+} chop[5];
void* dine ( void* arg )
{
@@ -15,11 +18,11 @@
long left = (long)arg;
long right = (left + 1) % 5;
for (i = 0; i < 1000/*arbitrary*/; i++) {
- pthread_mutex_lock(&chop[left]);
- pthread_mutex_lock(&chop[right]);
+ pthread_mutex_lock(&chop[left].m);
+ pthread_mutex_lock(&chop[right].m);
/* eating */
- pthread_mutex_unlock(&chop[left]);
- pthread_mutex_unlock(&chop[right]);
+ pthread_mutex_unlock(&chop[left].m);
+ pthread_mutex_unlock(&chop[right].m);
}
return NULL;
}
@@ -27,8 +30,10 @@
int main ( void )
{
long i;
+ assert(sizeof(pthread_mutex_t) <= 120);
+
for (i = 0; i < 5; i++)
- pthread_mutex_init( &chop[i], NULL);
+ pthread_mutex_init( &chop[i].m, NULL);
for (i = 0; i < 5; i++)
pthread_create(&phil[i], NULL, dine, (void*)i );
Modified: trunk/helgrind/tests/tc14_laog_dinphils.stderr.exp
==============================================================================
--- trunk/helgrind/tests/tc14_laog_dinphils.stderr.exp (original)
+++ trunk/helgrind/tests/tc14_laog_dinphils.stderr.exp Tue Jul 29 20:08:15 2014
@@ -4,7 +4,7 @@
Thread #x was created
...
by 0x........: pthread_create@* (hg_intercepts.c:...)
- by 0x........: main (tc14_laog_dinphils.c:34)
+ by 0x........: main (tc14_laog_dinphils.c:39)
----------------------------------------------------------------
@@ -12,15 +12,26 @@
Observed (incorrect) order is: acquisition of lock at 0x........
at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
- by 0x........: dine (tc14_laog_dinphils.c:18)
+ by 0x........: dine (tc14_laog_dinphils.c:21)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
followed by a later acquisition of lock at 0x........
at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
- by 0x........: dine (tc14_laog_dinphils.c:19)
+ by 0x........: dine (tc14_laog_dinphils.c:22)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (hg_intercepts.c:...)
+ by 0x........: main (tc14_laog_dinphils.c:36)
+ Address 0x........ is 0 bytes inside data symbol "chop"
+
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (hg_intercepts.c:...)
+ by 0x........: main (tc14_laog_dinphils.c:36)
+ Address 0x........ is 480 bytes inside data symbol "chop"
+
+
ERROR SUMMARY: 1000 errors from 1 contexts (suppressed: 0 from 0)
Modified: trunk/helgrind/tests/tc15_laog_lockdel.c
==============================================================================
--- trunk/helgrind/tests/tc15_laog_lockdel.c (original)
+++ trunk/helgrind/tests/tc15_laog_lockdel.c Tue Jul 29 20:08:15 2014
@@ -12,9 +12,9 @@
{
int r;
pthread_mutex_t *mx1, *mx2;
-
- mx1 = malloc(sizeof(pthread_mutex_t));
- mx2 = malloc(sizeof(pthread_mutex_t));
+ assert (sizeof(pthread_mutex_t) <= 120);
+ mx1 = malloc(120 + sizeof(pthread_mutex_t) - sizeof(pthread_mutex_t));
+ mx2 = malloc(120 + sizeof(pthread_mutex_t) - sizeof(pthread_mutex_t));
assert(mx1);
assert(mx2);
Modified: trunk/helgrind/tests/tc15_laog_lockdel.stderr.exp
==============================================================================
--- trunk/helgrind/tests/tc15_laog_lockdel.stderr.exp (original)
+++ trunk/helgrind/tests/tc15_laog_lockdel.stderr.exp Tue Jul 29 20:08:15 2014
@@ -25,6 +25,23 @@
at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
by 0x........: main (tc15_laog_lockdel.c:28)
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (hg_intercepts.c:...)
+ by 0x........: main (tc15_laog_lockdel.c:22)
+ Address 0x........ is 0 bytes inside a block of size 120 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (tc15_laog_lockdel.c:16)
+ Block was alloc'd by thread #x
+
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (hg_intercepts.c:...)
+ by 0x........: main (tc15_laog_lockdel.c:23)
+ Address 0x........ is 0 bytes inside a block of size 120 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (tc15_laog_lockdel.c:17)
+ Block was alloc'd by thread #x
+
+
Free 2 and re-allocate it. This gives it a new identity,
so a second locking sequence 2 -> 1 should now be OK.
done
Modified: trunk/helgrind/tests/tc20_verifywrap.stderr.exp
==============================================================================
--- trunk/helgrind/tests/tc20_verifywrap.stderr.exp (original)
+++ trunk/helgrind/tests/tc20_verifywrap.stderr.exp Tue Jul 29 20:08:15 2014
@@ -157,10 +157,13 @@
at 0x........: pthread_rwlock_unlock_WRK (hg_intercepts.c:...)
by 0x........: pthread_rwlock_unlock (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:179)
- Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_rwlock_init_WRK (hg_intercepts.c:...)
by 0x........: pthread_rwlock_init (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:178)
+ Location 0x........ is 0 bytes inside local var "rwl"
+ declared at tc20_verifywrap.c:47, in frame #x of thread x
+
(1) no error on next line
(2) no error on next line
@@ -171,10 +174,13 @@
at 0x........: pthread_rwlock_unlock_WRK (hg_intercepts.c:...)
by 0x........: pthread_rwlock_unlock (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:196)
- Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_rwlock_init_WRK (hg_intercepts.c:...)
by 0x........: pthread_rwlock_init (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:186)
+ Location 0x........ is 0 bytes inside local var "rwl2"
+ declared at tc20_verifywrap.c:48, in frame #x of thread x
+
(4) no error on next line
(5) no error on next line
@@ -187,10 +193,13 @@
at 0x........: pthread_rwlock_unlock_WRK (hg_intercepts.c:...)
by 0x........: pthread_rwlock_unlock (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:212)
- Lock at 0x........ was first observed
+ Lock at 0x........ was first observed
at 0x........: pthread_rwlock_init_WRK (hg_intercepts.c:...)
by 0x........: pthread_rwlock_init (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:186)
+ Location 0x........ is 0 bytes inside local var "rwl2"
+ declared at tc20_verifywrap.c:48, in frame #x of thread x
+
---------------- sem_* ----------------
|
|
From: <sv...@va...> - 2014-07-29 19:44:27
|
Author: florian
Date: Tue Jul 29 19:44:16 2014
New Revision: 14203
Log:
Avoid fixed size buffer in VG_(basename) and VG_(dirname). Instead
dynamically allocate it.
An alternative would have been for the caller to provide a large enough
buffer which can always be done because the length of the basename and
dirname is always smaller than the length of the path we're starting
out with. But it leads to some clumsyness on the call side:
len = strlen(path) + 1;
HChar buf[len];
VG_(basename_(path, buf, len);
And we'd still had to check that we don't write more than len characters
into buf.
Modified:
branches/BUF_REMOVAL/coregrind/m_libcfile.c
Modified: branches/BUF_REMOVAL/coregrind/m_libcfile.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_libcfile.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_libcfile.c Tue Jul 29 19:44:16 2014
@@ -37,8 +37,8 @@
#include "pub_core_libcfile.h"
#include "pub_core_libcprint.h" // VG_(sprintf)
#include "pub_core_libcproc.h" // VG_(getpid), VG_(getppid)
-#include "pub_core_xarray.h"
#include "pub_core_clientstate.h" // VG_(fd_hard_limit)
+#include "pub_core_mallocfree.h" // VG_(arena_realloc)
#include "pub_core_syscall.h"
/* IMPORTANT: on Darwin it is essential to use the _nocancel versions
@@ -1165,11 +1165,10 @@
# endif
}
-
const HChar *VG_(basename)(const HChar *path)
{
- static HChar buf[VKI_PATH_MAX];
-
+ static HChar *buf = NULL;
+ static SizeT buf_len = 0;
const HChar *p, *end;
if (path == NULL ||
@@ -1195,6 +1194,11 @@
if (*p == '/') p++;
+ SizeT need = end-p+1 + 1;
+ if (need > buf_len) {
+ buf_len = (buf_len == 0) ? VKI_PATH_MAX : need;
+ buf = VG_(arena_realloc)(VG_AR_CORE, "basename", buf, buf_len);
+ }
VG_(strncpy)(buf, p, end-p+1);
buf[end-p+1] = '\0';
@@ -1204,7 +1208,8 @@
const HChar *VG_(dirname)(const HChar *path)
{
- static HChar buf[VKI_PATH_MAX];
+ static HChar *buf = NULL;
+ static SizeT buf_len = 0;
const HChar *p;
@@ -1236,6 +1241,11 @@
p--;
}
+ SizeT need = p-path+1 + 1;
+ if (need > buf_len) {
+ buf_len = (buf_len == 0) ? VKI_PATH_MAX : need;
+ buf = VG_(arena_realloc)(VG_AR_CORE, "dirname", buf, buf_len);
+ }
VG_(strncpy)(buf, path, p-path+1);
buf[p-path+1] = '\0';
|
|
From: Eliot M. <mo...@cs...> - 2014-07-29 17:31:45
|
On 7/29/2014 12:53 PM, Xin Tong wrote: > I am planning to use valgrind to experiment some of the self modifying code handling ideas I have. > but i got a crash when running a java benchmark under valgrind built by myself. > > Also i see the CPU usage of the valgrind process always below 100, which means only one CPU is > occupied. Is valgrind serializing the execution of the threads in the JVM ? Dear Xin -- There are a couple of issues you may be dealing with here. The immediate problem may be that Java is a little unusual in that it generates code on the fly. You need to tell valgrind some of that kind of thing. Here are the flags I used with the JDK: --smc-check=all --vexiropt-precise-memory-exns=yes I also have a custom modification of valgrind that allows me to collect separate trace files for different child processes; maybe not essential here, but I had some use for it. In terms of flags passed to the JVM, I used: -XX:+UseSerialGC This was a while ago, so I can;'t recall if this was necessary or just a preference, but it might be necessary. In terms of DaCapo (something I also have to do with that!), h2 is likely to run into timeouts and stuff. If you encounter that, I can perhaps give you some advice off of this list. Regards -- Eliot Moss |
|
From: Xin T. <tre...@gm...> - 2014-07-29 16:53:15
|
I am planning to use valgrind to experiment some of the self modifying code handling ideas I have. but i got a crash when running a java benchmark under valgrind built by myself. Also i see the CPU usage of the valgrind process always below 100, which means only one CPU is occupied. Is valgrind serializing the execution of the threads in the JVM ? Xin xtong@socrates:~/valgrind-3.9.0/build/bin$ ./valgrind --smc-check=all --tool=cachegrind java -jar ~/benchmarks/DACAPO/dacapo-9.12-bach.jar h2 ==7599== Cachegrind, a cache and branch-prediction profiler ==7599== Copyright (C) 2002-2013, and GNU GPL'd, by Nicholas Nethercote et al. ==7599== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info ==7599== Command: java -jar /home/xtong/benchmarks/DACAPO/dacapo-9.12-bach.jar h2 ==7599== --7599-- warning: L3 cache found, using its data for the LL simulation. --7599-- warning: pretending that LL cache has associativity 24 instead of actual 16 Using scaled threading model. 16 processors detected, 16 threads used to drive the workload, in a possible range of [1,4000] # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (sharedRuntime.cpp:814), pid=7599, tid=68437760 # guarantee(cb->is_adapter_blob() || cb->is_method_handles_adapter_blob()) failed: exception happened outside interpreter, nmethods and vtable stubs (1) # # JRE version: OpenJDK Runtime Environment (7.0_55-b14) (build 1.7.0_55-b14) # Java VM: OpenJDK 64-Bit Server VM (24.51-b03 mixed mode linux-amd64 compressed oops) # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /home/xtong/valgrind-3.9.0/build/bin/hs_err_pid7599.log # # If you would like to submit a bug report, please include # instructions on how to reproduce the bug and visit: # http://icedtea.classpath.org/bugzilla # ==7599== ==7599== I refs: 2,092,356,742 ==7599== I1 misses: 11,059,607 ==7599== LLi misses: 49,197 ==7599== I1 miss rate: 0.52% ==7599== LLi miss rate: 0.00% ==7599== ==7599== D refs: 932,164,115 (645,948,209 rd + 286,215,906 wr) ==7599== D1 misses: 74,115,777 ( 24,329,462 rd + 49,786,315 wr) ==7599== LLd misses: 740,728 ( 133,298 rd + 607,430 wr) ==7599== D1 miss rate: 7.9% ( 3.7% + 17.3% ) ==7599== LLd miss rate: 0.0% ( 0.0% + 0.2% ) ==7599== ==7599== LL refs: 85,175,384 ( 35,389,069 rd + 49,786,315 wr) ==7599== LL misses: 789,925 ( 182,495 rd + 607,430 wr) ==7599== LL miss rate: 0.0% ( 0.0% + 0.2% ) Killed xtong@socrates:~/valgrind-3.9.0/build/bin$ |
Author: florian
Date: Tue Jul 29 09:14:32 2014
New Revision: 14202
Log:
Change interface to VG_(demangle) and VG_(maybe_Z_demangle)
to return a pointer to the untruncated demangled name.
This change is identical to attachment 88001 of BZ 337869.
Modified:
branches/BUF_REMOVAL/cachegrind/cg_main.c
branches/BUF_REMOVAL/callgrind/debug.c
branches/BUF_REMOVAL/callgrind/fn.c
branches/BUF_REMOVAL/callgrind/global.h
branches/BUF_REMOVAL/coregrind/m_addrinfo.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/debuginfo.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/misc.c
branches/BUF_REMOVAL/coregrind/m_debuginfo/priv_misc.h
branches/BUF_REMOVAL/coregrind/m_demangle/demangle.c
branches/BUF_REMOVAL/coregrind/m_errormgr.c
branches/BUF_REMOVAL/coregrind/m_gdbserver/m_gdbserver.c
branches/BUF_REMOVAL/coregrind/m_gdbserver/valgrind-low-arm.c
branches/BUF_REMOVAL/coregrind/m_redir.c
branches/BUF_REMOVAL/coregrind/m_sbprofile.c
branches/BUF_REMOVAL/coregrind/m_stacktrace.c
branches/BUF_REMOVAL/coregrind/m_translate.c
branches/BUF_REMOVAL/coregrind/pub_core_debuginfo.h
branches/BUF_REMOVAL/coregrind/pub_core_demangle.h
branches/BUF_REMOVAL/exp-bbv/bbv_main.c
branches/BUF_REMOVAL/exp-sgcheck/pc_common.c
branches/BUF_REMOVAL/exp-sgcheck/sg_main.c
branches/BUF_REMOVAL/include/pub_tool_addrinfo.h
branches/BUF_REMOVAL/include/pub_tool_debuginfo.h
branches/BUF_REMOVAL/lackey/lk_main.c
branches/BUF_REMOVAL/massif/ms_main.c
Modified: branches/BUF_REMOVAL/cachegrind/cg_main.c
==============================================================================
--- branches/BUF_REMOVAL/cachegrind/cg_main.c (original)
+++ branches/BUF_REMOVAL/cachegrind/cg_main.c Tue Jul 29 09:14:32 2014
@@ -59,7 +59,6 @@
#define MIN_LINE_SIZE 16
#define FILE_LEN VKI_PATH_MAX
-#define FN_LEN 256
/*------------------------------------------------------------*/
/*--- Options ---*/
@@ -214,7 +213,7 @@
/*------------------------------------------------------------*/
static void get_debug_info(Addr instr_addr, HChar file[FILE_LEN],
- HChar fn[FN_LEN], UInt* line)
+ HChar **fn, UInt* line)
{
HChar dir[FILE_LEN];
Bool found_dirname;
@@ -224,14 +223,14 @@
dir, FILE_LEN, &found_dirname,
line
);
- Bool found_fn = VG_(get_fnname)(instr_addr, fn, FN_LEN);
+ Bool found_fn = VG_(get_fnname)(instr_addr, fn);
if (!found_file_line) {
VG_(strcpy)(file, "???");
*line = 0;
}
if (!found_fn) {
- VG_(strcpy)(fn, "???");
+ *fn = (HChar *)"???"; // FIXME: constification
}
if (found_dirname) {
@@ -255,12 +254,12 @@
// Returns a pointer to the line CC, creates a new one if necessary.
static LineCC* get_lineCC(Addr origAddr)
{
- HChar file[FILE_LEN], fn[FN_LEN];
+ HChar file[FILE_LEN], *fn;
UInt line;
CodeLoc loc;
LineCC* lineCC;
- get_debug_info(origAddr, file, fn, &line);
+ get_debug_info(origAddr, file, &fn, &line);
loc.file = file;
loc.fn = fn;
@@ -1385,6 +1384,7 @@
{
Int i, fd;
SysRes sres;
+ // FIXME: use an xarray and VG_(xaprintf) instead
HChar buf[512];
HChar *currFile = NULL, *currFn = NULL;
LineCC* lineCC;
Modified: branches/BUF_REMOVAL/callgrind/debug.c
==============================================================================
--- branches/BUF_REMOVAL/callgrind/debug.c (original)
+++ branches/BUF_REMOVAL/callgrind/debug.c Tue Jul 29 09:14:32 2014
@@ -374,7 +374,7 @@
void CLG_(print_addr)(Addr addr)
{
HChar fl_buf[FILENAME_LEN];
- HChar fn_buf[FN_NAME_LEN];
+ HChar *fn_buf;
const HChar* obj_name;
DebugInfo* di;
UInt ln, i=0, opos=0;
@@ -384,7 +384,7 @@
return;
}
- CLG_(get_debug_info)(addr, fl_buf, fn_buf, &ln, &di);
+ CLG_(get_debug_info)(addr, fl_buf, &fn_buf, &ln, &di);
if (VG_(strcmp)(fn_buf,"???")==0)
VG_(printf)("%#lx", addr);
Modified: branches/BUF_REMOVAL/callgrind/fn.c
==============================================================================
--- branches/BUF_REMOVAL/callgrind/fn.c (original)
+++ branches/BUF_REMOVAL/callgrind/fn.c Tue Jul 29 09:14:32 2014
@@ -330,7 +330,7 @@
static void resize_fn_array(void);
static __inline__
-fn_node* new_fn_node(HChar fnname[FILENAME_LEN],
+fn_node* new_fn_node(const HChar *fnname,
file_node* file, fn_node* next)
{
fn_node* fn = (fn_node*) CLG_MALLOC("cl.fn.nfnnd.1",
@@ -374,7 +374,7 @@
*/
static
fn_node* get_fn_node_infile(file_node* curr_file_node,
- HChar fnname[FN_NAME_LEN])
+ const HChar *fnname)
{
fn_node* curr_fn_node;
UInt fnname_hash;
@@ -404,7 +404,7 @@
static __inline__
fn_node* get_fn_node_inseg(DebugInfo* di,
HChar filename[FILENAME_LEN],
- HChar fnname[FN_NAME_LEN])
+ const HChar *fnname)
{
obj_node *obj = CLG_(get_obj_node)(di);
file_node *file = CLG_(get_file_node)(obj, filename);
@@ -416,7 +416,7 @@
Bool CLG_(get_debug_info)(Addr instr_addr,
HChar file[FILENAME_LEN],
- HChar fn_name[FN_NAME_LEN], UInt* line_num,
+ HChar **fn_name, UInt* line_num,
DebugInfo** pDebugInfo)
{
Bool found_file_line, found_fn, found_dirname, result = True;
@@ -437,7 +437,7 @@
&found_dirname,
&line);
found_fn = VG_(get_fnname)(instr_addr,
- fn_name, FN_NAME_LEN);
+ fn_name);
if (found_dirname) {
// +1 for the '/'.
@@ -450,7 +450,7 @@
if (!found_file_line && !found_fn) {
CLG_(stat).no_debug_BBs++;
VG_(strcpy)(file, "???");
- VG_(strcpy)(fn_name, "???");
+ *fn_name = (HChar *)"???"; // FIXME: constification
if (line_num) *line_num=0;
result = False;
@@ -460,7 +460,7 @@
} else if ( found_file_line && !found_fn) {
CLG_(stat).file_line_debug_BBs++;
- VG_(strcpy)(fn_name, "???");
+ *fn_name = (HChar *)"???"; // FIXME: constification
if (line_num) *line_num=line;
} else /*(!found_file_line && found_fn)*/ {
@@ -474,7 +474,7 @@
!pDebugInfo ? "-" :
(*pDebugInfo) ? VG_(DebugInfo_get_filename)(*pDebugInfo) :
"(None)",
- fn_name);
+ *fn_name);
return result;
}
@@ -488,7 +488,7 @@
*/
fn_node* CLG_(get_fn_node)(BB* bb)
{
- HChar filename[FILENAME_LEN], fnname[FN_NAME_LEN];
+ HChar filename[FILENAME_LEN], *fnname;
DebugInfo* di;
UInt line_num;
fn_node* fn;
@@ -502,26 +502,27 @@
* the BB according to debug information
*/
CLG_(get_debug_info)(bb_addr(bb),
- filename, fnname, &line_num, &di);
+ filename, &fnname, &line_num, &di);
if (0 == VG_(strcmp)(fnname, "???")) {
int p;
-
+ static HChar buf[32]; // for sure large enough
/* Use address as found in library */
if (sizeof(Addr) == 4)
- p = VG_(sprintf)(fnname, "%#08lx", bb->offset);
+ p = VG_(sprintf)(buf, "%#08lx", bb->offset);
else
// 64bit address
- p = VG_(sprintf)(fnname, "%#016lx", bb->offset);
+ p = VG_(sprintf)(buf, "%#016lx", bb->offset);
- VG_(sprintf)(fnname+p, "%s",
+ VG_(sprintf)(buf + p, "%s",
(bb->sect_kind == Vg_SectData) ? " [Data]" :
(bb->sect_kind == Vg_SectBSS) ? " [BSS]" :
(bb->sect_kind == Vg_SectGOT) ? " [GOT]" :
(bb->sect_kind == Vg_SectPLT) ? " [PLT]" : "");
+ fnname = buf;
}
else {
- if (VG_(get_fnname_if_entry)(bb_addr(bb), fnname, FN_NAME_LEN))
+ if (VG_(get_fnname_if_entry)(bb_addr(bb), &fnname))
bb->is_entry = 1;
}
@@ -532,7 +533,7 @@
if (0 == VG_(strcmp)(fnname, "vgPlain___libc_freeres_wrapper")
&& exit_bb) {
CLG_(get_debug_info)(bb_addr(exit_bb),
- filename, fnname, &line_num, &di);
+ filename, &fnname, &line_num, &di);
CLG_DEBUG(1, "__libc_freeres_wrapper renamed to _exit\n");
}
@@ -543,7 +544,7 @@
(bb_addr(bb) >= runtime_resolve_addr) &&
(bb_addr(bb) < runtime_resolve_addr + runtime_resolve_length)) {
/* BB in runtime_resolve found by code check; use this name */
- VG_(sprintf)(fnname, "_dl_runtime_resolve");
+ fnname = (HChar *)"_dl_runtime_resolve"; // FIXME: constification
}
/* get fn_node struct for this function */
Modified: branches/BUF_REMOVAL/callgrind/global.h
==============================================================================
--- branches/BUF_REMOVAL/callgrind/global.h (original)
+++ branches/BUF_REMOVAL/callgrind/global.h Tue Jul 29 09:14:32 2014
@@ -722,7 +722,7 @@
/* from main.c */
Bool CLG_(get_debug_info)(Addr, HChar filename[FILENAME_LEN],
- HChar fn_name[FN_NAME_LEN], UInt*, DebugInfo**);
+ HChar **fn_name, UInt*, DebugInfo**);
void CLG_(collectBlockInfo)(IRSB* bbIn, UInt*, UInt*, Bool*);
void CLG_(set_instrument_state)(const HChar*,Bool);
void CLG_(dump_profile)(const HChar* trigger,Bool only_current_thread);
Modified: branches/BUF_REMOVAL/coregrind/m_addrinfo.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_addrinfo.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_addrinfo.c Tue Jul 29 09:14:32 2014
@@ -82,15 +82,12 @@
}
/* -- Have a look at the low level data symbols - perhaps it's in
there. -- */
- VG_(memset)( &ai->Addr.DataSym.name,
- 0, sizeof(ai->Addr.DataSym.name));
+ HChar *name;
if (VG_(get_datasym_and_offset)(
- a, &ai->Addr.DataSym.name[0],
- sizeof(ai->Addr.DataSym.name)-1,
+ a, &name,
&ai->Addr.DataSym.offset )) {
+ ai->Addr.DataSym.name = VG_(strdup)("mc.da.dsname", name);
ai->tag = Addr_DataSym;
- vg_assert( ai->Addr.DataSym.name
- [ sizeof(ai->Addr.DataSym.name)-1 ] == 0);
return;
}
/* -- Perhaps it's on a thread's stack? -- */
@@ -198,6 +195,7 @@
break;
case Addr_DataSym:
+ VG_(free)(ai->Addr.DataSym.name);
break;
case Addr_Variable:
@@ -285,7 +283,7 @@
xpost );
if (ai->Addr.Stack.frameNo != -1 && ai->Addr.Stack.IP != 0) {
#define FLEN 256
- HChar fn[FLEN];
+ HChar *fn;
Bool hasfn;
HChar file[FLEN];
Bool hasfile;
@@ -293,7 +291,6 @@
Bool haslinenum;
PtrdiffT offset;
- hasfn = VG_(get_fnname)(ai->Addr.Stack.IP, fn, FLEN);
if (VG_(get_inst_offset_in_function)( ai->Addr.Stack.IP,
&offset))
haslinenum = VG_(get_linenum) (ai->Addr.Stack.IP - offset,
@@ -309,6 +306,8 @@
FLEN - VG_(strlen)(file) - 1);
}
+ hasfn = VG_(get_fnname)(ai->Addr.Stack.IP, &fn);
+
if (hasfn || hasfile)
VG_(emit)( "%sin frame #%d, created by %s (%s)%s\n",
xpre,
Modified: branches/BUF_REMOVAL/coregrind/m_debuginfo/debuginfo.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_debuginfo/debuginfo.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_debuginfo/debuginfo.c Tue Jul 29 09:14:32 2014
@@ -1627,7 +1627,7 @@
static
Bool get_sym_name ( Bool do_cxx_demangling, Bool do_z_demangling,
Bool do_below_main_renaming,
- Addr a, HChar* buf, Int nbuf,
+ Addr a, HChar** buf,
Bool match_anywhere_in_sym, Bool show_offset,
Bool findText, /*OUT*/PtrdiffT* offsetP )
{
@@ -1636,12 +1636,14 @@
PtrdiffT offset;
search_all_symtabs ( a, &di, &sno, match_anywhere_in_sym, findText );
- if (di == NULL)
+ if (di == NULL) {
+ *buf = (HChar *)""; // FIXME: constification
return False;
+ }
vg_assert(di->symtab[sno].pri_name);
VG_(demangle) ( do_cxx_demangling, do_z_demangling,
- di->symtab[sno].pri_name, buf, nbuf );
+ di->symtab[sno].pri_name, buf );
/* Do the below-main hack */
// To reduce the endless nuisance of multiple different names
@@ -1649,32 +1651,32 @@
// known incarnations of said into a single name, "(below main)", if
// --show-below-main=yes.
if ( do_below_main_renaming && ! VG_(clo_show_below_main) &&
- Vg_FnNameBelowMain == VG_(get_fnname_kind)(buf) )
+ Vg_FnNameBelowMain == VG_(get_fnname_kind)(*buf) )
{
- VG_(strncpy_safely)(buf, "(below main)", nbuf);
+ *buf = (HChar *)"(below main)"; // FIXME: constification
}
offset = a - di->symtab[sno].addr;
if (offsetP) *offsetP = offset;
if (show_offset && offset != 0) {
- HChar buf2[12];
- HChar* symend = buf + VG_(strlen)(buf);
- HChar* end = buf + nbuf;
- Int len;
-
- len = VG_(sprintf)(buf2, "%c%ld",
- offset < 0 ? '-' : '+',
- offset < 0 ? -offset : offset);
- vg_assert(len < (Int)sizeof(buf2));
-
- if (len < (end - symend)) {
- HChar *cp = buf2;
- VG_(memcpy)(symend, cp, len+1);
- }
+ static HChar *bufwo; // buf with offset
+ static SizeT bufwo_szB;
+ SizeT need, len;
+
+ len = VG_(strlen)(*buf);
+ need = len + 20;
+ if (need > bufwo_szB) {
+ bufwo = ML_(dinfo_realloc)("get_sym_size", bufwo, need);
+ bufwo_szB = need;
+ }
+
+ VG_(strcpy)(bufwo, *buf);
+ VG_(sprintf)(bufwo + len, "%c%ld",
+ offset < 0 ? '-' : '+',
+ offset < 0 ? -offset : offset);
+ *buf = bufwo;
}
- buf[nbuf-1] = 0; /* paranoia */
-
return True;
}
@@ -1697,11 +1699,11 @@
/* This is available to tools... always demangle C++ names,
match anywhere in function, but don't show offsets. */
-Bool VG_(get_fnname) ( Addr a, HChar* buf, Int nbuf )
+Bool VG_(get_fnname) ( Addr a, HChar** buf )
{
return get_sym_name ( /*C++-demangle*/True, /*Z-demangle*/True,
/*below-main-renaming*/True,
- a, buf, nbuf,
+ a, buf,
/*match_anywhere_in_fun*/True,
/*show offset?*/False,
/*text syms only*/True,
@@ -1710,11 +1712,11 @@
/* This is available to tools... always demangle C++ names,
match anywhere in function, and show offset if nonzero. */
-Bool VG_(get_fnname_w_offset) ( Addr a, HChar* buf, Int nbuf )
+Bool VG_(get_fnname_w_offset) ( Addr a, HChar** buf )
{
return get_sym_name ( /*C++-demangle*/True, /*Z-demangle*/True,
/*below-main-renaming*/True,
- a, buf, nbuf,
+ a, buf,
/*match_anywhere_in_fun*/True,
/*show offset?*/True,
/*text syms only*/True,
@@ -1724,11 +1726,11 @@
/* This is available to tools... always demangle C++ names,
only succeed if 'a' matches first instruction of function,
and don't show offsets. */
-Bool VG_(get_fnname_if_entry) ( Addr a, HChar* buf, Int nbuf )
+Bool VG_(get_fnname_if_entry) ( Addr a, HChar** buf )
{
return get_sym_name ( /*C++-demangle*/True, /*Z-demangle*/True,
/*below-main-renaming*/True,
- a, buf, nbuf,
+ a, buf,
/*match_anywhere_in_fun*/False,
/*show offset?*/False,
/*text syms only*/True,
@@ -1738,11 +1740,11 @@
/* This is only available to core... don't C++-demangle, don't Z-demangle,
don't rename below-main, match anywhere in function, and don't show
offsets. */
-Bool VG_(get_fnname_raw) ( Addr a, HChar* buf, Int nbuf )
+Bool VG_(get_fnname_raw) ( Addr a, HChar** buf )
{
return get_sym_name ( /*C++-demangle*/False, /*Z-demangle*/False,
/*below-main-renaming*/False,
- a, buf, nbuf,
+ a, buf,
/*match_anywhere_in_fun*/True,
/*show offset?*/False,
/*text syms only*/True,
@@ -1752,14 +1754,14 @@
/* This is only available to core... don't demangle C++ names, but do
do Z-demangling and below-main-renaming, match anywhere in function, and
don't show offsets. */
-Bool VG_(get_fnname_no_cxx_demangle) ( Addr a, HChar* buf, Int nbuf,
+Bool VG_(get_fnname_no_cxx_demangle) ( Addr a, HChar** buf,
InlIPCursor* iipc )
{
if (is_bottom(iipc)) {
// At the bottom (towards main), we describe the fn at eip.
return get_sym_name ( /*C++-demangle*/False, /*Z-demangle*/True,
/*below-main-renaming*/True,
- a, buf, nbuf,
+ a, buf,
/*match_anywhere_in_fun*/True,
/*show offset?*/False,
/*text syms only*/True,
@@ -1770,7 +1772,7 @@
: NULL;
vg_assert (next_inl);
// The function we are in is called by next_inl.
- VG_(snprintf)(buf, nbuf, "%s", next_inl->inlinedfn);
+ *buf = (HChar *)next_inl->inlinedfn; // FIXME: constification
return True;
}
}
@@ -1781,10 +1783,10 @@
Bool VG_(get_inst_offset_in_function)( Addr a,
/*OUT*/PtrdiffT* offset )
{
- HChar fnname[64];
+ HChar *fnname;
return get_sym_name ( /*C++-demangle*/False, /*Z-demangle*/False,
/*below-main-renaming*/False,
- a, fnname, 64,
+ a, &fnname,
/*match_anywhere_in_sym*/True,
/*show offset?*/False,
/*text syms only*/True,
@@ -1816,14 +1818,12 @@
Vg_FnNameKind VG_(get_fnname_kind_from_IP) ( Addr ip )
{
- // We don't need a big buffer; all the special names are small.
- #define BUFLEN 50
- HChar buf[50];
+ HChar *buf;
// We don't demangle, because it's faster not to, and the special names
// we're looking for won't be mangled.
- if (VG_(get_fnname_raw) ( ip, buf, BUFLEN )) {
- buf[BUFLEN-1] = '\0'; // paranoia
+ if (VG_(get_fnname_raw) ( ip, &buf )) {
+
return VG_(get_fnname_kind)(buf);
} else {
return Vg_FnNameNormal; // Don't know the name, treat it as normal.
@@ -1831,37 +1831,30 @@
}
/* Looks up data_addr in the collection of data symbols, and if found
- puts its name (or as much as will fit) into dname[0 .. n_dname-1],
- which is guaranteed to be zero terminated. Also data_addr's offset
- from the symbol start is put into *offset. */
+ puts a pointer to its name into dname. The name is zero terminated.
+ Also data_addr's offset from the symbol start is put into *offset. */
Bool VG_(get_datasym_and_offset)( Addr data_addr,
- /*OUT*/HChar* dname, Int n_dname,
+ /*OUT*/HChar** dname,
/*OUT*/PtrdiffT* offset )
{
- Bool ok;
- vg_assert(n_dname > 1);
- ok = get_sym_name ( /*C++-demangle*/False, /*Z-demangle*/False,
+ return get_sym_name ( /*C++-demangle*/False, /*Z-demangle*/False,
/*below-main-renaming*/False,
- data_addr, dname, n_dname,
+ data_addr, dname,
/*match_anywhere_in_sym*/True,
/*show offset?*/False,
/*data syms only please*/False,
offset );
- if (!ok)
- return False;
- dname[n_dname-1] = 0;
- return True;
}
/* Map a code address to the name of a shared object file or the
executable. Returns False if no idea; otherwise True. Doesn't
- require debug info. Caller supplies buf and nbuf. */
-Bool VG_(get_objname) ( Addr a, HChar* buf, Int nbuf )
+ require debug info. */
+Bool VG_(get_objname) ( Addr a, HChar** buf )
{
DebugInfo* di;
const NSegment *seg;
HChar* filename;
- vg_assert(nbuf > 0);
+
/* Look in the debugInfo_list to find the name. In most cases we
expect this to produce a result. */
for (di = debugInfo_list; di != NULL; di = di->next) {
@@ -1869,7 +1862,7 @@
&& di->text_size > 0
&& di->text_avma <= a
&& a < di->text_avma + di->text_size) {
- VG_(strncpy_safely)(buf, di->fsm.filename, nbuf);
+ *buf = di->fsm.filename;
return True;
}
}
@@ -1880,7 +1873,7 @@
when running programs under wine. */
if ( (seg = VG_(am_find_nsegment(a))) != NULL
&& (filename = VG_(am_get_filename)(seg)) != NULL ) {
- VG_(strncpy_safely)(buf, filename, nbuf);
+ *buf = filename;
return True;
}
return False;
@@ -2122,11 +2115,11 @@
vg_assert (!iipc || iipc->eip == eip);
- static HChar buf_fn[BUF_LEN];
- static HChar buf_obj[BUF_LEN];
+ static HChar *buf_fn;
+ static HChar *buf_obj;
static HChar buf_srcloc[BUF_LEN];
static HChar buf_dirname[BUF_LEN];
- buf_fn[0] = buf_obj[0] = buf_srcloc[0] = buf_dirname[0] = 0;
+ buf_srcloc[0] = buf_dirname[0] = 0;
Bool know_dirinfo = False;
Bool know_fnname;
@@ -2136,15 +2129,15 @@
if (is_bottom(iipc)) {
// At the bottom (towards main), we describe the fn at eip.
know_fnname = VG_(clo_sym_offsets)
- ? VG_(get_fnname_w_offset) (eip, buf_fn, BUF_LEN)
- : VG_(get_fnname) (eip, buf_fn, BUF_LEN);
+ ? VG_(get_fnname_w_offset) (eip, &buf_fn)
+ : VG_(get_fnname) (eip, &buf_fn);
} else {
const DiInlLoc *next_inl = iipc && iipc->next_inltab >= 0
? & iipc->di->inltab[iipc->next_inltab]
: NULL;
vg_assert (next_inl);
// The function we are in is called by next_inl.
- VG_(snprintf)(buf_fn, BUF_LEN, "%s", next_inl->inlinedfn);
+ buf_fn = (HChar *)next_inl->inlinedfn; // FIXME: constification
know_fnname = True;
// INLINED????
@@ -2155,7 +2148,7 @@
// ??? Currently never showing an offset.
}
- know_objname = VG_(get_objname)(eip, buf_obj, BUF_LEN);
+ know_objname = VG_(get_objname)(eip, &buf_obj);
if (is_top(iipc)) {
// The source for the highest level is in the loctab entry.
@@ -2177,10 +2170,7 @@
know_dirinfo = False;
know_srcloc = True;
}
-
- buf_fn [ sizeof(buf_fn)-1 ] = 0;
- buf_obj [ sizeof(buf_obj)-1 ] = 0;
buf_srcloc [ sizeof(buf_srcloc)-1 ] = 0;
buf_dirname[ sizeof(buf_dirname)-1 ] = 0;
Modified: branches/BUF_REMOVAL/coregrind/m_debuginfo/misc.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_debuginfo/misc.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_debuginfo/misc.c Tue Jul 29 09:14:32 2014
@@ -70,6 +70,12 @@
return dst;
}
+void* ML_(dinfo_realloc) ( const HChar* cc, void* ptr, SizeT new_size ) {
+ void* dst = VG_(arena_realloc)( VG_AR_DINFO, cc, ptr, new_size );
+ tl_assert(dst);
+ return dst;
+}
+
static inline Bool host_is_little_endian ( void ) {
UInt x = 0x76543210;
UChar* p = (UChar*)(&x);
Modified: branches/BUF_REMOVAL/coregrind/m_debuginfo/priv_misc.h
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_debuginfo/priv_misc.h (original)
+++ branches/BUF_REMOVAL/coregrind/m_debuginfo/priv_misc.h Tue Jul 29 09:14:32 2014
@@ -43,6 +43,7 @@
void ML_(dinfo_free)( void* v );
HChar* ML_(dinfo_strdup)( const HChar* cc, const HChar* str );
void* ML_(dinfo_memdup)( const HChar* cc, void* str, SizeT nStr );
+void* ML_(dinfo_realloc) ( const HChar* cc, void* ptr, SizeT new_size );
void ML_(dinfo_shrink_block)( void* ptr, SizeT szB );
/* Extract (possibly unaligned) data of various sizes from a buffer. */
Modified: branches/BUF_REMOVAL/coregrind/m_demangle/demangle.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_demangle/demangle.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_demangle/demangle.c Tue Jul 29 09:14:32 2014
@@ -83,36 +83,46 @@
/* This is the main, standard demangler entry point. */
+/* Upon return, *RESULT will point to the demangled name.
+ The memory buffer that holds the demangled name is allocated on the
+ heap and will be deallocated in the next invocation. Conceptually,
+ that buffer is owned by VG_(demangle). That means two things:
+ (1) Users of VG_(demangle) must not free that buffer.
+ (2) If the demangled name needs to be stashed away for later use,
+ the contents of the buffer needs to be copied. It is not sufficient
+ to just store the pointer as it will point to deallocated memory
+ after the next VG_(demangle) invocation. */
void VG_(demangle) ( Bool do_cxx_demangling, Bool do_z_demangling,
- HChar* orig, HChar* result, Int result_size )
+ /* IN */ HChar* orig,
+ /* OUT */ HChar** result )
{
-# define N_ZBUF 4096
- HChar* demangled = NULL;
- HChar z_demangled[N_ZBUF];
-
/* Possibly undo (2) */
/* Z-Demangling was requested.
The fastest way to see if it's a Z-mangled name is just to attempt
to Z-demangle it (with NULL for the soname buffer, since we're not
interested in that). */
if (do_z_demangling) {
- if (VG_(maybe_Z_demangle)( orig, NULL,0,/*soname*/
- z_demangled, N_ZBUF, NULL, NULL, NULL )) {
+ HChar *z_demangled;
+
+ if (VG_(maybe_Z_demangle)( orig, NULL, /*soname*/
+ &z_demangled, NULL,
+ NULL, NULL )) {
orig = z_demangled;
}
}
/* Possibly undo (1) */
if (do_cxx_demangling && VG_(clo_demangle)) {
+ static HChar* demangled = NULL;
+
+ /* Free up previously demangled name */
+ if (demangled) VG_(arena_free) (VG_AR_DEMANGLE, demangled);
+
demangled = ML_(cplus_demangle) ( orig, DMGL_ANSI | DMGL_PARAMS );
+
+ *result = (demangled == NULL) ? orig : demangled;
} else {
- demangled = NULL;
- }
- if (demangled) {
- VG_(strncpy_safely)(result, demangled, result_size);
- VG_(arena_free) (VG_AR_DEMANGLE, demangled);
- } else {
- VG_(strncpy_safely)(result, orig, result_size);
+ *result = orig;
}
// 13 Mar 2005: We used to check here that the demangler wasn't leaking
@@ -120,7 +130,6 @@
// very rarely (ie. I've heard of it twice in 3 years), the demangler
// does leak. But, we can't do much about it, and it's not a disaster,
// so we just let it slide without aborting or telling the user.
-# undef N_ZBUF
}
@@ -141,38 +150,30 @@
function name part. */
Bool VG_(maybe_Z_demangle) ( const HChar* sym,
- /*OUT*/HChar* so, Int soLen,
- /*OUT*/HChar* fn, Int fnLen,
+ /*OUT*/HChar** so,
+ /*OUT*/HChar** fn,
/*OUT*/Bool* isWrap,
/*OUT*/Int* eclassTag,
/*OUT*/Int* eclassPrio )
{
+ if (so) so[0] = '\0';
+ fn[0] = '\0';
+
# define EMITSO(ch) \
do { \
if (so) { \
- if (soi >= soLen) { \
- so[soLen-1] = 0; oflow = True; \
- } else { \
- so[soi++] = ch; so[soi] = 0; \
- } \
+ sobuf[soi++] = ch; sobuf[soi] = 0; \
} \
} while (0)
# define EMITFN(ch) \
do { \
- if (fni >= fnLen) { \
- fn[fnLen-1] = 0; oflow = True; \
- } else { \
- fn[fni++] = ch; fn[fni] = 0; \
- } \
+ fnbuf[fni++] = ch; fnbuf[fni] = 0; \
} while (0)
- Bool error, oflow, valid, fn_is_encoded, is_VG_Z_prefixed;
+ Bool error, valid, fn_is_encoded, is_VG_Z_prefixed;
Int soi, fni, i;
- vg_assert(soLen > 0 || (soLen == 0 && so == NULL));
- vg_assert(fnLen > 0);
error = False;
- oflow = False;
soi = 0;
fni = 0;
@@ -200,6 +201,23 @@
if (!valid)
return False;
+ static HChar *sobuf;
+ static HChar *fnbuf;
+ static SizeT buf_len = 0;
+
+ /* The length of the name after undoing Z-encoding is always smaller
+ than the mangled name. Making the soname and fnname buffers as large
+ as the demangled name is therefore always safe and overflow can never
+ occur. */
+ SizeT len = VG_(strlen)(sym) + 1;
+
+ if (buf_len < len) {
+ sobuf = VG_(arena_realloc)(VG_AR_DEMANGLE, "Z-demangle", sobuf, len);
+ fnbuf = VG_(arena_realloc)(VG_AR_DEMANGLE, "Z-demangle", fnbuf, len);
+ buf_len = len;
+ sobuf[0] = fnbuf[0] = '\0';
+ }
+
fn_is_encoded = sym[10] == 'Z';
if (isWrap)
@@ -323,18 +341,16 @@
EMITSO(0);
EMITFN(0);
+ if (so)
+ *so = sobuf;
+ *fn = fnbuf;
+
if (error) {
/* Something's wrong. Give up. */
VG_(message)(Vg_UserMsg,
"m_demangle: error Z-demangling: %s\n", sym);
return False;
}
- if (oflow) {
- /* It didn't fit. Give up. */
- VG_(message)(Vg_UserMsg,
- "m_demangle: oflow Z-demangling: %s\n", sym);
- return False;
- }
return True;
}
Modified: branches/BUF_REMOVAL/coregrind/m_errormgr.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_errormgr.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_errormgr.c Tue Jul 29 09:14:32 2014
@@ -325,13 +325,13 @@
static void printSuppForIp_XML(UInt n, Addr ip, void* uu_opaque)
{
- static HChar buf[ERRTXT_LEN];
+ HChar *buf;
InlIPCursor* iipc = VG_(new_IIPC)(ip);
do {
- if ( VG_(get_fnname_no_cxx_demangle) (ip, buf, ERRTXT_LEN, iipc) ) {
+ if ( VG_(get_fnname_no_cxx_demangle) (ip, &buf, iipc) ) {
VG_(printf_xml)(" <sframe> <fun>%pS</fun> </sframe>\n", buf);
} else
- if ( VG_(get_objname)(ip, buf, ERRTXT_LEN) ) {
+ if ( VG_(get_objname)(ip, &buf) ) {
VG_(printf_xml)(" <sframe> <obj>%pS</obj> </sframe>\n", buf);
} else {
VG_(printf_xml)(" <sframe> <obj>*</obj> </sframe>\n");
@@ -342,14 +342,14 @@
static void printSuppForIp_nonXML(UInt n, Addr ip, void* textV)
{
- static HChar buf[ERRTXT_LEN];
+ HChar *buf;
XArray* /* of HChar */ text = (XArray*)textV;
InlIPCursor* iipc = VG_(new_IIPC)(ip);
do {
- if ( VG_(get_fnname_no_cxx_demangle) (ip, buf, ERRTXT_LEN, iipc) ) {
+ if ( VG_(get_fnname_no_cxx_demangle) (ip, &buf, iipc) ) {
VG_(xaprintf)(text, " fun:%s\n", buf);
} else
- if ( VG_(get_objname)(ip, buf, ERRTXT_LEN) ) {
+ if ( VG_(get_objname)(ip, &buf) ) {
VG_(xaprintf)(text, " obj:%s\n", buf);
} else {
VG_(xaprintf)(text, " obj:*\n");
@@ -1591,17 +1591,19 @@
if (ip2fo->names) VG_(free)(ip2fo->names);
}
-/* Grow ip2fo->names to ensure we have ERRTXT_LEN characters available
+/* Grow ip2fo->names to ensure we have NEEDED characters available
in ip2fo->names and returns a pointer to the first free char. */
-static HChar* grow_names(IPtoFunOrObjCompleter* ip2fo)
+static HChar* grow_names(IPtoFunOrObjCompleter* ip2fo, SizeT needed)
{
if (ip2fo->names_szB
- < ip2fo->names_free + ERRTXT_LEN) {
+ < ip2fo->names_free + needed) {
+ if (needed < ERRTXT_LEN) needed = ERRTXT_LEN;
+
ip2fo->names
= VG_(realloc)("foc_names",
ip2fo->names,
- ip2fo->names_szB + ERRTXT_LEN);
- ip2fo->names_szB += ERRTXT_LEN;
+ ip2fo->names_szB + needed);
+ ip2fo->names_szB += needed;
}
return ip2fo->names + ip2fo->names_free;
}
@@ -1627,7 +1629,8 @@
// Complete Fun name or Obj name for IP if not yet done.
if ((*offsets)[ixInput] == -1) {
- HChar* caller_name = grow_names(ip2fo);
+ HChar* caller;
+
(*offsets)[ixInput] = ip2fo->names_free;
if (DEBUG_ERRORMGR) VG_(printf)("marking %s ixInput %d offset %d\n",
needFun ? "fun" : "obj",
@@ -1643,9 +1646,9 @@
// "_vgrZU_libcZdsoZa_malloc" in the backtrace, and the
// two of them need to be made to match.
if (!VG_(get_fnname_no_cxx_demangle)(ip2fo->ips[ixInput],
- caller_name, ERRTXT_LEN,
+ &caller,
NULL))
- VG_(strcpy)(caller_name, "???");
+ caller = (HChar *)"???"; // FIXME: constification
} else {
/* Get the object name into 'caller_name', or "???"
if unknown. */
@@ -1663,8 +1666,8 @@
last_expand_pos_ips is the last offset in fun/obj where
ips[pos_ips] has been expanded. */
- if (!VG_(get_objname)(ip2fo->ips[pos_ips], caller_name, ERRTXT_LEN))
- VG_(strcpy)(caller_name, "???");
+ if (!VG_(get_objname)(ip2fo->ips[pos_ips], &caller))
+ caller = (HChar *)"???"; // FIXME: constification
// Have all inlined calls pointing at this object name
for (i = last_expand_pos_ips - ip2fo->n_offsets_per_ip[pos_ips] + 1;
@@ -1675,7 +1678,10 @@
VG_(printf) (" set obj_offset %lu to %d\n", i, ip2fo->names_free);
}
}
- ip2fo->names_free += VG_(strlen)(caller_name) + 1;
+ SizeT caller_len = VG_(strlen)(caller);
+ HChar* caller_name = grow_names(ip2fo, caller_len + 1);
+ VG_(strcpy)(caller_name, caller);
+ ip2fo->names_free += caller_len + 1;
if (DEBUG_ERRORMGR) pp_ip2fo(ip2fo);
}
@@ -1735,14 +1741,17 @@
// However, computing this is mostly the same as finding
// the function name. So, let's directly complete the function name.
do {
- HChar* caller_name = grow_names(ip2fo);
+ HChar *caller;
grow_offsets(ip2fo, ip2fo->n_expanded+1);
ip2fo->fun_offsets[ip2fo->n_expanded] = ip2fo->names_free;
if (!VG_(get_fnname_no_cxx_demangle)(IP,
- caller_name, ERRTXT_LEN,
+ &caller,
iipc))
- VG_(strcpy)(caller_name, "???");
- ip2fo->names_free += VG_(strlen)(caller_name) + 1;
+ caller = (HChar *)"???"; // FIXME: constification
+ SizeT caller_len = VG_(strlen)(caller);
+ HChar* caller_name = grow_names(ip2fo, caller_len + 1);
+ VG_(strcpy)(caller_name, caller);
+ ip2fo->names_free += caller_len + 1;
ip2fo->n_expanded++;
ip2fo->n_offsets_per_ip[ip2fo->n_ips_expanded]++;
} while (VG_(next_IIPC)(iipc));
Modified: branches/BUF_REMOVAL/coregrind/m_gdbserver/m_gdbserver.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_gdbserver/m_gdbserver.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_gdbserver/m_gdbserver.c Tue Jul 29 09:14:32 2014
@@ -140,15 +140,23 @@
oldest result. */
static HChar* sym (Addr addr, Bool is_code)
{
- static HChar buf[2][200];
+ static HChar *buf[2];
static int w = 0;
PtrdiffT offset;
if (w == 2) w = 0;
- buf[w][0] = '\0';
+
if (is_code) {
- VG_(describe_IP) (addr, buf[w], 200, NULL);
+ HChar name[200];
+ VG_(describe_IP) (addr, name, 200, NULL); // FIXME: get rid of name
+ // FIXME: is this called often? if so do something with realloc
+ if (buf[w]) VG_(free)(buf[w]);
+ buf[w] = VG_(strdup)("gdbserver sym", name);
} else {
- VG_(get_datasym_and_offset) (addr, buf[w], 200, &offset);
+ HChar *name;
+ VG_(get_datasym_and_offset) (addr, &name, &offset);
+ // FIXME: is this called often? if so do something with realloc
+ if (buf[w]) VG_(free)(buf[w]);
+ buf[w] = VG_(strdup)("gdbserver sym", name);
}
return buf[w++];
}
Modified: branches/BUF_REMOVAL/coregrind/m_gdbserver/valgrind-low-arm.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_gdbserver/valgrind-low-arm.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_gdbserver/valgrind-low-arm.c Tue Jul 29 09:14:32 2014
@@ -144,14 +144,14 @@
// pc aligned on 4 bytes. We need to use debug info.
{
- HChar fnname[200]; // ??? max size
+ HChar *fnname;
Addr entrypoint;
Addr ptoc; // unused but needed.
// If this is a thumb instruction, we need to ask
// the debug info with the bit0 set
// (why can't debug info do that for us ???)
// (why if this is a 4 bytes thumb instruction ???)
- if (VG_(get_fnname_raw) (pc | 1, fnname, 200)) {
+ if (VG_(get_fnname_raw) (pc | 1, &fnname)) {
if (VG_(lookup_symbol_SLOW)( "*", fnname, &entrypoint, &ptoc )) {
dlog (1, "fnname %s lookupsym %p => %p %s.\n",
fnname, C2v(entrypoint), C2v(pc),
Modified: branches/BUF_REMOVAL/coregrind/m_redir.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_redir.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_redir.c Tue Jul 29 09:14:32 2014
@@ -385,8 +385,6 @@
topspecs list, and (2) figure out what new binding are now active,
and, as a result, add them to the actives mapping. */
-#define N_DEMANGLED 256
-
void VG_(redir_notify_new_DebugInfo)( DebugInfo* newdi )
{
Bool ok, isWrap;
@@ -398,8 +396,8 @@
HChar* sym_name_pri;
HChar** sym_names_sec;
Addr sym_addr, sym_toc;
- HChar demangled_sopatt[N_DEMANGLED];
- HChar demangled_fnpatt[N_DEMANGLED];
+ HChar* demangled_sopatt;
+ HChar* demangled_fnpatt;
Bool check_ppcTOCs = False;
Bool isText;
const HChar* newdi_soname;
@@ -509,8 +507,8 @@
HChar** names;
for (names = names_init; *names; names++) {
ok = VG_(maybe_Z_demangle)( *names,
- demangled_sopatt, N_DEMANGLED,
- demangled_fnpatt, N_DEMANGLED,
+ &demangled_sopatt,
+ &demangled_fnpatt,
&isWrap, &becTag, &becPrio );
/* ignore data symbols */
if (!isText)
@@ -602,8 +600,8 @@
for (names = names_init; *names; names++) {
ok = isText
&& VG_(maybe_Z_demangle)(
- *names, demangled_sopatt, N_DEMANGLED,
- demangled_fnpatt, N_DEMANGLED, &isWrap, NULL, NULL );
+ *names, &demangled_sopatt,
+ &demangled_fnpatt, &isWrap, NULL, NULL );
if (!ok)
/* not a redirect. Ignore. */
continue;
@@ -685,8 +683,6 @@
handle_require_text_symbols(newdi);
}
-#undef N_DEMANGLED
-
/* Add a new target for an indirect function. Adds a new redirection
for the indirection function with address old_from that redirects
the ordinary function with address new_from to the target address
@@ -1637,13 +1633,17 @@
static void show_active ( const HChar* left, Active* act )
{
Bool ok;
- HChar name1[64] = "";
- HChar name2[64] = "";
- name1[0] = name2[0] = 0;
- ok = VG_(get_fnname_w_offset)(act->from_addr, name1, 64);
- if (!ok) VG_(strcpy)(name1, "???");
- ok = VG_(get_fnname_w_offset)(act->to_addr, name2, 64);
- if (!ok) VG_(strcpy)(name2, "???");
+ HChar *buf;
+
+ ok = VG_(get_fnname_w_offset)(act->from_addr, &buf);
+ if (!ok) buf = (HChar *)"???"; // FIXME: constification
+ // Stash away name1
+ HChar name1[VG_(strlen)(buf) + 1];
+ VG_(strcpy)(name1, buf);
+
+ HChar *name2;
+ ok = VG_(get_fnname_w_offset)(act->to_addr, &name2);
+ if (!ok) name2 = (HChar *)"???"; // FIXME: constification
VG_(message)(Vg_DebugMsg, "%s0x%08llx (%20s) %s-> (%04d.%d) 0x%08llx %s\n",
left,
Modified: branches/BUF_REMOVAL/coregrind/m_sbprofile.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_sbprofile.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_sbprofile.c Tue Jul 29 09:14:32 2014
@@ -51,7 +51,7 @@
{
ULong score_cumul, score_cumul_saved, score_here;
HChar buf_cumul[10], buf_here[10];
- HChar name[64];
+ HChar *name;
Int r; /* must be signed */
HChar ecs_txt[50];
@@ -84,9 +84,9 @@
continue;
if (tops[r].score == 0)
continue;
- name[0] = 0;
- VG_(get_fnname_w_offset)(tops[r].addr, name, 64);
- name[63] = 0;
+
+ VG_(get_fnname_w_offset)(tops[r].addr, &name);
+
score_here = tops[r].score;
score_cumul += score_here;
VG_(percentify)(score_cumul, score_total, 2, 6, buf_cumul);
@@ -116,9 +116,9 @@
continue;
if (tops[r].score == 0)
continue;
- name[0] = 0;
- VG_(get_fnname_w_offset)(tops[r].addr, name, 64);
- name[63] = 0;
+
+ VG_(get_fnname_w_offset)(tops[r].addr, &name);
+
score_here = tops[r].score;
score_cumul += score_here;
VG_(percentify)(score_cumul, score_total, 2, 6, buf_cumul);
@@ -145,9 +145,9 @@
continue;
if (tops[r].score == 0)
continue;
- name[0] = 0;
- VG_(get_fnname_w_offset)(tops[r].addr, name, 64);
- name[63] = 0;
+
+ VG_(get_fnname_w_offset)(tops[r].addr, &name);
+
score_here = tops[r].score;
VG_(percentify)(score_cumul, score_total, 2, 6, buf_cumul);
VG_(percentify)(score_here, score_total, 2, 6, buf_here);
Modified: branches/BUF_REMOVAL/coregrind/m_stacktrace.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_stacktrace.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_stacktrace.c Tue Jul 29 09:14:32 2014
@@ -716,15 +716,13 @@
frame. */
lr_is_first_RA = False;
{
-# define M_VG_ERRTXT 1000
- HChar buf_lr[M_VG_ERRTXT], buf_ip[M_VG_ERRTXT];
+ HChar *buf_lr, *buf_ip;
/* The following conditional looks grossly inefficient and
surely could be majorly improved, with not much effort. */
- if (VG_(get_fnname_raw) (lr, buf_lr, M_VG_ERRTXT))
- if (VG_(get_fnname_raw) (ip, buf_ip, M_VG_ERRTXT))
- if (VG_(strncmp)(buf_lr, buf_ip, M_VG_ERRTXT))
+ if (VG_(get_fnname_raw) (lr, &buf_lr))
+ if (VG_(get_fnname_raw) (ip, &buf_ip))
+ if (VG_(strcmp)(buf_lr, buf_ip))
lr_is_first_RA = True;
-# undef M_VG_ERRTXT
}
if (sps) sps[0] = fp; /* NB. not sp */
Modified: branches/BUF_REMOVAL/coregrind/m_translate.c
==============================================================================
--- branches/BUF_REMOVAL/coregrind/m_translate.c (original)
+++ branches/BUF_REMOVAL/coregrind/m_translate.c Tue Jul 29 09:14:32 2014
@@ -1386,13 +1386,9 @@
if ((kind == T_Redir_Wrap || kind == T_Redir_Replace)
&& (VG_(clo_verbosity) >= 2 || VG_(clo_trace_redir))) {
Bool ok;
- HChar name1[512] = "";
- HChar name2[512] = "";
- name1[0] = name2[0] = 0;
- ok = VG_(get_fnname_w_offset)(nraddr, name1, sizeof(name1));
- if (!ok) VG_(strcpy)(name1, "???");
- ok = VG_(get_fnname_w_offset)(addr, name2, sizeof(name2));
- if (!ok) VG_(strcpy)(name2, "???");
+ HChar *buf;
+ HChar *name2;
+
/* Try also to get the soname (not the filename) of the "from"
object. This makes it much easier to debug redirection
problems. */
@@ -1403,6 +1399,15 @@
if (t)
nraddr_soname = t;
}
+
+ ok = VG_(get_fnname_w_offset)(nraddr, &buf);
+ if (!ok) buf = (HChar *)"???"; // FIXME: constification
+ // Stash away name1
+ HChar name1[VG_(strlen)(buf) + 1];
+ VG_(strcpy)(name1, buf);
+ ok = VG_(get_fnname_w_offset)(addr, &name2);
+ if (!ok) name2 = (HChar *)"???"; // FIXME: constification
+
VG_(message)(Vg_DebugMsg,
"REDIR: 0x%llx (%s:%s) redirected to 0x%llx (%s)\n",
nraddr, nraddr_soname, name1,
@@ -1415,8 +1420,6 @@
/* If doing any code printing, print a basic block start marker */
if (VG_(clo_trace_flags) || debugging_translation) {
- HChar fnname[512] = "UNKNOWN_FUNCTION";
- VG_(get_fnname_w_offset)(addr, fnname, 512);
const HChar* objname = "UNKNOWN_OBJECT";
OffT objoff = 0;
DebugInfo* di = VG_(find_DebugInfo)( addr );
@@ -1425,6 +1428,10 @@
objoff = addr - VG_(DebugInfo_get_text_bias)(di);
}
vg_assert(objname);
+
+ HChar *fnname;
+ Bool ok = VG_(get_fnname_w_offset)(addr, &fnname);
+ if (!ok) fnname = (HChar *)"UNKNOWN_FUNCTION"; // FIXME: constification
VG_(printf)(
"==== SB %d (evchecks %lld) [tid %d] 0x%llx %s %s+0x%llx\n",
VG_(get_bbs_translated)(), bbs_done, (Int)tid, addr,
Modified: branches/BUF_REMOVAL/coregrind/pub_core_debuginfo.h
==============================================================================
--- branches/BUF_REMOVAL/coregrind/pub_core_debuginfo.h (original)
+++ branches/BUF_REMOVAL/coregrind/pub_core_debuginfo.h Tue Jul 29 09:14:32 2014
@@ -86,13 +86,13 @@
* It should only be used in cases where the names of interest will have
* particular (ie. non-mangled) forms, or the mangled form is acceptable. */
extern
-Bool VG_(get_fnname_raw) ( Addr a, HChar* buf, Int nbuf );
+Bool VG_(get_fnname_raw) ( Addr a, HChar** buf );
/* Like VG_(get_fnname), but without C++ demangling. (But it does
Z-demangling and below-main renaming.)
iipc argument: same usage as in VG_(describe_IP) in pub_tool_debuginfo.h. */
extern
-Bool VG_(get_fnname_no_cxx_demangle) ( Addr a, HChar* buf, Int nbuf,
+Bool VG_(get_fnname_no_cxx_demangle) ( Addr a, HChar** buf,
InlIPCursor* iipc );
/* mips-linux only: find the offset of current address. This is needed for
Modified: branches/BUF_REMOVAL/coregrind/pub_core_demangle.h
==============================================================================
--- branches/BUF_REMOVAL/coregrind/pub_core_demangle.h (original)
+++ branches/BUF_REMOVAL/coregrind/pub_core_demangle.h Tue Jul 29 09:14:32 2014
@@ -43,7 +43,7 @@
* (2) undoes C++ demangling, if 'do_cxx_demangle' is True. */
extern
void VG_(demangle) ( Bool do_cxx_demangling, Bool do_z_demangling,
- HChar* orig, HChar* result, Int result_size );
+ HChar* orig, HChar** result );
/* Demangle a Z-encoded name as described in pub_tool_redir.h.
Z-encoded names are used by Valgrind for doing function
@@ -59,8 +59,8 @@
extern
Bool VG_(maybe_Z_demangle) ( const HChar* sym,
- /*OUT*/HChar* so, Int soLen,
- /*OUT*/HChar* fn, Int fnLen,
+ /*OUT*/HChar** so,
+ /*OUT*/HChar** fn,
/*OUT*/Bool* isWrap,
/*OUT*/Int* eclassTag,
/*OUT*/Int* eclassPrio );
Modified: branches/BUF_REMOVAL/exp-bbv/bbv_main.c
==============================================================================
--- branches/BUF_REMOVAL/exp-bbv/bbv_main.c (original)
+++ branches/BUF_REMOVAL/exp-bbv/bbv_main.c Tue Jul 29 09:14:32 2014
@@ -87,15 +87,13 @@
Int bbtrace_fd; /* file descriptor */
};
-#define FUNCTION_NAME_LENGTH 20
-
struct BB_info {
Addr BB_addr; /* used as key, must be first */
Int n_instrs; /* instructions in the basic block */
Int block_num; /* unique block identifier */
Int *inst_counter; /* times entered * num_instructions */
Bool is_entry; /* is this block a function entry point */
- HChar fn_name[FUNCTION_NAME_LENGTH]; /* Function block is in */
+ HChar *fn_name; /* Function block is in */
};
@@ -403,8 +401,9 @@
bbInfo->block_num=block_num;
block_num++;
/* get function name and entry point information */
- bbInfo->is_entry=VG_(get_fnname_if_entry)(origAddr, bbInfo->fn_name,
- FUNCTION_NAME_LENGTH);
+ HChar *fn_name;
+ bbInfo->is_entry=VG_(get_fnname_if_entry)(origAddr, &fn_name);
+ bbInfo->fn_name =VG_(strdup)("bbv_strings", fn_name);
/* insert structure into table */
VG_(OSetGen_Insert)( instr_info_table, bbInfo );
}
Modified: branches/BUF_REMOVAL/exp-sgcheck/pc_common.c
==============================================================================
--- branches/BUF_REMOVAL/exp-sgcheck/pc_common.c (original)
+++ branches/BUF_REMOVAL/exp-sgcheck/pc_common.c Tue Jul 29 09:14:32 2014
@@ -134,7 +134,7 @@
Seg* vseg;
XArray* descr1; /* XArray* of HChar */
XArray* descr2; /* XArray* of HChar */
- HChar datasym[96];
+ HChar* datasym;
PtrdiffT datasymoff;
} Heap;
struct {
@@ -657,9 +657,8 @@
case XE_Heap: {
Bool have_descr;
- tl_assert(sizeof(xe->XE.Heap.datasym) > 0);
xe->XE.Heap.datasymoff = 0;
- xe->XE.Heap.datasym[0] = 0;
+ xe->XE.Heap.datasym = NULL;
tl_assert(!xe->XE.Heap.descr1);
tl_assert(!xe->XE.Heap.descr2);
@@ -671,7 +670,6 @@
= VG_(newXA)( VG_(malloc), "pc.update_extra.Heap.descr1",
VG_(free), sizeof(HChar) );
- VG_(memset)(&xe->XE.Heap.datasym, 0, sizeof(xe->XE.Heap.datasym));
xe->XE.Heap.datasymoff = 0;
have_descr
@@ -699,13 +697,13 @@
/* If Dwarf3 info produced nothing useful, see at least if
we can fish something useful out of the ELF symbol info. */
if (!have_descr) {
+ HChar *name;
if (VG_(get_datasym_and_offset)(
- xe->XE.Heap.addr, &xe->XE.Heap.datasym[0],
- sizeof(xe->XE.Heap.datasym)-1,
+ xe->XE.Heap.addr, &name,
&xe->XE.Heap.datasymoff )
) {
- tl_assert(xe->XE.Heap.datasym[sizeof(xe->XE.Heap.datasym)-1]
- == 0);
+ xe->XE.Heap.datasym =
+ VG_(strdup)("pc.update_extra.Heap.datasym", name);
}
}
break;
Modified: branches/BUF_REMOVAL/exp-sgcheck/sg_main.c
==============================================================================
--- branches/BUF_REMOVAL/exp-sgcheck/sg_main.c (original)
+++ branches/BUF_REMOVAL/exp-sgcheck/sg_main.c Tue Jul 29 09:14:32 2014
@@ -1925,10 +1925,10 @@
if (0)
{ Word d = callee->depth;
- HChar fnname[80];
+ HChar *fnname;
Bool ok;
Addr ip = ip_post_call_insn;
- ok = VG_(get_fnname_w_offset)( ip, fnname, sizeof(fnname) );
+ ok = VG_(get_fnname_w_offset)( ip, &fnname );
while (d > 0) {
VG_(printf)(" ");
d--;
Modified: branches/BUF_REMOVAL/include/pub_tool_addrinfo.h
==============================================================================
--- branches/BUF_REMOVAL/include/pub_tool_addrinfo.h (original)
+++ branches/BUF_REMOVAL/include/pub_tool_addrinfo.h Tue Jul 29 09:14:32 2014
@@ -137,10 +137,10 @@
ExeContext* freed_at; // might be null_ExeContext.
} Block;
- // In a global .data symbol. This holds the first 127 chars of
+ // In a global .data symbol. This holds
// the variable's name (zero terminated), plus a (memory) offset.
struct {
- HChar name[128];
+ HChar *name;
PtrdiffT offset;
} DataSym;
Modified: branches/BUF_REMOVAL/include/pub_tool_debuginfo.h
==============================================================================
--- branches/BUF_REMOVAL/include/pub_tool_debuginfo.h (original)
+++ branches/BUF_REMOVAL/include/pub_tool_debuginfo.h Tue Jul 29 09:14:32 2014
@@ -40,14 +40,14 @@
/* Get the file/function/line number of the instruction at address
'a'. For these four, if debug info for the address is found, it
copies the info into the buffer/UInt and returns True. If not, it
- returns False and nothing is copied. VG_(get_fnname) always
+ returns False. VG_(get_fnname) always
demangles C++ function names. VG_(get_fnname_w_offset) is the
same, except it appends "+N" to symbol names to indicate offsets. */
extern Bool VG_(get_filename) ( Addr a, HChar* filename, Int n_filename );
-extern Bool VG_(get_fnname) ( Addr a, HChar* fnname, Int n_fnname );
+extern Bool VG_(get_fnname) ( Addr a, HChar** fnname );
extern Bool VG_(get_linenum) ( Addr a, UInt* linenum );
extern Bool VG_(get_fnname_w_offset)
- ( Addr a, HChar* fnname, Int n_fnname );
+ ( Addr a, HChar** fnname );
/* This one is the most general. It gives filename, line number and
optionally directory name. filename and linenum may not be NULL.
@@ -74,7 +74,7 @@
a particular function. Nb: if an executable/shared object is stripped
of its symbols, this function will not be able to recognise function
entry points within it. */
-extern Bool VG_(get_fnname_if_entry) ( Addr a, HChar* fnname, Int n_fnname );
+extern Bool VG_(get_fnname_if_entry) ( Addr a, HChar** fnname );
typedef
enum {
@@ -94,7 +94,7 @@
which is guaranteed to be zero terminated. Also data_addr's offset
from the symbol start is put into *offset. */
extern Bool VG_(get_datasym_and_offset)( Addr data_addr,
- /*OUT*/HChar* dname, Int n_dname,
+ /*OUT*/HChar** dname,
/*OUT*/PtrdiffT* offset );
/* Try to form some description of DATA_ADDR by looking at the DWARF3
@@ -118,7 +118,7 @@
/* Succeeds if the address is within a shared object or the main executable.
It doesn't matter if debug info is present or not. */
-extern Bool VG_(get_objname) ( Addr a, HChar* objname, Int n_objname );
+extern Bool VG_(get_objname) ( Addr a, HChar** objname );
/* Cursor allowing to describe inlined function calls at an IP,
Modified: branches/BUF_REMOVAL/lackey/lk_main.c
==============================================================================
--- branches/BUF_REMOVAL/lackey/lk_main.c (original)
+++ branches/BUF_REMOVAL/lackey/lk_main.c Tue Jul 29 09:14:32 2014
@@ -654,7 +654,6 @@
IRDirty* di;
Int i;
IRSB* sbOut;
- HChar fnname[100];
IRTypeEnv* tyenv = sbIn->tyenv;
Addr iaddr = 0, dst;
UInt ilen = 0;
@@ -744,8 +743,9 @@
*/
tl_assert(clo_fnname);
tl_assert(clo_fnname[0]);
+ HChar *fnname;
if (VG_(get_fnname_if_entry)(st->Ist.IMark.addr,
- fnname, sizeof(fnname))
+ &fnname)
&& 0 == VG_(strcmp)(fnname, clo_fnname)) {
di = unsafeIRDirty_0_N(
0, "add_one_func_call",
Modified: branches/BUF_REMOVAL/massif/ms_main.c
==============================================================================
--- branches/BUF_REMOVAL/massif/ms_main.c (original)
+++ branches/BUF_REMOVAL/massif/ms_main.c Tue Jul 29 09:14:32 2014
@@ -817,9 +817,9 @@
// Determine if the given IP belongs to a function that should be ignored.
static Bool fn_should_be_ignored(Addr ip)
{
- static HChar buf[BUF_LEN];
+ HChar *buf;
return
- ( VG_(get_fnname)(ip, buf, BUF_LEN) && is_member_fn(ignore_fns, buf)
+ ( VG_(get_fnname)(ip, &buf) && is_member_fn(ignore_fns, buf)
? True : False );
}
@@ -832,7 +832,6 @@
static
Int get_IPs( ThreadId tid, Bool exclude_first_entry, Addr ips[])
{
- static HChar buf[BUF_LEN];
Int n_ips, i, n_alloc_fns_removed;
Int overestimate;
Bool redo;
@@ -871,7 +870,8 @@
// because VG_(get_fnname) is expensive.
n_alloc_fns_removed = ( exclude_first_entry ? 1 : 0 );
for (i = n_alloc_fns_removed; i < n_ips; i++) {
- if (VG_(get_fnname)(ips[i], buf, BUF_LEN)) {
+ HChar *buf;
+ if (VG_(get_fnname)(ips[i], &buf)) {
if (is_member_fn(alloc_fns, buf)) {
n_alloc_fns_removed++;
} else {
|
|
From: <sv...@va...> - 2014-07-29 08:46:24
|
Author: florian
Date: Tue Jul 29 08:46:15 2014
New Revision: 14201
Log:
Back out r14186 as it was identified to have caused a performance regression.
Modified:
trunk/coregrind/m_debuginfo/debuginfo.c
trunk/coregrind/m_libcbase.c
Modified: trunk/coregrind/m_debuginfo/debuginfo.c
==============================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c (original)
+++ trunk/coregrind/m_debuginfo/debuginfo.c Tue Jul 29 08:46:15 2014
@@ -1870,6 +1870,7 @@
&& di->text_avma <= a
&& a < di->text_avma + di->text_size) {
VG_(strncpy_safely)(buf, di->fsm.filename, nbuf);
+ buf[nbuf-1] = 0;
return True;
}
}
Modified: trunk/coregrind/m_libcbase.c
==============================================================================
--- trunk/coregrind/m_libcbase.c (original)
+++ trunk/coregrind/m_libcbase.c Tue Jul 29 08:46:15 2014
@@ -304,8 +304,14 @@
{
libcbase_assert(ndest > 0);
- VG_(strncpy)(dest, src, ndest);
- dest[ndest - 1] = '\0';
+ SizeT i = 0;
+ while (True) {
+ dest[i] = 0;
+ if (src[i] == 0) return;
+ if (i >= ndest-1) return;
+ dest[i] = src[i];
+ i++;
+ }
}
HChar* VG_(strncpy) ( HChar* dest, const HChar* src, SizeT ndest )
|
|
From: Rich C. <rc...@wi...> - 2014-07-29 05:15:02
|
valgrind revision: 14200
VEX revision: 2910
C compiler: gcc (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388]
GDB: GNU gdb (GDB; openSUSE Factory) 7.6.50.20130731-cvs
Assembler: GNU assembler (GNU Binutils; openSUSE Factory) 2.23.2
C library: GNU C Library (GNU libc) stable release version 2.18 (git )
uname -mrs: Linux 3.11.4-3-desktop x86_64
Vendor version: Welcome to openSUSE 13.1 "Bottle" Beta 1 - Kernel %r (%t).
Nightly build on rodan ( Linux 3.11.4-3-desktop x86_64 )
Started at 2014-07-28 19:22:01 CDT
Ended at 2014-07-29 00:14:50 CDT
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 607 tests, 5 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/err_disable3 (stderr)
memcheck/tests/err_disable4 (stderr)
memcheck/tests/threadname (stderr)
memcheck/tests/threadname_xml (stderr)
exp-sgcheck/tests/hackedbz2 (stderr)
--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old
+ perl perf/vg_perf --tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old perf
-- Running tests in perf ----------------------------------------------
-- bigcode1 --
bigcode1 valgrind-new:0.48s no: 7.8s (16.4x, -----) me:15.1s (31.4x, -----) ca:61.3s (127.7x, -----) he: 8.9s (18.5x, -----) ca:25.6s (53.4x, -----) dr: 8.7s (18.2x, -----) ma: 9.1s (18.9x, -----)
bigcode1 valgrind-old:0.48s no: 7.8s (16.4x, 0.0%) me:15.1s (31.4x, 0.0%) ca:61.3s (127.7x, 0.0%) he: 8.9s (18.6x, -0.1%) ca:25.6s (53.4x, 0.0%) dr: 8.7s (18.2x, 0.0%) ma: 9.1s (18.9x, 0.0%)
-- bigcode2 --
bigcode2 valgrind-new:0.49s no:18.8s (38.3x, -----) me:38.6s (78.8x, -----) ca:106.7s (217.8x, -----) he:22.3s (45.4x, -----) ca:41.0s (83.7x, -----) dr:21.3s (43.4x, -----) ma:21.4s (43.7x, -----)
bigcode2 valgrind-old:0.49s no:18.8s (38.3x, 0.1%) me:38.6s (78.7x, 0.1%) ca:107.0s (218.3x, -0.2%) he:22.3s (45.5x, -0.1%) ca:41.0s (83.8x, -0.0%) dr:21.3s (43.4x, 0.0%) ma:21.4s (43.6x, 0.0%)
-- bz2 --
bz2 valgrind-new:2.32s no:10.2s ( 4.4x, -----) me:27.3s (11.8x, -----) ca:58.2s (25.1x, -----) he:39.4s (17.0x, -----) ca:76.1s (32.8x, -----) dr:56.0s (24.2x, -----) ma: 9.8s ( 4.2x, -----)
bz2 valgrind-old:2.32s no:10.2s ( 4.4x, 0.0%) me:27.3s (11.8x, 0.0%) ca:58.5s (25.2x, -0.5%) he:39.4s (17.0x, 0.0%) ca:76.1s (32.8x, -0.0%) dr:56.0s (24.2x, 0.0%) ma: 9.8s ( 4.2x, -0.2%)
-- fbench --
fbench valgrind-new:1.44s no: 5.4s ( 3.8x, -----) me:17.8s (12.4x, -----) ca:27.4s (19.0x, -----) he:13.1s ( 9.1x, -----) ca:21.7s (15.1x, -----) dr:13.0s ( 9.0x, -----) ma: 5.6s ( 3.9x, -----)
fbench valgrind-old:1.44s no: 5.4s ( 3.8x, 0.0%) me:17.8s (12.4x, -0.1%) ca:27.4s (19.0x, 0.0%) he:13.1s ( 9.1x, 0.0%) ca:21.7s (15.1x, -0.0%) dr:13.0s ( 9.0x, 0.0%) ma: 5.6s ( 3.9x, 0.0%)
-- ffbench --
ffbench valgrind-new:1.00s no: 3.7s ( 3.7x, -----) me:12.1s (12.1x, -----) ca: 8.2s ( 8.2x, -----) he:21.5s (21.5x, -----) ca:27.6s (27.6x, -----) dr:16.6s (16.6x, -----) ma: 3.7s ( 3.7x, -----)
ffbench valgrind-old:1.00s no: 3.7s ( 3.7x, 0.0%) me:12.1s (12.1x, 0.0%) ca: 8.3s ( 8.3x, -0.1%) he:21.5s (21.5x, -0.0%) ca:27.6s (27.6x, 0.0%) dr:16.6s (16.6x, 0.1%) ma: 3.7s ( 3.7x, 0.0%)
-- heap --
heap valgrind-new:0.40s no: 3.3s ( 8.3x, -----) me:22.0s (54.9x, -----) ca:31.3s (78.2x, -----) he:30.8s (77.0x, -----) ca:22.9s (57.1x, -----) dr:20.7s (51.6x, -----) ma:38.3s (95.8x, -----)
heap valgrind-old:0.40s no: 3.3s ( 8.3x, -0.3%) me:22.0s (54.9x, 0.0%) ca:31.2s (78.1x, 0.1%) he:30.8s (77.0x, 0.0%) ca:22.9s (57.2x, -0.0%) dr:20.7s (51.7x, -0.1%) ma:38.3s (95.7x, 0.1%)
-- heap_pdb4 --
heap_pdb4 valgrind-new:0.55s no: 3.7s ( 6.7x, -----) me:41.5s (75.5x, -----) ca:34.1s (61.9x, -----) he:35.9s (65.3x, -----) ca:25.0s (45.5x, -----) dr:23.2s (42.2x, -----) ma:39.9s (72.5x, -----)
heap_pdb4 valgrind-old:0.55s no: 3.7s ( 6.7x, 0.3%) me:41.5s (75.4x, 0.1%) ca:34.1s (61.9x, 0.0%) he:35.9s (65.3x, -0.1%) ca:25.0s (45.5x, -0.0%) dr:23.2s (42.2x, 0.0%) ma:39.9s (72.5x, 0.0%)
-- many-loss-records --
many-loss-records valgrind-new:0.05s no: 1.3s (25.2x, -----) me: 5.8s (116.8x, -----) ca: 5.2s (104.6x, -----) he: 5.3s (105.4x, -----) ca: 4.2s (83.8x, -----) dr: 4.7s (94.6x, -----) ma: 6.9s (138.4x, -----)
many-loss-records valgrind-old:0.05s no: 1.2s (25.0x, 0.8%) me: 5.8s (116.6x, 0.2%) ca: 5.2s (104.6x, 0.0%) he: 5.3s (105.4x, -0.0%) ca: 4.2s (84.0x, -0.2%) dr: 4.7s (94.6x, 0.0%) ma: 6.9s (138.6x, -0.1%)
-- many-xpts --
many-xpts valgrind-new:0.16s no: 1.5s ( 9.6x, -----) me: 7.0s (43.9x, -----) ca:13.1s (81.6x, -----) he: 9.9s (62.0x, -----) ca: 6.0s (37.2x, -----) dr: 6.3s (39.3x, -----) ma: 9.9s (61.8x, -----)
many-xpts valgrind-old:0.16s no: 1.5s ( 9.5x, 0.7%) me: 7.0s (44.0x, -0.3%) ca:13.1s (81.6x, 0.0%) he: 9.9s (62.0x, 0.0%) ca: 6.0s (37.2x, 0.2%) dr: 6.3s (39.3x, 0.0%) ma: 9.9s (61.9x, -0.1%)
-- sarp --
sarp valgrind-new:0.10s no: 1.5s (14.7x, -----) me: 9.4s (94.1x, -----) ca: 8.5s (85.2x, -----) he:31.0s (310.4x, -----) ca: 5.7s (56.5x, -----) dr: 4.1s (40.9x, -----) ma: 1.5s (15.4x, -----)
sarp valgrind-old:0.10s no: 1.5s (14.8x, -0.7%) me: 9.4s (94.1x, 0.0%) ca: 8.5s (85.2x, 0.0%) he:31.1s (310.8x, -0.1%) ca: 5.7s (56.5x, 0.0%) dr: 4.1s (40.9x, 0.0%) ma: 1.6s (15.5x, -0.6%)
-- tinycc --
tinycc valgrind-new:0.76s no: 7.6s (10.0x, -----) me:37.3s (49.1x, -----) ca:48.1s (63.3x, -----) he:45.6s (60.0x, -----) ca:45.3s (59.7x, -----) dr:38.0s (50.0x, -----) ma:14.2s (18.7x, -----)
tinycc valgrind-old:0.76s no: 7.6s (10.0x, -0.1%) me:37.2s (49.0x, 0.1%) ca:48.1s (63.3x, 0.0%) he:45.6s (60.0x, 0.0%) ca:45.3s (59.6x, 0.1%) dr:38.0s (50.0x, -0.0%) ma:14.2s (18.7x, 0.0%)
-- Finished tests in perf ----------------------------------------------
== 11 programs, 154 timings =================
real 166m33.608s
user 164m27.617s
sys 1m45.470s
=================================================
./valgrind-new/exp-sgcheck/tests/hackedbz2.stderr.diff-glibc28-amd64
=================================================
--- hackedbz2.stderr.exp-glibc28-amd64 2014-07-28 20:27:00.454787117 -0500
+++ hackedbz2.stderr.out 2014-07-28 21:27:04.998574264 -0500
@@ -1,7 +1,6 @@
Invalid read of size 1
- at 0x........: vex_strlen (hackedbz2.c:1006)
- by 0x........: add_to_myprintf_buf (hackedbz2.c:1284)
+ at 0x........: add_to_myprintf_buf (hackedbz2.c:1006)
by 0x........: vex_printf (hackedbz2.c:1155)
by 0x........: BZ2_compressBlock (hackedbz2.c:4039)
by 0x........: handle_compress (hackedbz2.c:4761)
=================================================
./valgrind-new/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2014-07-28 20:26:22.853369425 -0500
+++ err_disable3.stderr.out 2014-07-28 20:47:58.280729161 -0500
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-new/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2014-07-28 20:26:00.782124328 -0500
+++ err_disable4.stderr.out 2014-07-28 20:48:02.404774775 -0500
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:41)
- by 0x........: child_fn_2 (err_disable4.c:55)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:68)
=================================================
./valgrind-new/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2014-07-28 20:26:00.868125283 -0500
+++ threadname.stderr.out 2014-07-28 20:54:09.069830870 -0500
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:53)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:53)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:38)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:38)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:26)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:26)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-new/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2014-07-28 20:26:22.849369381 -0500
+++ threadname_xml.stderr.out 2014-07-28 20:54:11.121853573 -0500
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
=================================================
./valgrind-old/exp-sgcheck/tests/hackedbz2.stderr.diff-glibc28-amd64
=================================================
--- hackedbz2.stderr.exp-glibc28-amd64 2014-07-28 19:22:47.892848661 -0500
+++ hackedbz2.stderr.out 2014-07-28 20:21:59.369442904 -0500
@@ -1,7 +1,6 @@
Invalid read of size 1
- at 0x........: vex_strlen (hackedbz2.c:1006)
- by 0x........: add_to_myprintf_buf (hackedbz2.c:1284)
+ at 0x........: add_to_myprintf_buf (hackedbz2.c:1006)
by 0x........: vex_printf (hackedbz2.c:1155)
by 0x........: BZ2_compressBlock (hackedbz2.c:4039)
by 0x........: handle_compress (hackedbz2.c:4761)
=================================================
./valgrind-old/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2014-07-28 19:23:23.770248527 -0500
+++ err_disable3.stderr.out 2014-07-28 19:42:47.697208387 -0500
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-old/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2014-07-28 19:23:30.142319545 -0500
+++ err_disable4.stderr.out 2014-07-28 19:42:52.012256270 -0500
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:41)
- by 0x........: child_fn_2 (err_disable4.c:55)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:68)
=================================================
./valgrind-old/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2014-07-28 19:23:19.410199934 -0500
+++ threadname.stderr.out 2014-07-28 19:49:02.051385252 -0500
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:53)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:53)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:38)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:38)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:26)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:26)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-old/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2014-07-28 19:23:19.505200992 -0500
+++ threadname_xml.stderr.out 2014-07-28 19:49:04.109408298 -0500
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
|
|
From: Christian B. <bor...@de...> - 2014-07-29 04:17:58
|
valgrind revision: 14200 VEX revision: 2910 C compiler: gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973] GDB: GNU gdb (GDB) SUSE (7.5.1-0.7.29) Assembler: GNU assembler (GNU Binutils; SUSE Linux Enterprise 11) 2.23.1 C library: GNU C Library stable release version 2.11.3 (20110527) uname -mrs: Linux 3.0.101-0.31-default s390x Vendor version: Welcome to SUSE Linux Enterprise Server 11 SP3 (s390x) - Kernel %r (%t). Nightly build on sless390 ( SUSE Linux Enterprise Server 11 SP3 gcc 4.3.4 on z196 (s390x) ) Started at 2014-07-29 03:45:01 CEST Ended at 2014-07-29 06:17:46 CEST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 657 tests, 3 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/origin5-bz2 (stderr) helgrind/tests/pth_cond_destroy_busy (stderr) helgrind/tests/tc20_verifywrap (stderr) --tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old -- Running tests in perf ---------------------------------------------- -- bigcode1 -- bigcode1 valgrind-new:0.23s no: 4.9s (21.2x, -----) me: 6.2s (27.1x, -----) ca:26.6s (115.5x, -----) he: 5.5s (23.9x, -----) ca: 9.2s (40.0x, -----) dr: 4.8s (20.9x, -----) ma: 3.9s (17.1x, -----) bigcode1 valgrind-old:0.23s no: 4.9s (21.1x, 0.2%) me: 6.2s (27.1x, 0.0%) ca:26.6s (115.4x, 0.1%) he: 5.5s (23.9x, 0.0%) ca: 9.2s (40.0x, 0.0%) dr: 4.8s (20.9x, 0.0%) ma: 3.9s (17.1x, 0.0%) -- bigcode2 -- bigcode2 valgrind-new:0.25s no: 7.8s (31.3x, -----) me:13.4s (53.5x, -----) ca:39.4s (157.6x, -----) he:10.6s (42.3x, -----) ca:14.3s (57.1x, -----) dr: 9.1s (36.4x, -----) ma: 7.5s (29.8x, -----) bigcode2 valgrind-old:0.25s no: 7.9s (31.6x, -0.8%) me:13.3s (53.3x, 0.3%) ca:39.6s (158.5x, -0.6%) he:10.6s (42.4x, -0.4%) ca:14.3s (57.3x, -0.4%) dr: 9.0s (36.0x, 1.2%) ma: 7.4s (29.5x, 0.9%) -- bz2 -- bz2 valgrind-new:0.70s no: 6.7s ( 9.5x, -----) me:12.7s (18.1x, -----) ca:30.9s (44.1x, -----) he:19.8s (28.3x, -----) ca:34.6s (49.5x, -----) dr:28.9s (41.3x, -----) ma: 4.2s ( 6.0x, -----) bz2 valgrind-old:0.70s no: 6.7s ( 9.5x, 0.0%) me:12.7s (18.1x, 0.1%) ca:30.8s (44.0x, 0.2%) he:19.8s (28.3x, 0.2%) ca:34.6s (49.5x, 0.0%) dr:29.0s (41.4x, -0.1%) ma: 4.2s ( 5.9x, 0.2%) -- fbench -- fbench valgrind-new:0.41s no: 1.6s ( 3.9x, -----) me: 4.3s (10.5x, -----) ca: 9.5s (23.1x, -----) he: 6.3s (15.4x, -----) ca: 7.3s (17.9x, -----) dr: 5.5s (13.5x, -----) ma: 1.7s ( 4.1x, -----) fbench valgrind-old:0.41s no: 1.6s ( 3.9x, -0.0%) me: 4.3s (10.5x, 0.2%) ca: 9.4s (23.0x, 0.1%) he: 6.3s (15.4x, 0.5%) ca: 7.3s (17.9x, 0.0%) dr: 5.5s (13.5x, 0.2%) ma: 1.7s ( 4.1x, 0.0%) -- ffbench -- ffbench valgrind-new:0.19s no: 1.2s ( 6.3x, -----) me: 3.0s (15.9x, -----) ca: 3.2s (16.7x, -----) he:45.4s (238.8x, -----) ca: 9.8s (51.3x, -----) dr: 6.9s (36.5x, -----) ma: 1.0s ( 5.2x, -----) ffbench valgrind-old:0.19s no: 1.2s ( 6.2x, 1.7%) me: 3.0s (15.6x, 1.7%) ca: 3.1s (16.6x, 0.6%) he:45.4s (238.9x, -0.0%) ca: 9.7s (51.2x, 0.2%) dr: 7.0s (36.6x, -0.1%) ma: 1.0s ( 5.1x, 1.0%) -- heap -- heap valgrind-new:0.23s no: 2.4s (10.3x, -----) me: 8.8s (38.3x, -----) ca:13.3s (57.8x, -----) he:12.8s (55.6x, -----) ca:11.4s (49.7x, -----) dr: 7.5s (32.7x, -----) ma:29.8s (129.5x, -----) heap valgrind-old:0.23s no: 2.4s (10.2x, 1.3%) me: 8.8s (38.3x, 0.1%) ca:13.3s (58.0x, -0.2%) he:12.8s (55.4x, 0.2%) ca:11.4s (49.7x, 0.1%) dr: 7.7s (33.3x, -1.9%) ma:29.7s (129.3x, 0.2%) -- heap_pdb4 -- heap_pdb4 valgrind-new:0.22s no: 2.7s (12.1x, -----) me:12.9s (58.5x, -----) ca:14.3s (65.1x, -----) he:14.1s (64.0x, -----) ca:12.5s (56.7x, -----) dr: 8.5s (38.5x, -----) ma:29.7s (134.9x, -----) heap_pdb4 valgrind-old:0.22s no: 2.6s (11.7x, 3.4%) me:12.8s (58.4x, 0.3%) ca:14.4s (65.3x, -0.2%) he:14.1s (64.0x, -0.1%) ca:12.5s (56.7x, 0.0%) dr: 8.7s (39.3x, -2.2%) ma:29.7s (135.0x, -0.1%) -- many-loss-records -- many-loss-records valgrind-new:0.03s no: 0.5s (18.0x, -----) me: 2.2s (72.0x, -----) ca: 2.0s (68.3x, -----) he: 2.2s (72.0x, -----) ca: 2.0s (66.7x, -----) dr: 1.7s (55.7x, -----) ma: 5.1s (170.3x, -----) many-loss-records valgrind-old:0.03s no: 0.5s (18.0x, 0.0%) me: 2.1s (71.0x, 1.4%) ca: 2.0s (68.3x, 0.0%) he: 2.2s (72.0x, 0.0%) ca: 2.0s (67.0x, -0.5%) dr: 1.7s (55.7x, 0.0%) ma: 5.1s (169.3x, 0.6%) -- many-xpts -- many-xpts valgrind-new:0.07s no: 0.7s ( 9.9x, -----) me: 3.2s (45.4x, -----) ca:377.7s (5395.3x, -----) he: 6.6s (94.3x, -----) ca: 2.9s (41.1x, -----) dr: 2.4s (34.9x, -----) ma: 6.0s (86.3x, -----) many-xpts valgrind-old:0.07s no: 0.7s ( 9.7x, 1.4%) me: 3.2s (45.1x, 0.6%) ca:375.8s (5368.1x, 0.5%) he: 6.6s (94.4x, -0.2%) ca: 2.9s (41.3x, -0.3%) dr: 2.4s (34.9x, 0.0%) ma: 6.0s (85.7x, 0.7%) -- sarp -- sarp valgrind-new:0.03s no: 0.6s (20.7x, -----) me: 3.5s (115.7x, -----) ca: 3.3s (109.3x, -----) he:17.6s (585.3x, -----) ca: 2.1s (70.3x, -----) dr: 1.3s (44.7x, -----) ma: 0.5s (16.3x, -----) sarp valgrind-old:0.03s no: 0.6s (20.3x, 1.6%) me: 3.5s (115.7x, -0.0%) ca: 3.3s (110.3x, -0.9%) he:17.5s (583.7x, 0.3%) ca: 2.1s (70.0x, 0.5%) dr: 1.3s (44.7x, 0.0%) ma: 0.5s (16.3x, 0.0%) -- tinycc -- tinycc valgrind-new:0.22s no: 3.2s (14.5x, -----) me:14.6s (66.4x, -----) ca:30.2s (137.5x, -----) he:28.3s (128.8x, -----) ca:21.5s (97.8x, -----) dr:20.4s (92.9x, -----) ma: 7.3s (33.0x, -----) tinycc valgrind-old:0.22s no: 3.2s (14.4x, 0.9%) me:14.6s (66.1x, 0.4%) ca:30.4s (138.0x, -0.4%) he:28.1s (127.7x, 0.8%) ca:21.6s (98.0x, -0.2%) dr:20.4s (92.9x, 0.0%) ma: 7.3s (33.0x, -0.1%) -- Finished tests in perf ---------------------------------------------- == 11 programs, 154 timings ================= real 119m41.947s user 118m37.574s sys 0m55.509s |
|
From: Tom H. <to...@co...> - 2014-07-29 03:23:44
|
valgrind revision: 14200
VEX revision: 2910
C compiler: gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
GDB:
Assembler: GNU assembler version 2.18.50.0.6-2 20080403
C library: GNU C Library stable release version 2.8
uname -mrs: Linux 3.15.3-200.fc20.x86_64 x86_64
Vendor version: Fedora release 9 (Sulphur)
Nightly build on bristol ( )
Started at 2014-07-29 03:51:18 BST
Ended at 2014-07-29 04:23:17 BST
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 660 tests, 1 stderr failure, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/amd64/insn-pcmpistri (stderr)
none/tests/amd64/sse4-64 (stdout)
--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old
-- Running tests in perf ----------------------------------------------
-- bigcode1 --
*** Command returned non-zero (32512)
*** See perf.{cmd,stdout,stderr} to determine what went wrong.
real 0m0.013s
user 0m0.007s
sys 0m0.002s
|
|
From: Tom H. <to...@co...> - 2014-07-29 02:48:18
|
valgrind revision: 14200
VEX revision: 2910
C compiler: gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2)
GDB: GNU gdb (GDB) Fedora (7.3.1-48.fc15)
Assembler: GNU assembler version 2.21.51.0.6-6.fc15 20110118
C library: GNU C Library stable release version 2.14.1
uname -mrs: Linux 3.15.3-200.fc20.x86_64 x86_64
Vendor version: Fedora release 15 (Lovelock)
Nightly build on bristol ( )
Started at 2014-07-29 03:12:41 BST
Ended at 2014-07-29 03:48:08 BST
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... done
Regression test results follow
== 692 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old
-- Running tests in perf ----------------------------------------------
-- bigcode1 --
*** Command returned non-zero (32512)
*** See perf.{cmd,stdout,stderr} to determine what went wrong.
real 0m0.013s
user 0m0.005s
sys 0m0.005s
|