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
(24) |
3
(22) |
4
(16) |
5
(32) |
6
(19) |
7
(22) |
8
(30) |
|
9
(21) |
10
(21) |
11
(20) |
12
(13) |
13
(24) |
14
(23) |
15
(13) |
|
16
(11) |
17
(6) |
18
(12) |
19
(17) |
20
(26) |
21
(25) |
22
(37) |
|
23
(32) |
24
(21) |
25
(30) |
26
(22) |
27
(24) |
28
(19) |
29
(9) |
|
30
(5) |
31
(6) |
|
|
|
|
|
|
From: <sv...@va...> - 2011-10-22 23:22:44
|
Author: florian
Date: 2011-10-23 00:18:00 +0100 (Sun, 23 Oct 2011)
New Revision: 2224
Log:
Fix the guest state definition for s390x and introduce dummy members
in places where 8-byte alignment is needed.
We need to make sure that libvex_guest_offsets.h contains correct
offsets even when genoffsets.c is compiled for a 32-bit target.
With this change a tarball built on x86 will result in a working
valgrind on s390x.
Modified:
trunk/pub/libvex_guest_s390x.h
Modified: trunk/pub/libvex_guest_s390x.h
===================================================================
--- trunk/pub/libvex_guest_s390x.h 2011-10-22 09:32:16 UTC (rev 2223)
+++ trunk/pub/libvex_guest_s390x.h 2011-10-22 23:18:00 UTC (rev 2224)
@@ -109,7 +109,7 @@
/* 320 */ ULong guest_counter;
/* 328 */ UInt guest_fpc;
- /* 4-byte hole to enforce alignment requirements */
+ /* 332 */ UChar unused[4]; /* 4-byte hole to get 8-byte alignment */
/* 336 */ ULong guest_IA;
/*------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2011-10-22 20:42:53
|
Author: sewardj
Date: 2011-10-22 21:38:08 +0100 (Sat, 22 Oct 2011)
New Revision: 12204
Log:
Make vgdb.c work on Android, so that the GDB server as a whole
will work on Android. Fixes #283600.
(Philippe Waroquiers, phi...@sk...)
Modified:
trunk/coregrind/m_options.c
trunk/coregrind/vgdb.c
trunk/docs/xml/manual-core-adv.xml
Modified: trunk/coregrind/m_options.c
===================================================================
--- trunk/coregrind/m_options.c 2011-10-22 20:23:30 UTC (rev 12203)
+++ trunk/coregrind/m_options.c 2011-10-22 20:38:08 UTC (rev 12204)
@@ -47,11 +47,7 @@
Bool VG_(clo_error_limit) = True;
Int VG_(clo_error_exitcode) = 0;
-#if defined(VGPV_arm_linux_android)
-VgVgdb VG_(clo_vgdb) = Vg_VgdbNo; // currently disabled on Android
-#else
VgVgdb VG_(clo_vgdb) = Vg_VgdbYes;
-#endif
Int VG_(clo_vgdb_poll) = 5000;
Int VG_(clo_vgdb_error) = 999999999;
HChar* VG_(clo_vgdb_prefix) = NULL;
Modified: trunk/coregrind/vgdb.c
===================================================================
--- trunk/coregrind/vgdb.c 2011-10-22 20:23:30 UTC (rev 12203)
+++ trunk/coregrind/vgdb.c 2011-10-22 20:38:08 UTC (rev 12204)
@@ -26,21 +26,6 @@
The GNU General Public License is contained in the file COPYING.
*/
-/* Too difficult to make this work on Android right now. Let's
- skip for the time being at least. */
-#if defined(VGPV_arm_linux_android)
-
-#include <stdio.h>
-int main (int argc, char** argv)
-{
- fprintf(stderr,
- "%s: is not currently available on Android, sorry.\n",
- argv[0]);
- return 0;
-}
-
-#else /* all other (Linux?) platforms */
-
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_libcsetjmp.h"
@@ -61,17 +46,14 @@
#include <sys/time.h>
#include <errno.h>
#include <signal.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
#include <sys/mman.h>
#include <sys/ptrace.h>
#include <sys/wait.h>
#include <assert.h>
-#include <sys/user.h>
-
-#if defined(VGO_linux)
-# include <sys/prctl.h>
-# include <linux/ptrace.h>
-#endif
-
/* vgdb has two usages:
1. relay application between gdb and the gdbserver embedded in valgrind.
2. standalone to send monitor commands to a running valgrind-ified process
@@ -111,6 +93,19 @@
#undef PTRACEINVOKER
#endif
+#if defined(VGPV_arm_linux_android)
+#undef PTRACEINVOKER
+#endif
+
+#if defined(PTRACEINVOKER)
+#include <sys/user.h>
+#if defined(VGO_linux)
+# include <sys/prctl.h>
+# include <linux/ptrace.h>
+#endif
+#endif
+
+
// Outputs information for the user about ptrace_scope protection
// or ptrace not working.
static void ptrace_restrictions_msg(void);
@@ -1194,11 +1189,8 @@
if (usecs == 0 || usecs > 1000 * 1000)
usecs = 1000 * 1000;
}
- if (usleep(usecs) != 0) {
- if (errno == EINTR)
- continue;
- XERROR (errno, "error usleep\n");
- }
+ usleep(usecs);
+
/* If nothing happened during our sleep, let's try to wake up valgrind
or check for cmd time out. */
if (written_by_vgdb_before_sleep == VS_written_by_vgdb
@@ -1272,7 +1264,12 @@
static
void acquire_lock (int fd, int valgrind_pid)
{
- if (lockf(fd, F_TLOCK, 1) < 0) {
+ struct flock fl;
+ fl.l_type = F_WRLCK;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 1;
+ if (fcntl(fd, F_SETLK, &fl) < 0) {
if (errno == EAGAIN || errno == EACCES) {
XERROR(errno,
"Cannot acquire lock.\n"
@@ -1359,7 +1356,7 @@
static char *shared_mem;
-static const int from_gdb = 0;
+static int from_gdb = 0; /* stdin by default, changed if --port is given. */
static char *from_gdb_to_pid; /* fifo name to write gdb command to pid */
/* Returns True in case read/write operations were done properly.
Returns False in case of error.
@@ -1383,7 +1380,7 @@
return write_buf(to_pid, buf, nrread, "to_pid", /* notify */ True);
}
-static const int to_gdb = 1;
+static int to_gdb = 1; /* stdout by default, changed if --port is given. */
static char *to_gdb_from_pid; /* fifo name to read pid replies */
/* Returns True in case read/write operations were done properly.
Returns False in case of error.
@@ -1407,6 +1404,44 @@
return write_buf(to_gdb, buf, nrread, "to_gdb", /* notify */ False);
}
+static
+void wait_for_gdb_connect (int in_port)
+{
+ struct sockaddr_in addr;
+
+ int listen_gdb = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
+ int gdb_connect;
+
+ if (-1 == listen_gdb) {
+ XERROR(errno, "cannot create socket");
+ }
+
+ memset(&addr, 0, sizeof(addr));
+
+ addr.sin_family = AF_INET;
+ addr.sin_port = htons((unsigned short int)in_port);
+ addr.sin_addr.s_addr = INADDR_ANY;
+
+ if (-1 == bind(listen_gdb,(struct sockaddr *)&addr, sizeof(addr))) {
+ XERROR(errno, "bind failed");
+ }
+ fprintf(stderr, "listening on port %d ...", in_port);
+ fflush(stderr);
+ if (-1 == listen(listen_gdb, 1)) {
+ XERROR(errno, "error listen failed");
+ }
+
+ gdb_connect = accept(listen_gdb, NULL, NULL);
+ if (gdb_connect < 0) {
+ XERROR(errno, "accept failed");
+ }
+ fprintf(stderr, "connected.\n");
+ fflush(stderr);
+ close(listen_gdb);
+ from_gdb = gdb_connect;
+ to_gdb = gdb_connect;
+}
+
/* prepares the FIFOs filenames, map the shared memory. */
static
void prepare_fifos_and_shared_mem(int pid)
@@ -1584,12 +1619,19 @@
sigpipe++;
} else if (signum == SIGALRM) {
sigalrm++;
- DEBUG(1, "pthread_cancel invoke_gdbserver_in_valgrind_thread\n");
+#if defined(VGPV_arm_linux_android)
+ /* Android has no pthread_cancel. As it also does not have
+ PTRACE_INVOKER, there is no need for cleanup action.
+ So, we just do nothing. */
+ DEBUG(1, "sigalrm received, no action on android\n");
+#else
/* Note: we cannot directly invoke restore_and_detach : this must
be done by the thread that has attached.
We have in this thread pushed a cleanup handler that will
cleanup what is needed. */
+ DEBUG(1, "pthread_cancel invoke_gdbserver_in_valgrind_thread\n");
pthread_cancel(invoke_gdbserver_in_valgrind_thread);
+#endif
} else {
ERROR(0, "unexpected signal %d\n", signum);
}
@@ -2008,6 +2050,7 @@
"\n"
" OPTIONS are [--pid=<number>] [--vgdb-prefix=<prefix>]\n"
" [--wait=<number>] [--max-invoke-ms=<number>]\n"
+" [--port=<portnr>\n"
" [--cmd-time-out=<number>] [-l] [-D] [-d]\n"
" \n"
" --pid arg must be given if multiple Valgrind gdbservers are found.\n"
@@ -2019,6 +2062,7 @@
" --max-invoke-ms (default 100) gives the nr of milli-seconds after which vgdb\n"
" will force the invocation of the Valgrind gdbserver (if the Valgrind\n"
" process is blocked in a system call).\n"
+" --port instructs vgdb to listen for gdb on the specified port nr.\n"
" --cmd-time-out (default 99999999) tells vgdb to exit if the found Valgrind\n"
" gdbserver has not processed a command after number seconds\n"
" -l arg tells to show the list of running Valgrind gdbserver and then exit.\n"
@@ -2230,6 +2274,7 @@
Bool *p_show_list,
int *p_arg_pid,
int *p_check_trials,
+ int *p_port,
int *p_last_command,
char *commands[])
{
@@ -2238,6 +2283,7 @@
int arg_pid = -1;
int check_trials = 1;
int last_command = -1;
+ int int_port = 0;
int i;
int arg_errors = 0;
@@ -2278,6 +2324,11 @@
fprintf (stderr, "invalid --cmd-time-out argument %s\n", argv[i]);
arg_errors++;
}
+ } else if (is_opt(argv[i], "--port=")) {
+ if (!numeric_val(argv[i], &int_port)) {
+ fprintf (stderr, "invalid --port argument %s\n", argv[i]);
+ arg_errors++;
+ }
} else if (is_opt(argv[i], "--vgdb-prefix=")) {
vgdb_prefix = argv[i] + 14;
} else if (is_opt(argv[i], "-c")) {
@@ -2315,6 +2366,7 @@
if (isatty(0)
&& !show_shared_mem
&& !show_list
+ && int_port == 0
&& last_command == -1) {
arg_errors++;
fprintf (stderr,
@@ -2341,6 +2393,12 @@
"Can't use both --pid and -l options\n");
}
+ if (int_port > 0 && last_command != -1) {
+ arg_errors++;
+ fprintf (stderr,
+ "Can't use --port to send commands\n");
+ }
+
if (arg_errors > 0) {
fprintf (stderr, "args error. Try `vgdb --help` for more information\n");
exit(1);
@@ -2350,6 +2408,7 @@
*p_show_list = show_list;
*p_arg_pid = arg_pid;
*p_check_trials = check_trials;
+ *p_port = int_port;
*p_last_command = last_command;
}
@@ -2362,6 +2421,7 @@
Bool show_list;
int arg_pid;
int check_trials;
+ int in_port;
int last_command;
char *commands[argc]; // we will never have more commands than args.
@@ -2370,6 +2430,7 @@
&show_list,
&arg_pid,
&check_trials,
+ &in_port,
&last_command,
commands);
@@ -2384,6 +2445,9 @@
prepare_fifos_and_shared_mem(pid);
+ if (in_port > 0)
+ wait_for_gdb_connect(in_port);
+
if (show_shared_mem) {
fprintf(stderr,
"vgdb %d "
@@ -2412,5 +2476,3 @@
free (commands[i]);
return 0;
}
-
-#endif /* !defined(VGPV_arm_linux_android) */
Modified: trunk/docs/xml/manual-core-adv.xml
===================================================================
--- trunk/docs/xml/manual-core-adv.xml 2011-10-22 20:23:30 UTC (rev 12203)
+++ trunk/docs/xml/manual-core-adv.xml 2011-10-22 20:38:08 UTC (rev 12204)
@@ -482,6 +482,44 @@
</sect2>
+<sect2 id="manual-core-adv.gdbserver-gdb-android"
+ xreflabel="Connecting to an Android gdbserver">
+<title>Connecting to an Android gdbserver</title>
+<para> When developping applications for Android, you will typically use
+a development system (on which the Android NDK is installed) to compile your
+application. An Android target system or emulator will be used to run
+the application.
+In this setup, Valgrind and vgdb will run on the Android system,
+while GDB will run on the development system. GDB will connect
+to the vgdb running on the Android system using the Android NDK
+'adb forward' application.
+</para>
+<para> Example: on the Android system, execute the following:
+ <screen><![CDATA[
+valgrind --vgdb-error=0 prog
+# and then in another shell, run:
+vgdb --port=1234
+]]></screen>
+</para>
+
+<para> On the development system, execute the following commands:
+<screen><![CDATA[
+adb forward tcp:1234 tcp:1234
+gdb prog
+(gdb) target remote :1234
+]]></screen>
+GDB will use a local tcp/ip connection to connect to the Android adb forwarder.
+Adb will establish a relay connection between the host system and the Android
+target system. Pay attention to use the GDB delivered in the
+Android NDK system (typically, arm-linux-androideabi-gdb), as the host
+GDB is probably not able to debug Android arm applications.
+Note that the local port nr (used by GDB) must not necessarily be equal
+to the port number used by vgdb: adb can forward tcp/ip between different
+port numbers.
+</para>
+
+</sect2>
+
<sect2 id="manual-core-adv.gdbserver-commandhandling"
xreflabel="Monitor command handling by the Valgrind gdbserver">
<title>Monitor command handling by the Valgrind gdbserver</title>
@@ -899,8 +937,9 @@
</para>
<para>Unblocking processes blocked in system calls is not
- currently implemented on Mac OS X. So you cannot connect to or
- interrupt a process blocked in a system call on Mac OS X.
+ currently implemented on Mac OS X and Android. So you cannot
+ connect to or interrupt a process blocked in a system call on Mac
+ OS X or Android.
</para>
</listitem>
@@ -1033,6 +1072,27 @@
The default value is to never time out.</para>
</listitem>
+ <listitem>
+ <para><option>--port=<portnr></option> instructs vgdb to
+ use tcp/ip and listen for GDB on the specified port nr rather than
+ to use a pipe to communicate with GDB. Using tcp/ip allows to have
+ GDB running on one computer and debugging a Valgrind process
+ running on another target computer.
+ Example:
+ <screen><![CDATA[
+# On the target computer, start your program under valgrind using
+valgrind --vgdb-error=0 prog
+# and then in another shell, run:
+vgdb --port=1234
+]]></screen></para>
+ <para>On the computer which hosts GDB, execute the command:
+ <screen><![CDATA[
+gdb prog
+(gdb) target remote targetip:1234
+]]></screen>
+ where targetip is the ip address or hostname of the target computer.
+ </para>
+ </listitem>
<listitem>
<para><option>-c</option> To give more than one command to a
|
|
From: <sv...@va...> - 2011-10-22 20:28:14
|
Author: sewardj
Date: 2011-10-22 21:23:30 +0100 (Sat, 22 Oct 2011)
New Revision: 12203
Log:
Addition of v.info scheduler monitor command
Monitor command useful for debugging/investigation of Valgrind unwinder and/or
gdbserver/gdb stack trace.
The Valgrind unwinder has some limitations compared to the GDB unwinder.
(see e.g. 278972).
With this monitor command, it is easy to see if the Valgrind unwinder
produces something different than the GDB unwinder.
Fixes #279212. (Philippe Waroquiers, phi...@sk...)
Modified:
trunk/coregrind/m_gdbserver/server.c
trunk/docs/xml/manual-core-adv.xml
trunk/gdbserver_tests/mchelp.stdoutB.exp
Modified: trunk/coregrind/m_gdbserver/server.c
===================================================================
--- trunk/coregrind/m_gdbserver/server.c 2011-10-22 19:48:57 UTC (rev 12202)
+++ trunk/coregrind/m_gdbserver/server.c 2011-10-22 20:23:30 UTC (rev 12203)
@@ -172,6 +172,7 @@
"debugging valgrind internals monitor commands:\n"
" v.info gdbserver_status : show gdbserver status\n"
" v.info memory : show valgrind heap memory stats\n"
+" v.info scheduler : show valgrind thread state and stacktrace\n"
" v.set debuglog <level> : set valgrind debug log level to <level>\n"
" v.translate <addr> [<traceflags>] : debug translation of <addr> with <traceflags>\n"
" (default traceflags 0b00100000 : show after instrumentation)\n"
@@ -234,7 +235,8 @@
ret = 1;
wcmd = strtok_r (NULL, " ", &ssaveptr);
switch (kwdid = VG_(keyword_id)
- ("all_errors n_errs_found last_error gdbserver_status memory",
+ ("all_errors n_errs_found last_error gdbserver_status memory"
+ " scheduler",
wcmd, kwd_report_all)) {
case -2:
case -1:
@@ -260,6 +262,10 @@
VG_(print_arena_cc_analysis) ();
ret = 1;
break;
+ case 5: /* scheduler */
+ VG_(show_sched_status) ();
+ ret = 1;
+ break;
default:
vg_assert(0);
}
Modified: trunk/docs/xml/manual-core-adv.xml
===================================================================
--- trunk/docs/xml/manual-core-adv.xml 2011-10-22 19:48:57 UTC (rev 12202)
+++ trunk/docs/xml/manual-core-adv.xml 2011-10-22 20:23:30 UTC (rev 12203)
@@ -1183,6 +1183,24 @@
</listitem>
<listitem>
+ <para><varname>v.info scheduler</varname> shows the state and
+ stack trace for all threads, as known by Valgrind. This allows to
+ compare the stack traces produced by the Valgrind unwinder with
+ the stack traces produced by GDB+Valgrind gdbserver. Pay attention
+ that GDB and Valgrind scheduler status have their own thread
+ numbering scheme. To make the link between the GDB thread
+ number and the corresponding Valgrind scheduler thread number,
+ use the GDB command <computeroutput>info
+ threads</computeroutput>. The output of this command shows the
+ GDB thread number and the valgrind 'tid'. The 'tid' is the thread number
+ output by <computeroutput>v.info scheduler</computeroutput>.
+ When using the callgrind tool, the callgrind monitor command
+ <computeroutput>status</computeroutput> outputs internal callgrind
+ information about the stack/call graph it maintains.
+ </para>
+ </listitem>
+
+ <listitem>
<para><varname>v.set debuglog <intvalue></varname> sets the
Valgrind debug log level to <intvalue>. This allows to
dynamically change the log level of Valgrind e.g. when a problem
Modified: trunk/gdbserver_tests/mchelp.stdoutB.exp
===================================================================
--- trunk/gdbserver_tests/mchelp.stdoutB.exp 2011-10-22 19:48:57 UTC (rev 12202)
+++ trunk/gdbserver_tests/mchelp.stdoutB.exp 2011-10-22 20:23:30 UTC (rev 12203)
@@ -41,6 +41,7 @@
debugging valgrind internals monitor commands:
v.info gdbserver_status : show gdbserver status
v.info memory : show valgrind heap memory stats
+ v.info scheduler : show valgrind thread state and stacktrace
v.set debuglog <level> : set valgrind debug log level to <level>
v.translate <addr> [<traceflags>] : debug translation of <addr> with <traceflags>
(default traceflags 0b00100000 : show after instrumentation)
|
|
From: <sv...@va...> - 2011-10-22 19:53:43
|
Author: sewardj Date: 2011-10-22 20:48:57 +0100 (Sat, 22 Oct 2011) New Revision: 12202 Log: Improvements in freelist handling for Memcheck. See #250065. (Philippe Waroquiers, phi...@sk...) This patch provides three improvements in the way the free list is handled in memcheck. First improvement: a new command line option --freelist-big-blocks (default 1000000) specifies the size of "free list big blocks". Such big blocks will be put on the free list, but will be re-cycled first (i.e. in preference to block having a smaller size). This fixes the bug https://bugs.kde.org/show_bug.cgi?id=250065. Technically, the freed list is divided in two lists : small and big blocks. Blocks are first released from the big block list. Second improvement: the blocks of the freed list are re-cycled before a new block is malloc-ed, not after a block is freed. This gives better error messages for dangling pointer errors when doing many frees without doing malloc between the frees. (this does not uses more memory). Third improvement: a block bigger than the free list volume will be put in the free list (till a malloc is done, so as the needed memory is not bigger than before) but will be put at the beginning of the free list, rather than at the end. So, allocating then freeing such a block does not cause any blocks in the free list to be released. Results of the improvements above, with the new regression test memcheck/test/big_blocks_freed_list: with the patch, 7 errors are detected, 6 are giving the (correct) allocation stack. Without the patch, only 6 errors are detected, 5 errors without allocation stack, 1 with a (wrong) allocation stack. Added: trunk/memcheck/tests/big_blocks_freed_list.c trunk/memcheck/tests/big_blocks_freed_list.stderr.exp trunk/memcheck/tests/big_blocks_freed_list.vgtest Modified: trunk/memcheck/docs/mc-manual.xml trunk/memcheck/mc_errors.c trunk/memcheck/mc_include.h trunk/memcheck/mc_main.c trunk/memcheck/mc_malloc_wrappers.c trunk/memcheck/tests/Makefile.am trunk/memcheck/tests/memalign2.vgtest Modified: trunk/memcheck/docs/mc-manual.xml =================================================================== --- trunk/memcheck/docs/mc-manual.xml 2011-10-22 19:29:51 UTC (rev 12201) +++ trunk/memcheck/docs/mc-manual.xml 2011-10-22 19:48:57 UTC (rev 12202) @@ -790,6 +790,24 @@ </listitem> </varlistentry> + <varlistentry id="opt.freelist-big-blocks" xreflabel="--freelist-big-blocks"> + <term> + <option><![CDATA[--freelist-big-blocks=<number> [default: 1000000] ]]></option> + </term> + <listitem> + <para>When making blocks from the queue of freed blocks available + for re-allocation, Memcheck will in priority re-circulate the blocks + with a size greater or equal to <option>--freelist-big-blocks</option>. + This ensures that freeing big blocks (in particular freeing blocks bigger than + <option>--freelist-vol</option>) does not immediately lead to a re-circulation + of all (or a lot of) the small blocks in the free list. In other words, + this option increases the likelihood to discover dangling pointers + for the "small" blocks, even when big blocks are freed.</para> + <para>Setting a value of 0 means that all the blocks are re-circulated + in a FIFO order. </para> + </listitem> + </varlistentry> + <varlistentry id="opt.workaround-gcc296-bugs" xreflabel="--workaround-gcc296-bugs"> <term> <option><![CDATA[--workaround-gcc296-bugs=<yes|no> [default: no] ]]></option> Modified: trunk/memcheck/mc_errors.c =================================================================== --- trunk/memcheck/mc_errors.c 2011-10-22 19:29:51 UTC (rev 12201) +++ trunk/memcheck/mc_errors.c 2011-10-22 19:48:57 UTC (rev 12202) @@ -1103,18 +1103,15 @@ return; } /* -- Search for a recently freed block which might bracket it. -- */ - mc = MC_(get_freed_list_head)(); - while (mc) { - if (addr_is_in_MC_Chunk_default_REDZONE_SZB(mc, a)) { - ai->tag = Addr_Block; - ai->Addr.Block.block_kind = Block_Freed; - ai->Addr.Block.block_desc = "block"; - ai->Addr.Block.block_szB = mc->szB; - ai->Addr.Block.rwoffset = (Word)a - (Word)mc->data; - ai->Addr.Block.lastchange = mc->where; - return; - } - mc = mc->next; + mc = MC_(get_freed_block_bracketting)( a ); + if (mc) { + ai->tag = Addr_Block; + ai->Addr.Block.block_kind = Block_Freed; + ai->Addr.Block.block_desc = "block"; + ai->Addr.Block.block_szB = mc->szB; + ai->Addr.Block.rwoffset = (Word)a - (Word)mc->data; + ai->Addr.Block.lastchange = mc->where; + return; } /* -- Search for a currently malloc'd block which might bracket it. -- */ VG_(HT_ResetIter)(MC_(malloc_list)); Modified: trunk/memcheck/mc_include.h =================================================================== --- trunk/memcheck/mc_include.h 2011-10-22 19:29:51 UTC (rev 12201) +++ trunk/memcheck/mc_include.h 2011-10-22 19:48:57 UTC (rev 12202) @@ -96,7 +96,10 @@ void MC_(mempool_change) ( Addr pool, Addr addrA, Addr addrB, SizeT size ); Bool MC_(mempool_exists) ( Addr pool ); -MC_Chunk* MC_(get_freed_list_head)( void ); +/* Searches for a recently freed block which might bracket Addr a. + Return the MC_Chunk* for this block or NULL if no bracketting block + is found. */ +MC_Chunk* MC_(get_freed_block_bracketting)( Addr a ); /* For tracking malloc'd blocks. Nb: it's quite important that it's a VgHashTable, because VgHashTable allows duplicate keys without complaint. @@ -424,6 +427,10 @@ /* Max volume of the freed blocks queue. */ extern Long MC_(clo_freelist_vol); +/* Blocks with a size >= MC_(clo_freelist_big_blocks) will be put + in the "big block" freed blocks queue. */ +extern Long MC_(clo_freelist_big_blocks); + /* Do leak check at exit? default: NO */ extern LeakCheckMode MC_(clo_leak_check); Modified: trunk/memcheck/mc_main.c =================================================================== --- trunk/memcheck/mc_main.c 2011-10-22 19:29:51 UTC (rev 12201) +++ trunk/memcheck/mc_main.c 2011-10-22 19:48:57 UTC (rev 12202) @@ -4701,6 +4701,7 @@ Bool MC_(clo_partial_loads_ok) = False; Long MC_(clo_freelist_vol) = 20*1000*1000LL; +Long MC_(clo_freelist_big_blocks) = 1*1000*1000LL; LeakCheckMode MC_(clo_leak_check) = LC_Summary; VgRes MC_(clo_leak_resolution) = Vg_HighRes; Bool MC_(clo_show_reachable) = False; @@ -4761,7 +4762,11 @@ else if VG_BINT_CLO(arg, "--freelist-vol", MC_(clo_freelist_vol), 0, 10*1000*1000*1000LL) {} - + + else if VG_BINT_CLO(arg, "--freelist-big-blocks", + MC_(clo_freelist_big_blocks), + 0, 10*1000*1000*1000LL) {} + else if VG_XACT_CLO(arg, "--leak-check=no", MC_(clo_leak_check), LC_Off) {} else if VG_XACT_CLO(arg, "--leak-check=summary", @@ -4831,7 +4836,8 @@ " --undef-value-errors=no|yes check for undefined value errors [yes]\n" " --track-origins=no|yes show origins of undefined values? [no]\n" " --partial-loads-ok=no|yes too hard to explain here; see manual [no]\n" -" --freelist-vol=<number> volume of freed blocks queue [20000000]\n" +" --freelist-vol=<number> volume of freed blocks queue [20000000]\n" +" --freelist-big-blocks=<number> releases first blocks with size >= [1000000]\n" " --workaround-gcc296-bugs=no|yes self explanatory [no]\n" " --ignore-ranges=0xPP-0xQQ[,0xRR-0xSS] assume given addresses are OK\n" " --malloc-fill=<hexnumber> fill malloc'd areas with given value\n" @@ -5839,6 +5845,13 @@ MC_(clo_leak_check) = LC_Full; } + if (MC_(clo_freelist_big_blocks) >= MC_(clo_freelist_vol)) + VG_(message)(Vg_UserMsg, + "Warning: --freelist-big-blocks value %lld has no effect\n" + "as it is >= to --freelist-vol value %lld\n", + MC_(clo_freelist_big_blocks), + MC_(clo_freelist_vol)); + tl_assert( MC_(clo_mc_level) >= 1 && MC_(clo_mc_level) <= 3 ); if (MC_(clo_mc_level) == 3) { Modified: trunk/memcheck/mc_malloc_wrappers.c =================================================================== --- trunk/memcheck/mc_malloc_wrappers.c 2011-10-22 19:29:51 UTC (rev 12201) +++ trunk/memcheck/mc_malloc_wrappers.c 2011-10-22 19:48:57 UTC (rev 12202) @@ -70,69 +70,111 @@ VgHashTable MC_(mempool_list) = NULL; /* Records blocks after freeing. */ -static MC_Chunk* freed_list_start = NULL; -static MC_Chunk* freed_list_end = NULL; +/* Blocks freed by the client are queued in one of two lists of + freed blocks not yet physically freed: + "big blocks" freed list. + "small blocks" freed list + The blocks with a size >= MC_(clo_freelist_big_blocks) + are linked in the big blocks freed list. + This allows a client to allocate and free big blocks + (e.g. bigger than VG_(clo_freelist_vol)) without losing + immediately all protection against dangling pointers. + position [0] is for big blocks, [1] is for small blocks. */ +static MC_Chunk* freed_list_start[2] = {NULL, NULL}; +static MC_Chunk* freed_list_end[2] = {NULL, NULL}; /* Put a shadow chunk on the freed blocks queue, possibly freeing up some of the oldest blocks in the queue at the same time. */ static void add_to_freed_queue ( MC_Chunk* mc ) { const Bool show = False; + const int l = (mc->szB >= MC_(clo_freelist_big_blocks) ? 0 : 1); - /* Put it at the end of the freed list */ - if (freed_list_end == NULL) { - tl_assert(freed_list_start == NULL); - freed_list_end = freed_list_start = mc; - VG_(free_queue_volume) = (Long)mc->szB; + /* Put it at the end of the freed list, unless the block + would be directly released any way : in this case, we + put it at the head of the freed list. */ + if (freed_list_end[l] == NULL) { + tl_assert(freed_list_start[l] == NULL); + mc->next = NULL; + freed_list_end[l] = freed_list_start[l] = mc; } else { - tl_assert(freed_list_end->next == NULL); - freed_list_end->next = mc; - freed_list_end = mc; - VG_(free_queue_volume) += (Long)mc->szB; - if (show) - VG_(printf)("mc_freelist: acquire: volume now %lld\n", - VG_(free_queue_volume)); + tl_assert(freed_list_end[l]->next == NULL); + if (mc->szB >= MC_(clo_freelist_vol)) { + mc->next = freed_list_start[l]; + freed_list_start[l] = mc; + } else { + mc->next = NULL; + freed_list_end[l]->next = mc; + freed_list_end[l] = mc; + } } + VG_(free_queue_volume) += (Long)mc->szB; + if (show) + VG_(printf)("mc_freelist: acquire: volume now %lld\n", + VG_(free_queue_volume)); VG_(free_queue_length)++; - mc->next = NULL; +} - /* Release enough of the oldest blocks to bring the free queue - volume below vg_clo_freelist_vol. */ +/* Release enough of the oldest blocks to bring the free queue + volume below vg_clo_freelist_vol. + Start with big block list first. + On entry, VG_(free_queue_volume) must be > MC_(clo_freelist_vol). + On exit, VG_(free_queue_volume) will be <= MC_(clo_freelist_vol). */ +static void release_oldest_block(void) +{ + const Bool show = False; + int i; + tl_assert (VG_(free_queue_volume) > MC_(clo_freelist_vol)); + tl_assert (freed_list_start[0] != NULL || freed_list_start[1] != NULL); - while (VG_(free_queue_volume) > MC_(clo_freelist_vol)) { - MC_Chunk* mc1; + for (i = 0; i < 2; i++) { + while (VG_(free_queue_volume) > MC_(clo_freelist_vol) + && freed_list_start[i] != NULL) { + MC_Chunk* mc1; - tl_assert(freed_list_start != NULL); - tl_assert(freed_list_end != NULL); + tl_assert(freed_list_end[i] != NULL); + + mc1 = freed_list_start[i]; + VG_(free_queue_volume) -= (Long)mc1->szB; + VG_(free_queue_length)--; + if (show) + VG_(printf)("mc_freelist: discard: volume now %lld\n", + VG_(free_queue_volume)); + tl_assert(VG_(free_queue_volume) >= 0); + + if (freed_list_start[i] == freed_list_end[i]) { + freed_list_start[i] = freed_list_end[i] = NULL; + } else { + freed_list_start[i] = mc1->next; + } + mc1->next = NULL; /* just paranoia */ - mc1 = freed_list_start; - VG_(free_queue_volume) -= (Long)mc1->szB; - VG_(free_queue_length)--; - if (show) - VG_(printf)("mc_freelist: discard: volume now %lld\n", - VG_(free_queue_volume)); - tl_assert(VG_(free_queue_volume) >= 0); - - if (freed_list_start == freed_list_end) { - freed_list_start = freed_list_end = NULL; - } else { - freed_list_start = mc1->next; + /* free MC_Chunk */ + if (MC_AllocCustom != mc1->allockind) + VG_(cli_free) ( (void*)(mc1->data) ); + VG_(free) ( mc1 ); } - mc1->next = NULL; /* just paranoia */ - - /* free MC_Chunk */ - if (MC_AllocCustom != mc1->allockind) - VG_(cli_free) ( (void*)(mc1->data) ); - VG_(free) ( mc1 ); } } -MC_Chunk* MC_(get_freed_list_head)(void) +MC_Chunk* MC_(get_freed_block_bracketting) (Addr a) { - return freed_list_start; + int i; + for (i = 0; i < 2; i++) { + MC_Chunk* mc; + mc = freed_list_start[i]; + while (mc) { + if (VG_(addr_is_in_block)( a, mc->data, mc->szB, + MC_MALLOC_REDZONE_SZB )) + return mc; + mc = mc->next; + } + } + return NULL; } -/* Allocate its shadow chunk, put it on the appropriate list. */ +/* Allocate a shadow chunk, put it on the appropriate list. + If needed, release oldest blocks from freed list. */ static MC_Chunk* create_MC_Chunk ( ExeContext* ec, Addr p, SizeT szB, MC_AllocKind kind) @@ -143,6 +185,11 @@ mc->allockind = kind; mc->where = ec; + /* Each time a new MC_Chunk is created, release oldest blocks + if the free list volume is exceeded. */ + if (VG_(free_queue_volume) > MC_(clo_freelist_vol)) + release_oldest_block(); + /* Paranoia ... ensure the MC_Chunk is off-limits to the client, so the mc->data field isn't visible to the leak checker. If memory management is working correctly, any pointer returned by VG_(malloc) @@ -296,6 +343,10 @@ mc->where = VG_(record_ExeContext) ( tid, 0/*first_ip_delta*/ ); /* Put it out of harm's way for a while */ add_to_freed_queue ( mc ); + /* If the free list volume is bigger than MC_(clo_freelist_vol), + we wait till the next block allocation to release blocks. + This increase the chance to discover dangling pointer usage, + even for big blocks being freed by the client. */ } void MC_(handle_free) ( ThreadId tid, Addr p, UInt rzB, MC_AllocKind kind ) Modified: trunk/memcheck/tests/Makefile.am =================================================================== --- trunk/memcheck/tests/Makefile.am 2011-10-22 19:29:51 UTC (rev 12201) +++ trunk/memcheck/tests/Makefile.am 2011-10-22 19:48:57 UTC (rev 12202) @@ -62,6 +62,7 @@ badloop.stderr.exp badloop.vgtest \ badpoll.stderr.exp badpoll.vgtest \ badrw.stderr.exp badrw.vgtest badrw.stderr.exp-s390x-mvc \ + big_blocks_freed_list.stderr.exp big_blocks_freed_list.vgtest \ brk2.stderr.exp brk2.vgtest \ buflen_check.stderr.exp buflen_check.vgtest buflen_check.stderr.exp-kfail \ calloc-overflow.stderr.exp calloc-overflow.vgtest\ @@ -214,6 +215,7 @@ badloop \ badpoll \ badrw \ + big_blocks_freed_list \ brk2 \ buflen_check \ calloc-overflow \ Added: trunk/memcheck/tests/big_blocks_freed_list.c =================================================================== --- trunk/memcheck/tests/big_blocks_freed_list.c (rev 0) +++ trunk/memcheck/tests/big_blocks_freed_list.c 2011-10-22 19:48:57 UTC (rev 12202) @@ -0,0 +1,57 @@ +#include <stdlib.h> +/* To be run with --freelist-vol=1000000 --freelist-big-blocks=50000 */ +static void jumped(void) +{ + ; +} +int main(int argc, char *argv[]) +{ + char *semi_big = NULL; + char *big = NULL; + char *small = NULL; + char *other_small = NULL; + int i; + int j; + + /* Verify that access via a dangling pointer to a big block bigger than + the free list is found by memcheck (still on the free list). */ + semi_big = malloc (900000); + big = malloc (1000001); + free(semi_big); + free(big); + if (big[1000] > 0x0) jumped(); + if (semi_big[1000] > 0x0) jumped(); + + /* Then verify that dangling pointers for small blocks is not hampered + by doing big alloc/free. */ + small = malloc (10000); + free(small); + + /* We should still have a nice error msg for the semi_big + but not for the big block, which has been removed from the free list + with the malloc of small above. */ + if (big[2000] > 0x0) jumped(); + if (semi_big[2000] > 0x0) jumped(); + + big = NULL; + + { + big = malloc (1000001); + free(big); + if (small[10] > 0x0) jumped(); + + /* Do not common up the below in a loop. We + want a different error/stack trace for each of + these. */ + if (big[10] > 0x0) jumped(); + } + + + for (i = 0; i < 100; i++) { + other_small = malloc(10000); + for (j = 0; j < 10000; j++) + other_small[j] = 0x1; + } + if (small[10] > 0x0) jumped(); + return 0; +} Added: trunk/memcheck/tests/big_blocks_freed_list.stderr.exp =================================================================== --- trunk/memcheck/tests/big_blocks_freed_list.stderr.exp (rev 0) +++ trunk/memcheck/tests/big_blocks_freed_list.stderr.exp 2011-10-22 19:48:57 UTC (rev 12202) @@ -0,0 +1,50 @@ + +Invalid read of size 1 + at 0x........: main (big_blocks_freed_list.c:22) + Address 0x........ is 1,000 bytes inside a block of size 1,000,001 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (big_blocks_freed_list.c:21) + +Invalid read of size 1 + at 0x........: main (big_blocks_freed_list.c:23) + Address 0x........ is 1,000 bytes inside a block of size 900,000 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (big_blocks_freed_list.c:20) + +Invalid read of size 1 + at 0x........: main (big_blocks_freed_list.c:33) + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Invalid read of size 1 + at 0x........: main (big_blocks_freed_list.c:34) + Address 0x........ is 2,000 bytes inside a block of size 900,000 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (big_blocks_freed_list.c:20) + +Invalid read of size 1 + at 0x........: main (big_blocks_freed_list.c:41) + Address 0x........ is 10 bytes inside a block of size 10,000 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (big_blocks_freed_list.c:28) + +Invalid read of size 1 + at 0x........: main (big_blocks_freed_list.c:46) + Address 0x........ is 10 bytes inside a block of size 1,000,001 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (big_blocks_freed_list.c:40) + +Invalid read of size 1 + at 0x........: main (big_blocks_freed_list.c:55) + Address 0x........ is 10 bytes inside a block of size 10,000 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (big_blocks_freed_list.c:28) + + +HEAP SUMMARY: + in use at exit: 1,000,000 bytes in 100 blocks + total heap usage: 104 allocs, 4 frees, 3,910,002 bytes allocated + +For a detailed leak analysis, rerun with: --leak-check=full + +For counts of detected and suppressed errors, rerun with: -v +ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0) Added: trunk/memcheck/tests/big_blocks_freed_list.vgtest =================================================================== --- trunk/memcheck/tests/big_blocks_freed_list.vgtest (rev 0) +++ trunk/memcheck/tests/big_blocks_freed_list.vgtest 2011-10-22 19:48:57 UTC (rev 12202) @@ -0,0 +1,2 @@ +prog: big_blocks_freed_list +vgopts: --freelist-vol=1000000 --freelist-big-blocks=50000 Modified: trunk/memcheck/tests/memalign2.vgtest =================================================================== --- trunk/memcheck/tests/memalign2.vgtest 2011-10-22 19:29:51 UTC (rev 12201) +++ trunk/memcheck/tests/memalign2.vgtest 2011-10-22 19:48:57 UTC (rev 12202) @@ -1,2 +1,2 @@ prog: memalign2 -vgopts: -q --freelist-vol=100000 +vgopts: -q --freelist-vol=100000 --freelist-big-blocks=0 |
|
From: <sv...@va...> - 2011-10-22 19:34:37
|
Author: sewardj
Date: 2011-10-22 20:29:51 +0100 (Sat, 22 Oct 2011)
New Revision: 12201
Log:
Allow garbage collection of the LAOG data structure(s). This avoids
quadratic growth on some apparently simple test cases. Fixes #267925.
(Philippe Waroquiers, phi...@sk...)
Added:
trunk/helgrind/tests/t2t.c
trunk/helgrind/tests/t2t_laog.stderr.exp
trunk/helgrind/tests/t2t_laog.stdout.exp
trunk/helgrind/tests/t2t_laog.vgtest
Modified:
trunk/helgrind/hg_main.c
trunk/helgrind/hg_wordset.c
trunk/helgrind/hg_wordset.h
trunk/helgrind/tests/Makefile.am
Modified: trunk/helgrind/hg_main.c
===================================================================
--- trunk/helgrind/hg_main.c 2011-10-22 16:29:11 UTC (rev 12200)
+++ trunk/helgrind/hg_main.c 2011-10-22 19:29:51 UTC (rev 12201)
@@ -136,6 +136,9 @@
/* The word-set universes for lock sets. */
static WordSetU* univ_lsets = NULL; /* sets of Lock* */
static WordSetU* univ_laog = NULL; /* sets of Lock*, for LAOG */
+static Int next_gc_univ_laog = 1;
+/* univ_laog will be garbaged collected when the nr of element in univ_laog is
+ >= next_gc_univ_laog. */
/* Allow libhb to get at the universe of locksets stored
here. Sigh. */
@@ -3300,6 +3303,85 @@
VG_(printf)("}\n");
}
+static void univ_laog_do_GC ( void ) {
+ Word i;
+ LAOGLinks* links;
+ Word seen = 0;
+ Int prev_next_gc_univ_laog = next_gc_univ_laog;
+ const UWord univ_laog_cardinality = HG_(cardinalityWSU)( univ_laog);
+
+ Bool *univ_laog_seen = HG_(zalloc) ( "hg.gc_univ_laog.1",
+ (Int) univ_laog_cardinality
+ * sizeof(Bool) );
+ // univ_laog_seen[*] set to 0 (False) by zalloc.
+
+ if (VG_(clo_stats))
+ VG_(message)(Vg_DebugMsg,
+ "univ_laog_do_GC enter cardinality %'10d\n",
+ (Int)univ_laog_cardinality);
+
+ VG_(initIterFM)( laog );
+ links = NULL;
+ while (VG_(nextIterFM)( laog, NULL, (UWord*)&links )) {
+ tl_assert(links);
+ tl_assert(links->inns >= 0 && links->inns < univ_laog_cardinality);
+ univ_laog_seen[links->inns] = True;
+ tl_assert(links->outs >= 0 && links->outs < univ_laog_cardinality);
+ univ_laog_seen[links->outs] = True;
+ links = NULL;
+ }
+ VG_(doneIterFM)( laog );
+
+ for (i = 0; i < (Int)univ_laog_cardinality; i++) {
+ if (univ_laog_seen[i])
+ seen++;
+ else
+ HG_(dieWS) ( univ_laog, (WordSet)i );
+ }
+
+ HG_(free) (univ_laog_seen);
+
+ // We need to decide the value of the next_gc.
+ // 3 solutions were looked at:
+ // Sol 1: garbage collect at seen * 2
+ // This solution was a lot slower, probably because we both do a lot of
+ // garbage collection and do not keep long enough laog WV that will become
+ // useful again very soon.
+ // Sol 2: garbage collect at a percentage increase of the current cardinality
+ // (with a min increase of 1)
+ // Trials on a small test program with 1%, 5% and 10% increase was done.
+ // 1% is slightly faster than 5%, which is slightly slower than 10%.
+ // However, on a big application, this caused the memory to be exhausted,
+ // as even a 1% increase of size at each gc becomes a lot, when many gc
+ // are done.
+ // Sol 3: always garbage collect at current cardinality + 1.
+ // This solution was the fastest of the 3 solutions, and caused no memory
+ // exhaustion in the big application.
+ //
+ // With regards to cost introduced by gc: on the t2t perf test (doing only
+ // lock/unlock operations), t2t 50 10 2 was about 25% faster than the
+ // version with garbage collection. With t2t 50 20 2, my machine started
+ // to page out, and so the garbage collected version was much faster.
+ // On smaller lock sets (e.g. t2t 20 5 2, giving about 100 locks), the
+ // difference performance is insignificant (~ 0.1 s).
+ // Of course, it might be that real life programs are not well represented
+ // by t2t.
+
+ // If ever we want to have a more sophisticated control
+ // (e.g. clo options to control the percentage increase or fixed increased),
+ // we should do it here, eg.
+ // next_gc_univ_laog = prev_next_gc_univ_laog + VG_(clo_laog_gc_fixed);
+ // Currently, we just hard-code the solution 3 above.
+ next_gc_univ_laog = prev_next_gc_univ_laog + 1;
+
+ if (VG_(clo_stats))
+ VG_(message)
+ (Vg_DebugMsg,
+ "univ_laog_do_GC exit seen %'8d next gc at cardinality %'10d\n",
+ (Int)seen, next_gc_univ_laog);
+}
+
+
__attribute__((noinline))
static void laog__add_edge ( Lock* src, Lock* dst ) {
Word keyW;
@@ -3378,13 +3460,16 @@
VG_(addToFM)( laog_exposition, (Word)expo2, (Word)NULL );
}
}
+
+ if (HG_(cardinalityWSU) (univ_laog) >= next_gc_univ_laog)
+ univ_laog_do_GC();
}
__attribute__((noinline))
static void laog__del_edge ( Lock* src, Lock* dst ) {
Word keyW;
LAOGLinks* links;
- if (0) VG_(printf)("laog__del_edge %p %p\n", src, dst);
+ if (0) VG_(printf)("laog__del_edge enter %p %p\n", src, dst);
/* Update the out edges for src */
keyW = 0;
links = NULL;
@@ -3401,6 +3486,27 @@
tl_assert(keyW == (Word)dst);
links->inns = HG_(delFromWS)( univ_laog, links->inns, (Word)src );
}
+
+ /* Remove the exposition of src,dst (if present) */
+ {
+ LAOGLinkExposition *fm_expo;
+
+ LAOGLinkExposition expo;
+ expo.src_ga = src->guestaddr;
+ expo.dst_ga = dst->guestaddr;
+ expo.src_ec = NULL;
+ expo.dst_ec = NULL;
+
+ if (VG_(delFromFM) (laog_exposition,
+ (UWord*)&fm_expo, NULL, (UWord)&expo )) {
+ HG_(free) (fm_expo);
+ }
+ }
+
+ /* deleting edges can increase nr of of WS so check for gc. */
+ if (HG_(cardinalityWSU) (univ_laog) >= next_gc_univ_laog)
+ univ_laog_do_GC();
+ if (0) VG_(printf)("laog__del_edge exit\n");
}
__attribute__((noinline))
@@ -3611,7 +3717,22 @@
all_except_Locks__sanity_check("laog__pre_thread_acquires_lock-post");
}
+/* Allocates a duplicate of words. Caller must HG_(free) the result. */
+static UWord* UWordV_dup(UWord* words, Word words_size)
+{
+ UInt i;
+ if (words_size == 0)
+ return NULL;
+
+ UWord *dup = HG_(zalloc) ("hg.dup.1", (SizeT) words_size * sizeof(UWord));
+
+ for (i = 0; i < words_size; i++)
+ dup[i] = words[i];
+
+ return dup;
+}
+
/* Delete from 'laog' any pair mentioning a lock in locksToDelete */
__attribute__((noinline))
@@ -3624,11 +3745,17 @@
preds = laog__preds( lk );
succs = laog__succs( lk );
+ // We need to duplicate the payload, as these can be garbage collected
+ // during the del/add operations below.
HG_(getPayloadWS)( &preds_words, &preds_size, univ_laog, preds );
+ preds_words = UWordV_dup(preds_words, preds_size);
+
+ HG_(getPayloadWS)( &succs_words, &succs_size, univ_laog, succs );
+ succs_words = UWordV_dup(succs_words, succs_size);
+
for (i = 0; i < preds_size; i++)
laog__del_edge( (Lock*)preds_words[i], lk );
- HG_(getPayloadWS)( &succs_words, &succs_size, univ_laog, succs );
for (j = 0; j < succs_size; j++)
laog__del_edge( lk, (Lock*)succs_words[j] );
@@ -3642,6 +3769,24 @@
}
}
}
+
+ if (preds_words)
+ HG_(free) (preds_words);
+ if (succs_words)
+ HG_(free) (succs_words);
+
+ // Remove lk information from laog links FM
+ {
+ LAOGLinks *links;
+ Lock* linked_lk;
+
+ if (VG_(delFromFM) (laog,
+ (UWord*)&linked_lk, (UWord*)&links, (UWord)lk)) {
+ tl_assert (linked_lk == lk);
+ HG_(free) (links);
+ }
+ }
+ /* FIXME ??? What about removing lock lk data from EXPOSITION ??? */
}
//__attribute__((noinline))
@@ -3654,6 +3799,7 @@
//
//
// HG_(getPayloadWS)( &ws_words, &ws_size, univ_lsets, locksToDelete );
+// UWordV_dup call needed here ...
// for (i = 0; i < ws_size; i++)
// laog__handle_one_lock_deletion( (Lock*)ws_words[i] );
//
Modified: trunk/helgrind/hg_wordset.c
===================================================================
--- trunk/helgrind/hg_wordset.c 2011-10-22 16:29:11 UTC (rev 12200)
+++ trunk/helgrind/hg_wordset.c 2011-10-22 19:29:51 UTC (rev 12201)
@@ -44,6 +44,9 @@
#include "hg_basics.h"
#include "hg_wordset.h" /* self */
+// define to 1 to have (a lot of) debugging of add/re-use/die WSU entries.
+#define HG_DEBUG 0
+
//------------------------------------------------------------------//
//--- Word Cache ---//
//------------------------------------------------------------------//
@@ -139,7 +142,11 @@
/* ix2vec[0 .. ix2vec_used-1] are pointers to the lock sets (WordVecs)
really. vec2ix is the inverse mapping, mapping WordVec* to the
corresponding ix2vec entry number. The two mappings are mutually
- redundant. */
+ redundant.
+
+ If a WordVec WV is marked as dead by HG(dieWS), WV is removed from
+ vec2ix. The entry of the dead WVs in ix2vec are used to maintain a
+ linked list of free (to be re-used) ix2vec entries. */
struct _WordSetU {
void* (*alloc)(HChar*,SizeT);
HChar* cc;
@@ -148,6 +155,7 @@
WordVec** ix2vec; /* WordSet-to-WordVec mapping array */
UWord ix2vec_size;
UWord ix2vec_used;
+ WordVec** ix2vec_free;
WordSet empty; /* cached, for speed */
/* Caches for some operations */
WCache cache_addTo;
@@ -159,6 +167,7 @@
UWord n_add_uncached;
UWord n_del;
UWord n_del_uncached;
+ UWord n_die;
UWord n_union;
UWord n_intersect;
UWord n_intersect_uncached;
@@ -235,7 +244,7 @@
if (wsu->ix2vec_used < wsu->ix2vec_size)
return;
new_sz = 2 * wsu->ix2vec_size;
- if (new_sz == 0) new_sz = 2;
+ if (new_sz == 0) new_sz = 1;
new_vec = wsu->alloc( wsu->cc, new_sz * sizeof(WordVec*) );
tl_assert(new_vec);
for (i = 0; i < wsu->ix2vec_size; i++)
@@ -246,9 +255,20 @@
wsu->ix2vec_size = new_sz;
}
+/* True if wv is a dead entry (i.e. is in the linked list of free to be re-used
+ entries in ix2vec). */
+static inline Bool is_dead ( WordSetU* wsu, WordVec* wv )
+{
+ if (wv == NULL) /* last element in free linked list in ix2vec */
+ return True;
+ else
+ return (WordVec**)wv >= &(wsu->ix2vec[1])
+ && (WordVec**)wv < &(wsu->ix2vec[wsu->ix2vec_size]);
+}
/* Index into a WordSetU, doing the obvious range check. Failure of
the assertions marked XXX and YYY is an indication of passing the
- wrong WordSetU* in the public API of this module. */
+ wrong WordSetU* in the public API of this module.
+ Accessing a dead ws will assert. */
static WordVec* do_ix2vec ( WordSetU* wsu, WordSet ws )
{
WordVec* wv;
@@ -259,12 +279,32 @@
that does not come from the 'wsu' universe. */
tl_assert(ws < wsu->ix2vec_used); /* XXX */
wv = wsu->ix2vec[ws];
- /* Make absolutely sure that 'ws' is a member of 'wsu'. */
+ /* Make absolutely sure that 'ws' is a non dead member of 'wsu'. */
tl_assert(wv);
+ tl_assert(!is_dead(wsu,wv));
tl_assert(wv->owner == wsu); /* YYY */
return wv;
}
+/* Same as do_ix2vec but returns NULL for a dead ws. */
+static WordVec* do_ix2vec_with_dead ( WordSetU* wsu, WordSet ws )
+{
+ WordVec* wv;
+ tl_assert(wsu->ix2vec_used <= wsu->ix2vec_size);
+ if (wsu->ix2vec_used > 0)
+ tl_assert(wsu->ix2vec);
+ /* If this assertion fails, it may mean you supplied a 'ws'
+ that does not come from the 'wsu' universe. */
+ tl_assert(ws < wsu->ix2vec_used); /* XXX */
+ wv = wsu->ix2vec[ws];
+ /* Make absolutely sure that 'ws' is either dead or a member of 'wsu'. */
+ if (is_dead(wsu,wv))
+ wv = NULL;
+ else
+ tl_assert(wv->owner == wsu); /* YYY */
+ return wv;
+}
+
/* See if wv is contained within wsu. If so, deallocate wv and return
the index of the already-present copy. If not, add wv to both the
vec2ix and ix2vec mappings and return its index.
@@ -289,13 +329,23 @@
tl_assert(wsu->ix2vec[ix_old] == wv_old);
delete_WV( wv_new );
return (WordSet)ix_old;
+ } else if (wsu->ix2vec_free) {
+ WordSet ws;
+ tl_assert(is_dead(wsu,(WordVec*)wsu->ix2vec_free));
+ ws = wsu->ix2vec_free - &(wsu->ix2vec[0]);
+ tl_assert(wsu->ix2vec[ws] == NULL || is_dead(wsu,wsu->ix2vec[ws]));
+ wsu->ix2vec_free = (WordVec **) wsu->ix2vec[ws];
+ wsu->ix2vec[ws] = wv_new;
+ VG_(addToFM)( wsu->vec2ix, (Word)wv_new, ws );
+ if (HG_DEBUG) VG_(printf)("aodW %s re-use free %d %p\n", wsu->cc, (Int)ws, wv_new );
+ return ws;
} else {
ensure_ix2vec_space( wsu );
tl_assert(wsu->ix2vec);
tl_assert(wsu->ix2vec_used < wsu->ix2vec_size);
wsu->ix2vec[wsu->ix2vec_used] = wv_new;
VG_(addToFM)( wsu->vec2ix, (Word)wv_new, (Word)wsu->ix2vec_used );
- if (0) VG_(printf)("aodW %d\n", (Int)wsu->ix2vec_used );
+ if (HG_DEBUG) VG_(printf)("aodW %s %d %p\n", wsu->cc, (Int)wsu->ix2vec_used, wv_new );
wsu->ix2vec_used++;
tl_assert(wsu->ix2vec_used <= wsu->ix2vec_size);
return (WordSet)(wsu->ix2vec_used - 1);
@@ -321,6 +371,7 @@
wsu->ix2vec_used = 0;
wsu->ix2vec_size = 0;
wsu->ix2vec = NULL;
+ wsu->ix2vec_free = NULL;
WCache_INIT(wsu->cache_addTo, cacheSize);
WCache_INIT(wsu->cache_delFrom, cacheSize);
WCache_INIT(wsu->cache_intersect, cacheSize);
@@ -397,6 +448,7 @@
WordSetU* wsu, WordSet ws )
{
WordVec* wv;
+ if (HG_DEBUG) VG_(printf)("getPayloadWS %s %d\n", wsu->cc, (Int)ws);
tl_assert(wsu);
wv = do_ix2vec( wsu, ws );
tl_assert(wv->size >= 0);
@@ -404,6 +456,42 @@
*words = wv->words;
}
+void HG_(dieWS) ( WordSetU* wsu, WordSet ws )
+{
+ WordVec* wv = do_ix2vec_with_dead( wsu, ws );
+ WordVec* wv_in_vec2ix;
+ UWord/*Set*/ wv_ix = -1;
+
+ if (HG_DEBUG) VG_(printf)("dieWS %s %d %p\n", wsu->cc, (Int)ws, wv);
+
+ if (ws == 0)
+ return; // we never die the empty set.
+
+ if (!wv)
+ return; // already dead. (or a bug ?).
+
+ wsu->n_die++;
+
+
+ wsu->ix2vec[ws] = (WordVec*) wsu->ix2vec_free;
+ wsu->ix2vec_free = &wsu->ix2vec[ws];
+
+ VG_(delFromFM) ( wsu->vec2ix,
+ (Word*)&wv_in_vec2ix, (Word*)&wv_ix,
+ (Word)wv );
+
+ if (HG_DEBUG) VG_(printf)("dieWS wv_ix %d\n", (Int)wv_ix);
+ tl_assert (wv_ix);
+ tl_assert (wv_ix == ws);
+
+ delete_WV( wv );
+
+ wsu->cache_addTo.inUse = 0;
+ wsu->cache_delFrom.inUse = 0;
+ wsu->cache_intersect.inUse = 0;
+ wsu->cache_minus.inUse = 0;
+}
+
Bool HG_(plausibleWS) ( WordSetU* wsu, WordSet ws )
{
if (wsu == NULL) return False;
@@ -511,6 +599,7 @@
VG_(printf)(" isSingleton %10lu\n", wsu->n_isSingleton);
VG_(printf)(" anyElementOf %10lu\n", wsu->n_anyElementOf);
VG_(printf)(" isSubsetOf %10lu\n", wsu->n_isSubsetOf);
+ VG_(printf)(" dieWS %10lu\n", wsu->n_die);
}
WordSet HG_(addToWS) ( WordSetU* wsu, WordSet ws, UWord w )
Modified: trunk/helgrind/hg_wordset.h
===================================================================
--- trunk/helgrind/hg_wordset.h 2011-10-22 16:29:11 UTC (rev 12200)
+++ trunk/helgrind/hg_wordset.h 2011-10-22 19:29:51 UTC (rev 12201)
@@ -55,7 +55,8 @@
/* Free up the WordSetU. */
void HG_(deleteWordSetU) ( WordSetU* );
-/* Get the number of elements in this WordSetU. */
+/* Get the number of elements in this WordSetU. Note that the dead
+ WordSet are included in the WordSetU number of elements. */
UWord HG_(cardinalityWSU) ( WordSetU* );
/* Show performance stats for this WordSetU. */
@@ -82,13 +83,37 @@
WordSet HG_(isSubsetOf) ( WordSetU*, WordSet, WordSet );
Bool HG_(plausibleWS) ( WordSetU*, WordSet );
+
+
Bool HG_(saneWS_SLOW) ( WordSetU*, WordSet );
void HG_(ppWS) ( WordSetU*, WordSet );
+
void HG_(getPayloadWS) ( /*OUT*/UWord** words, /*OUT*/UWord* nWords,
WordSetU*, WordSet );
+/* HG_(dieWS) indicates WordSet is not used/not referenced anymore,
+ and its memory can be reclaimed.
+ If ever a WordSet with the same content would be needed again,
+ a new WordSet will be reallocated.
+ BUG ALERT: !!! Using HG_(dieWS) on a WSU introduces a risk of
+ dangling references. Dangling references can be created by keeping
+ a ws after having marked it dead. This ws (just an index in
+ reality) will be re-cycled : a newly created wv can get the same
+ index. This implies that the wrong wv will be used if the
+ "old" ws has been kept.
+ Re-using a "dead" ws will be detected if the index has not been
+ re-cycled yet.
+
+ Another possibility of bug is to ask for the payload of a ws, and
+ then have this ws marked dead while the payload is still being
+ examined. This is a real dangling reference in free or re-allocated
+ memory. */
+void HG_(dieWS) ( WordSetU*, WordSet );
+
+
+
//------------------------------------------------------------------//
//--- end WordSet ---//
//--- Public Interface ---//
Modified: trunk/helgrind/tests/Makefile.am
===================================================================
--- trunk/helgrind/tests/Makefile.am 2011-10-22 16:29:11 UTC (rev 12200)
+++ trunk/helgrind/tests/Makefile.am 2011-10-22 19:29:51 UTC (rev 12201)
@@ -43,6 +43,7 @@
pth_spinlock.vgtest pth_spinlock.stdout.exp pth_spinlock.stderr.exp \
rwlock_race.vgtest rwlock_race.stdout.exp rwlock_race.stderr.exp \
rwlock_test.vgtest rwlock_test.stdout.exp rwlock_test.stderr.exp \
+ t2t_laog.vgtest t2t_laog.stdout.exp t2t_laog.stderr.exp \
tc01_simple_race.vgtest tc01_simple_race.stdout.exp \
tc01_simple_race.stderr.exp \
tc02_simple_tls.vgtest tc02_simple_tls.stdout.exp \
@@ -105,6 +106,7 @@
locked_vs_unlocked1 \
locked_vs_unlocked2 \
locked_vs_unlocked3 \
+ t2t \
tc01_simple_race \
tc02_simple_tls \
tc03_re_excl \
Added: trunk/helgrind/tests/t2t.c
===================================================================
--- trunk/helgrind/tests/t2t.c (rev 0)
+++ trunk/helgrind/tests/t2t.c 2011-10-22 19:29:51 UTC (rev 12201)
@@ -0,0 +1,125 @@
+#include <stdio.h>
+#include <pthread.h>
+#include <stdlib.h>
+#define MANY 1000
+#define LEVEL 100
+typedef struct {
+ pthread_mutex_t m[MANY];
+ pthread_mutex_t d;
+} Level;
+
+static Level level[LEVEL];
+
+static int stat_mutex_init = 0;
+static int stat_mutex_lock = 0;
+static int stat_mutex_unlock = 0;
+static int stat_mutex_destroy = 0;
+
+/* t2t.c : test program for the laog data structure performance testing
+ and "shaking" : it creates, locks/unlocks and destroy mutex.
+
+ USAGE: t2t [many] [level] [loops]
+ many (default 100) : how many locks are created/locked/unlocked at a certain level.
+ level (default 1) : how many levels of "nested locks" are done
+ loops : how many times these locks are created and destroyed and locked/unlocked) */
+#define check if (ret != 0) printf("error %d at line %d\n", ret, __LINE__)
+int doit(int argc, char*argv[])
+{
+ int l, i;
+ int ret;
+
+ int clo_many = 100;
+ int clo_level = 1;
+
+ if (argc >= 2) clo_many = atoi(argv[1]);
+ if (argc >= 3) clo_level = atoi(argv[2]);
+
+ if (clo_many > MANY) {
+ printf("error argv[1] (many arg) %d > max MANY %d\n", clo_many, MANY);
+ exit(1);
+ }
+
+ if (clo_level > LEVEL) {
+ printf("error argv[2] (level arg) %d > max LEVEL %d\n", clo_level, LEVEL);
+ exit(1);
+ }
+
+ printf ("many %d level %d total_locks: %d\n",
+ clo_many, clo_level,
+ clo_many * clo_level + clo_level * (clo_level == 1 ? 0 : 1));
+
+ for (l = 0; l < clo_level; l++) {
+ printf ("init level %d\n", l);
+ for (i = 0; i < clo_many; i++) {
+ ret = pthread_mutex_init (&level[l].m[i], NULL);
+ check;
+ stat_mutex_init++;
+ }
+ if (clo_level > 1) {
+ ret = pthread_mutex_init (&level[l].d, NULL);
+ check;
+ stat_mutex_init++;
+ }
+ }
+
+ for (l = 0; l < clo_level; l++) {
+ printf ("locking level %d\n", l);
+ for (i = 0; i < clo_many; i++) {
+ ret = pthread_mutex_lock (&level[l].m[i]);
+ check;
+ stat_mutex_lock++;
+ }
+ if (clo_level > 1) {
+ ret = pthread_mutex_lock (&level[l].d);
+ check;
+ stat_mutex_lock++;
+ }
+ }
+
+ for (l = 0; l < clo_level; l++) {
+ printf ("unlocking level %d\n", l);
+ for (i = 0; i < clo_many; i++) {
+ ret = pthread_mutex_unlock (&level[l].m[i]);
+ check;
+ stat_mutex_unlock++;
+ }
+ if (clo_level > 1) {
+ ret = pthread_mutex_unlock (&level[l].d);
+ stat_mutex_unlock++;
+ check;
+ }
+ }
+
+ for (l = 0; l < clo_level; l++) {
+ printf ("deleting level %d\n", l);
+ if (clo_level > 1) {
+ ret = pthread_mutex_destroy (&level[l].d);
+ /// this tests the influence of the deletion in another order.
+ check;
+ stat_mutex_destroy++;
+ }
+ for (i = 0; i < clo_many; i++) {
+ ret = pthread_mutex_destroy (&level[l].m[i]);
+ check;
+ stat_mutex_destroy++;
+ }
+ }
+ return 0;
+}
+
+int main(int argc, char*argv[])
+{
+ int loops = 1;
+ int i;
+ if (argc >= 4) loops = atoi(argv[3]);
+
+ printf ("loops %d\n", loops);
+ for (i = 0; i < loops; i++)
+ doit(argc, argv);
+
+ printf ("stats: init %d lock %d unlock %d destroy %d\n",
+ stat_mutex_init, stat_mutex_lock,
+ stat_mutex_unlock, stat_mutex_destroy);
+ return 0;
+}
+
Added: trunk/helgrind/tests/t2t_laog.stderr.exp
===================================================================
--- trunk/helgrind/tests/t2t_laog.stderr.exp (rev 0)
+++ trunk/helgrind/tests/t2t_laog.stderr.exp 2011-10-22 19:29:51 UTC (rev 12201)
@@ -0,0 +1,3 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Added: trunk/helgrind/tests/t2t_laog.stdout.exp
===================================================================
--- trunk/helgrind/tests/t2t_laog.stdout.exp (rev 0)
+++ trunk/helgrind/tests/t2t_laog.stdout.exp 2011-10-22 19:29:51 UTC (rev 12201)
@@ -0,0 +1,166 @@
+loops 4
+many 30 level 10 total_locks: 310
+init level 0
+init level 1
+init level 2
+init level 3
+init level 4
+init level 5
+init level 6
+init level 7
+init level 8
+init level 9
+locking level 0
+locking level 1
+locking level 2
+locking level 3
+locking level 4
+locking level 5
+locking level 6
+locking level 7
+locking level 8
+locking level 9
+unlocking level 0
+unlocking level 1
+unlocking level 2
+unlocking level 3
+unlocking level 4
+unlocking level 5
+unlocking level 6
+unlocking level 7
+unlocking level 8
+unlocking level 9
+deleting level 0
+deleting level 1
+deleting level 2
+deleting level 3
+deleting level 4
+deleting level 5
+deleting level 6
+deleting level 7
+deleting level 8
+deleting level 9
+many 30 level 10 total_locks: 310
+init level 0
+init level 1
+init level 2
+init level 3
+init level 4
+init level 5
+init level 6
+init level 7
+init level 8
+init level 9
+locking level 0
+locking level 1
+locking level 2
+locking level 3
+locking level 4
+locking level 5
+locking level 6
+locking level 7
+locking level 8
+locking level 9
+unlocking level 0
+unlocking level 1
+unlocking level 2
+unlocking level 3
+unlocking level 4
+unlocking level 5
+unlocking level 6
+unlocking level 7
+unlocking level 8
+unlocking level 9
+deleting level 0
+deleting level 1
+deleting level 2
+deleting level 3
+deleting level 4
+deleting level 5
+deleting level 6
+deleting level 7
+deleting level 8
+deleting level 9
+many 30 level 10 total_locks: 310
+init level 0
+init level 1
+init level 2
+init level 3
+init level 4
+init level 5
+init level 6
+init level 7
+init level 8
+init level 9
+locking level 0
+locking level 1
+locking level 2
+locking level 3
+locking level 4
+locking level 5
+locking level 6
+locking level 7
+locking level 8
+locking level 9
+unlocking level 0
+unlocking level 1
+unlocking level 2
+unlocking level 3
+unlocking level 4
+unlocking level 5
+unlocking level 6
+unlocking level 7
+unlocking level 8
+unlocking level 9
+deleting level 0
+deleting level 1
+deleting level 2
+deleting level 3
+deleting level 4
+deleting level 5
+deleting level 6
+deleting level 7
+deleting level 8
+deleting level 9
+many 30 level 10 total_locks: 310
+init level 0
+init level 1
+init level 2
+init level 3
+init level 4
+init level 5
+init level 6
+init level 7
+init level 8
+init level 9
+locking level 0
+locking level 1
+locking level 2
+locking level 3
+locking level 4
+locking level 5
+locking level 6
+locking level 7
+locking level 8
+locking level 9
+unlocking level 0
+unlocking level 1
+unlocking level 2
+unlocking level 3
+unlocking level 4
+unlocking level 5
+unlocking level 6
+unlocking level 7
+unlocking level 8
+unlocking level 9
+deleting level 0
+deleting level 1
+deleting level 2
+deleting level 3
+deleting level 4
+deleting level 5
+deleting level 6
+deleting level 7
+deleting level 8
+deleting level 9
+stats: init 1240 lock 1240 unlock 1240 destroy 1240
Added: trunk/helgrind/tests/t2t_laog.vgtest
===================================================================
--- trunk/helgrind/tests/t2t_laog.vgtest (rev 0)
+++ trunk/helgrind/tests/t2t_laog.vgtest 2011-10-22 19:29:51 UTC (rev 12201)
@@ -0,0 +1,4 @@
+# performance test for a big laog graph + shake the add/del
+# in the laog data structure.
+prog: t2t
+args: 30 10 4
|
|
From: <sv...@va...> - 2011-10-22 16:33:55
|
Author: bart
Date: 2011-10-22 17:29:11 +0100 (Sat, 22 Oct 2011)
New Revision: 12200
Log:
Add a custom filter for the drd/tests/annotate_barrier_xml regression test
Added:
trunk/drd/tests/filter_annotate_barrier_xml
Modified:
trunk/drd/tests/Makefile.am
trunk/drd/tests/annotate_barrier_xml.stderr.exp
trunk/drd/tests/annotate_barrier_xml.vgtest
Modified: trunk/drd/tests/Makefile.am
===================================================================
--- trunk/drd/tests/Makefile.am 2011-10-22 15:04:05 UTC (rev 12199)
+++ trunk/drd/tests/Makefile.am 2011-10-22 16:29:11 UTC (rev 12200)
@@ -3,6 +3,7 @@
dist_noinst_SCRIPTS = \
compare_error_count_with \
+ filter_annotate_barrier_xml \
filter_error_count \
filter_error_summary \
filter_stderr \
Modified: trunk/drd/tests/annotate_barrier_xml.stderr.exp
===================================================================
--- trunk/drd/tests/annotate_barrier_xml.stderr.exp 2011-10-22 15:04:05 UTC (rev 12199)
+++ trunk/drd/tests/annotate_barrier_xml.stderr.exp 2011-10-22 16:29:11 UTC (rev 12200)
@@ -189,9 +189,6 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
- <dir>...</dir>
- <file>pthread_create.c</file>
- <line>...</line>
</frame>
</stack>
<auxwhat>Address 0x........ is at offset 0 from 0x.........</auxwhat>
Modified: trunk/drd/tests/annotate_barrier_xml.vgtest
===================================================================
--- trunk/drd/tests/annotate_barrier_xml.vgtest 2011-10-22 15:04:05 UTC (rev 12199)
+++ trunk/drd/tests/annotate_barrier_xml.vgtest 2011-10-22 16:29:11 UTC (rev 12200)
@@ -1,4 +1,4 @@
prereq: test -e annotate_barrier && ./supported_libpthread
vgopts: --read-var-info=yes --check-stack-var=yes --show-confl-seg=no --num-callers=3 --xml=yes --xml-fd=2
prog: annotate_barrier 2 1 1
-stderr_filter: ../../memcheck/tests/filter_xml
+stderr_filter: filter_annotate_barrier_xml
Added: trunk/drd/tests/filter_annotate_barrier_xml
===================================================================
--- trunk/drd/tests/filter_annotate_barrier_xml (rev 0)
+++ trunk/drd/tests/filter_annotate_barrier_xml 2011-10-22 16:29:11 UTC (rev 12200)
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Remove the three lines after "<fn>start_thread</fn>" if these start with
+# "<dir>...</dir>" since these last three lines are not generated on all
+# platforms.
+../../memcheck/tests/filter_xml |
+awk '{
+ if ($0 == " <fn>start_thread</fn>") {
+ line1 = $0
+ getline
+ if ($0 == " <dir>...</dir>") {
+ line2 = $0
+ getline
+ if ($0 == " <file>pthread_create.c</file>") {
+ line3 = $0
+ getline
+ if ($0 == " <line>...</line>") {
+ $0 = line1
+ } else {
+ print line1
+ print line2
+ print line3
+ }
+ } else {
+ print line1
+ print line2
+ }
+ } else {
+ print line1
+ }
+ }
+ print
+ }'
Property changes on: trunk/drd/tests/filter_annotate_barrier_xml
___________________________________________________________________
Name: svn:executable
+ *
|
|
From: Florian K. <br...@ac...> - 2011-10-22 15:57:16
|
On 10/19/2011 05:29 PM, Philippe Waroquiers wrote: > Have a naming convention for these files looks good. > >> I propose to name exp files like so: >> >> BASE.STREAM.exp[-PLATFORM[-FAILCODE][-REASON]] > > In the above, we have both . and - as separator, while - is also used > either in the platform (e.g. x86-linux) or in the test name (e.g. > threaded-fork.stderr.exp). > => It might be easier for possible automatic processing and/or ease of > wildcards > to systematically use the . to separate the pieces. > That is true. It will simplify things and that's good. > Wouldn't a more flexible format be needed ? I don't want to go there. As Bart has written in his reply testcases ought to be written such that they pass everywhere. That will not always be possible but we should strive towards that goal. Unless of course we're testing something platform-specific in which case the testcases should go into a subdirectory. In essence a platform-specific exp file is an exception and I rather not come up with a complex scheme to support it. > With the above it is e.g. > mandatory to give the platform for a kfail. Yes. I think that can be salvaged. We actually have a few .exp-kfail files already. > and if multiple platforms share the same output file, then we need > two (or more) identical files. > > So, maybe something like: > BASE.STREAM.exp[.[PLATFORM][.FAILCODE[.REASON]]] > > and then in PLATFORM, allows an "or" of platforms (with an _ to separate > them ?) > An empty PLATFORM (i.e. two successive . characters) would match any > platform. Not clear to me if you expect that the REASON can only be given > when a FAILCODE is given. The above assumes that. > There are currently only two testcases memcheck/tests/origin5-bz2 and memcheck/tests/partiallydefinedeq where this would be helpful. Not enough to get me excited about. >> vg_regtest would attempt to match in this order: >> >> foo.stderr.exp-x86-linux.* >> foo.stderr.exp-x86-* >> foo.stderr.exp-32bit-* > 32bit is not one of the PLATFORM values above. I guess such 'generic' > platforms > is however needed. vg_regtest will have the knowledge to translate a > specific > platform in one or more of such generic platforms. > Yes, right. >> foo.stderr.exp-* > I do not understand the matching logic and how you will avoid false > positive. > This last line will e.g. match foo.stderr:exp-ARM. > And on linux, foo.stderr.exp-x86-* will match foo.stderr.exp-x86-darwin > I think this will be resolved by adopting your suggestion from above, i.e. using '.' as separators. I was planning to do that. > >> There is still a possibility for false positives in the case where >> there are several exp files that differ only in the REASON code. To >> handle that properly we would have to formalize the REASON code. >> I have no plans to do that as this happens rarely. > I am not sure to understand the concept of false positive you are > looking at > (mentionned here, but also at the begin of the proposal). > ...snip... > I do not understand this second "false positive" concept: > Imagine that I have a test which (for bad reasons, but let's assume not > easy to fix) > can give randomly two outputs: > foo.stderr.exp-x86-linux-kfail-notfixablebehaviour1 > foo.stderr.exp-x86-linux-kfail-notfixablebehaviour2 > The above only differs in the REASON code. Why/how can this give a false > positive ? A test that gives random outputs (i.e. behaves non-deterministically) should not be in the test suite to begin with. Now suppose the output is deterministic and you're running the tests on two x86-linux based platforms P1 and P2. On P1 the output is foo.stderr.exp-x86-linux-kfail-notfixablebehaviour1. On P2 the output is foo.stderr.exp-x86-linux-kfail-notfixablebehaviour2. We cannot express that pairing today and the proposal provides no machinery to do that. All we can do is to compare the stderr.out file against all provided stderr.exp files (here ...-notfixablebehaviour1 and ...-notfixablebehaviour2). Should stderr.out from running on P1 match foo.stderr.exp-x86-linux-kfail-notfixablebehaviour2 we would report that as a passing testcase. But it isn't. Hence a false positive. Florian |
|
From: <sv...@va...> - 2011-10-22 15:08:50
|
Author: florian
Date: 2011-10-22 16:04:05 +0100 (Sat, 22 Oct 2011)
New Revision: 12199
Log:
Make VALGRIND_DO_CLIENT_REQUEST more user friendly by wrapping
its replacement in do .. while (0).
Modified:
trunk/include/valgrind.h
Modified: trunk/include/valgrind.h
===================================================================
--- trunk/include/valgrind.h 2011-10-22 14:38:47 UTC (rev 12198)
+++ trunk/include/valgrind.h 2011-10-22 15:04:05 UTC (rev 12199)
@@ -164,9 +164,9 @@
#define VALGRIND_DO_CLIENT_REQUEST(_zzq_rlval, _zzq_default, \
_zzq_request, _zzq_arg1, _zzq_arg2, \
_zzq_arg3, _zzq_arg4, _zzq_arg5) \
- { (_zzq_rlval) = VALGRIND_DO_CLIENT_REQUEST_EXPR((_zzq_default), \
+ do { (_zzq_rlval) = VALGRIND_DO_CLIENT_REQUEST_EXPR((_zzq_default), \
(_zzq_request), (_zzq_arg1), (_zzq_arg2), \
- (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); }
+ (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0)
#if defined(NVALGRIND)
|
|
From: <sv...@va...> - 2011-10-22 14:43:31
|
Author: bart
Date: 2011-10-22 15:38:47 +0100 (Sat, 22 Oct 2011)
New Revision: 12198
Log:
Revert r12195 because it triggers suspicious error messages on systems where
libtool has not been installed:
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 196.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 196.
Modified:
trunk/autogen.sh
Modified: trunk/autogen.sh
===================================================================
--- trunk/autogen.sh 2011-10-22 13:45:49 UTC (rev 12197)
+++ trunk/autogen.sh 2011-10-22 14:38:47 UTC (rev 12198)
@@ -1,3 +1,17 @@
#!/bin/sh
-autoreconf -ivf
+run ()
+{
+ echo "running: $*"
+ eval $*
+
+ if test $? != 0 ; then
+ echo "error: while running '$*'"
+ exit 1
+ fi
+}
+
+run aclocal
+run autoheader
+run automake -a
+run autoconf
|
|
From: Florian K. <br...@ac...> - 2011-10-22 14:18:06
|
On 10/22/2011 06:39 AM, sv...@va... wrote: > Author: bart > Date: 2011-10-22 11:39:43 +0100 (Sat, 22 Oct 2011) > New Revision: 12195 > > Log: > autogen.sh: Use autoreconf as recommended in the autoconf manual > It may be recommended but it isn't creating confidence: Checked out revision 12197. florian@ds9:/tmp> cd valgrind/ florian@ds9:/tmp/valgrind> ./autogen.sh Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 196. Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 196. autoreconf: Entering directory `.' autoreconf: configure.in: not using Gettext ...... I have: automake (GNU automake) 1.11.1 autoconf (GNU Autoconf) 2.67 on Ubuntu 10.10 Running configure succeeds and "make" seems to work as well. Remind me why these changes to the build system were necessary. Florian |
|
From: Florian K. <br...@ac...> - 2011-10-22 14:02:16
|
On 10/21/2011 08:51 AM, Florian Krohm wrote: > On 10/21/2011 12:13 AM, Julian Seward wrote: >> On Thursday, October 20, 2011, Florian Krohm wrote: >>> On 10/20/2011 04:45 PM, Christian Borntraeger wrote: >>>>> +# Suppress warnings from Dwarf reader >>>>> +sed '/warning: evaluate_Dwarf3_Expr: unhandled DW_OP_/d' >>>> >> >> IIRC it was failing on DW_OP_piece (0x93 I think). This is related to >> variables that are partly in memory and partly in registers, eg a 64-bit >> value that has been partially spilled on a 32-bit CPU. The current >> infrastructure cannot represent them. For sure, hiding error messages >> with other DW_OP_ values isn't good, since we'll need to support them >> at some point (as Christian implies). >> > > I'll open a bugzilla to remind us of improving the dwarf machinery in > this respect and mention the suppression there, so it can be undone and > won't be forgotten. > He he, we already have a bug for that: #185801 opened 2009-02-28 I've added a comment there. Florian |
|
From: <sv...@va...> - 2011-10-22 13:50:33
|
Author: bart Date: 2011-10-22 14:45:49 +0100 (Sat, 22 Oct 2011) New Revision: 12197 Log: Remove the ppc-cross directory because the scripts in it are not fully functional Removed: trunk/drd/scripts/ppc-cross/ |
|
From: <sv...@va...> - 2011-10-22 10:45:07
|
Author: bart Date: 2011-10-22 11:40:21 +0100 (Sat, 22 Oct 2011) New Revision: 12196 Log: Update Subversion ignore list Modified: trunk/memcheck/tests/amd64/ Property changes on: trunk/memcheck/tests/amd64 ___________________________________________________________________ Name: svn:ignore - *.diff *.dSYM *.out .deps bt_everything bug132146 defcfaexpr fxsave-amd64 int3-amd64 Makefile Makefile.in more_x87_fp sse_memory xor-undef-amd64 + *.diff *.dSYM *.out .deps bt_everything bug132146 bug279698 defcfaexpr fxsave-amd64 int3-amd64 Makefile Makefile.in more_x87_fp sse_memory xor-undef-amd64 |
|
From: <sv...@va...> - 2011-10-22 10:44:27
|
Author: bart
Date: 2011-10-22 11:39:43 +0100 (Sat, 22 Oct 2011)
New Revision: 12195
Log:
autogen.sh: Use autoreconf as recommended in the autoconf manual
Modified:
trunk/autogen.sh
Modified: trunk/autogen.sh
===================================================================
--- trunk/autogen.sh 2011-10-22 09:55:37 UTC (rev 12194)
+++ trunk/autogen.sh 2011-10-22 10:39:43 UTC (rev 12195)
@@ -1,17 +1,3 @@
#!/bin/sh
-run ()
-{
- echo "running: $*"
- eval $*
-
- if test $? != 0 ; then
- echo "error: while running '$*'"
- exit 1
- fi
-}
-
-run aclocal
-run autoheader
-run automake -a
-run autoconf
+autoreconf -ivf
|
|
From: <sv...@va...> - 2011-10-22 10:00:21
|
Author: sewardj
Date: 2011-10-22 10:55:37 +0100 (Sat, 22 Oct 2011)
New Revision: 12194
Log:
Add an excessively minimal testcase, from #279698, pertaining to the
propagation of V bits through saturated narrowing operations.
Added:
trunk/memcheck/tests/amd64/bug279698.c
trunk/memcheck/tests/amd64/bug279698.stderr.exp
trunk/memcheck/tests/amd64/bug279698.stdout.exp
trunk/memcheck/tests/amd64/bug279698.vgtest
Modified:
trunk/memcheck/tests/amd64/Makefile.am
Modified: trunk/memcheck/tests/amd64/Makefile.am
===================================================================
--- trunk/memcheck/tests/amd64/Makefile.am 2011-10-22 09:46:16 UTC (rev 12193)
+++ trunk/memcheck/tests/amd64/Makefile.am 2011-10-22 09:55:37 UTC (rev 12194)
@@ -12,6 +12,7 @@
bt_everything.stderr.exp bt_everything.stdout.exp \
bt_everything.vgtest \
bug132146.vgtest bug132146.stderr.exp bug132146.stdout.exp \
+ bug279698.vgtest bug279698.stderr.exp bug279698.stdout.exp \
fxsave-amd64.vgtest fxsave-amd64.stdout.exp fxsave-amd64.stderr.exp \
more_x87_fp.stderr.exp more_x87_fp.stdout.exp more_x87_fp.vgtest \
sse_memory.stderr.exp sse_memory.stdout.exp sse_memory.vgtest \
@@ -21,6 +22,7 @@
check_PROGRAMS = \
bt_everything \
bug132146 \
+ bug279698 \
fxsave-amd64 \
more_x87_fp \
sse_memory \
Added: trunk/memcheck/tests/amd64/bug279698.c
===================================================================
--- trunk/memcheck/tests/amd64/bug279698.c (rev 0)
+++ trunk/memcheck/tests/amd64/bug279698.c 2011-10-22 09:55:37 UTC (rev 12194)
@@ -0,0 +1,27 @@
+/* A very trivial test for undefinedness propagation through
+ saturating narrowing. Obviously need a much more thorough test.
+*/
+#include <stdio.h>
+#include <assert.h>
+#include "../../memcheck.h"
+int main()
+{
+ unsigned char data[32], vbits[32];
+ __asm__ __volatile__
+ ("movdqu (%0), %%xmm0 \n"
+ "packuswb %%xmm0, %%xmm0 \n"
+ "movdqu %%xmm0, 16(%0) \n"
+ ::"r"(data)
+ :"memory","xmm0"
+ );
+ unsigned int res =
+ VALGRIND_GET_VBITS( data, vbits, 32 );
+ assert(res == 1); /* 1 == success */
+ int i, j;
+ for(i=0; i<2; i++) {
+ for(j=0; j<16; j++)
+ printf("%02x ", vbits[i*16+j]);
+ printf("\n");
+ }
+ return 0;
+}
Added: trunk/memcheck/tests/amd64/bug279698.stderr.exp
===================================================================
Added: trunk/memcheck/tests/amd64/bug279698.stdout.exp
===================================================================
--- trunk/memcheck/tests/amd64/bug279698.stdout.exp (rev 0)
+++ trunk/memcheck/tests/amd64/bug279698.stdout.exp 2011-10-22 09:55:37 UTC (rev 12194)
@@ -0,0 +1,2 @@
+ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Added: trunk/memcheck/tests/amd64/bug279698.vgtest
===================================================================
--- trunk/memcheck/tests/amd64/bug279698.vgtest (rev 0)
+++ trunk/memcheck/tests/amd64/bug279698.vgtest 2011-10-22 09:55:37 UTC (rev 12194)
@@ -0,0 +1,2 @@
+prog: bug279698
+vgopts: -q
|
|
From: <sv...@va...> - 2011-10-22 09:51:02
|
Author: bart
Date: 2011-10-22 10:46:16 +0100 (Sat, 22 Oct 2011)
New Revision: 12193
Log:
configure.in: Rearranged the TLS test such that autoreconf doesn't complain about it
Modified:
trunk/configure.in
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2011-10-22 09:42:05 UTC (rev 12192)
+++ trunk/configure.in 2011-10-22 09:46:16 UTC (rev 12193)
@@ -1555,27 +1555,22 @@
# when building the tool executables. I think we should get rid of it.
#
# Check for TLS support in the compiler and linker
-if test "x${cross_compiling}" = "xno"; then
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
+ [[return foo;]])],
+ [vg_cv_linktime_tls=yes],
+ [vg_cv_linktime_tls=no])
# Native compilation: check whether running a program using TLS succeeds.
# Linking only is not sufficient -- e.g. on Red Hat 7.3 linking TLS programs
# succeeds but running programs using TLS fails.
+# Cross-compiling: check whether linking a program using TLS succeeds.
AC_CACHE_CHECK([for TLS support], vg_cv_tls,
[AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
[vg_cv_tls=$enableval],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
[[return foo;]])],
[vg_cv_tls=yes],
- [vg_cv_tls=no])])])
-else
-# Cross-compiling: check whether linking a program using TLS succeeds.
-AC_CACHE_CHECK([for TLS support], vg_cv_tls,
- [AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
- [vg_cv_tls=$enableval],
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
- [[return foo;]])],
- [vg_cv_tls=yes],
- [vg_cv_tls=no])])])
-fi
+ [vg_cv_tls=no],
+ [vg_cv_tls=$vg_cv_linktime_tls])])])
if test "$vg_cv_tls" = yes; then
AC_DEFINE([HAVE_TLS], 1, [can use __thread to define thread-local variables])
|
|
From: <sv...@va...> - 2011-10-22 09:46:49
|
Author: bart
Date: 2011-10-22 10:42:05 +0100 (Sat, 22 Oct 2011)
New Revision: 12192
Log:
Fix a compiler warning introduced in r12188
Modified:
trunk/coregrind/m_main.c
Modified: trunk/coregrind/m_main.c
===================================================================
--- trunk/coregrind/m_main.c 2011-10-22 09:35:33 UTC (rev 12191)
+++ trunk/coregrind/m_main.c 2011-10-22 09:42:05 UTC (rev 12192)
@@ -1060,7 +1060,7 @@
UInt (*umsg_or_xml)( const HChar*, ... )
= VG_(clo_xml) ? VG_(printf_xml) : VG_(umsg);
- UInt (*umsg_or_xml_arg)( const HChar* )
+ void (*umsg_or_xml_arg)( const Char* )
= VG_(clo_xml) ? xml_arg : umsg_arg;
vg_assert( VG_(args_for_client) );
|
|
From: <sv...@va...> - 2011-10-22 09:40:17
|
Author: sewardj Date: 2011-10-22 10:35:33 +0100 (Sat, 22 Oct 2011) New Revision: 12191 Log: Record the ELF x86 regparm registers. Modified: trunk/docs/internals/register-uses.txt Modified: trunk/docs/internals/register-uses.txt =================================================================== --- trunk/docs/internals/register-uses.txt 2011-10-22 09:29:41 UTC (rev 12190) +++ trunk/docs/internals/register-uses.txt 2011-10-22 09:35:33 UTC (rev 12191) @@ -24,7 +24,10 @@ st1-7 n ? n y xmm0-7 n ? n y +In the case where arguments are passed in registers, the arg1,2,3 +registers are EAX, EDX, and ECX respectively. + amd64-linux ~~~~~~~~~~~ |
|
From: <sv...@va...> - 2011-10-22 09:37:02
|
Author: sewardj
Date: 2011-10-22 10:32:16 +0100 (Sat, 22 Oct 2011)
New Revision: 2223
Log:
VEX side fixes to match r12190, which is a fix for #279698 (incorrect
Memcheck handling of saturating narrowing operations.)
Modified:
trunk/priv/host_amd64_isel.c
trunk/priv/host_generic_simd128.c
trunk/priv/host_generic_simd128.h
trunk/priv/host_generic_simd64.c
trunk/priv/host_generic_simd64.h
trunk/priv/host_x86_isel.c
trunk/priv/ir_defs.c
trunk/pub/libvex_ir.h
Modified: trunk/priv/host_amd64_isel.c
===================================================================
--- trunk/priv/host_amd64_isel.c 2011-10-20 21:15:55 UTC (rev 2222)
+++ trunk/priv/host_amd64_isel.c 2011-10-22 09:32:16 UTC (rev 2223)
@@ -1100,6 +1100,10 @@
fn = (HWord)h_generic_calc_QNarrowBin16Sto8Sx8; break;
case Iop_QNarrowBin16Sto8Ux8:
fn = (HWord)h_generic_calc_QNarrowBin16Sto8Ux8; break;
+ case Iop_NarrowBin16to8x8:
+ fn = (HWord)h_generic_calc_NarrowBin16to8x8; break;
+ case Iop_NarrowBin32to16x4:
+ fn = (HWord)h_generic_calc_NarrowBin32to16x4; break;
case Iop_QSub8Sx8:
fn = (HWord)h_generic_calc_QSub8Sx8; break;
@@ -3665,6 +3669,12 @@
case Iop_QNarrowBin32Sto16Ux8:
fn = (HWord)h_generic_calc_QNarrowBin32Sto16Ux8;
goto do_SseAssistedBinary;
+ case Iop_NarrowBin16to8x16:
+ fn = (HWord)h_generic_calc_NarrowBin16to8x16;
+ goto do_SseAssistedBinary;
+ case Iop_NarrowBin32to16x8:
+ fn = (HWord)h_generic_calc_NarrowBin32to16x8;
+ goto do_SseAssistedBinary;
do_SseAssistedBinary: {
/* RRRufff! RRRufff code is what we're generating here. Oh
well. */
Modified: trunk/priv/host_generic_simd128.c
===================================================================
--- trunk/priv/host_generic_simd128.c 2011-10-20 21:15:55 UTC (rev 2222)
+++ trunk/priv/host_generic_simd128.c 2011-10-22 09:32:16 UTC (rev 2223)
@@ -118,7 +118,19 @@
return (UShort)xx;
}
-void h_generic_calc_Mul32x4 ( /*OUT*/V128* res,
+static inline UShort narrow32to16 ( UInt xx )
+{
+ return (UShort)xx;
+}
+
+static inline UChar narrow16to8 ( UShort xx )
+{
+ return (UChar)xx;
+}
+
+
+void VEX_REGPARM(3)
+ h_generic_calc_Mul32x4 ( /*OUT*/V128* res,
V128* argL, V128* argR )
{
res->w32[0] = mul32(argL->w32[0], argR->w32[0]);
@@ -127,7 +139,8 @@
res->w32[3] = mul32(argL->w32[3], argR->w32[3]);
}
-void h_generic_calc_Max32Sx4 ( /*OUT*/V128* res,
+void VEX_REGPARM(3)
+ h_generic_calc_Max32Sx4 ( /*OUT*/V128* res,
V128* argL, V128* argR )
{
res->w32[0] = max32S(argL->w32[0], argR->w32[0]);
@@ -136,7 +149,8 @@
res->w32[3] = max32S(argL->w32[3], argR->w32[3]);
}
-void h_generic_calc_Min32Sx4 ( /*OUT*/V128* res,
+void VEX_REGPARM(3)
+ h_generic_calc_Min32Sx4 ( /*OUT*/V128* res,
V128* argL, V128* argR )
{
res->w32[0] = min32S(argL->w32[0], argR->w32[0]);
@@ -145,7 +159,8 @@
res->w32[3] = min32S(argL->w32[3], argR->w32[3]);
}
-void h_generic_calc_Max32Ux4 ( /*OUT*/V128* res,
+void VEX_REGPARM(3)
+ h_generic_calc_Max32Ux4 ( /*OUT*/V128* res,
V128* argL, V128* argR )
{
res->w32[0] = max32U(argL->w32[0], argR->w32[0]);
@@ -154,7 +169,8 @@
res->w32[3] = max32U(argL->w32[3], argR->w32[3]);
}
-void h_generic_calc_Min32Ux4 ( /*OUT*/V128* res,
+void VEX_REGPARM(3)
+ h_generic_calc_Min32Ux4 ( /*OUT*/V128* res,
V128* argL, V128* argR )
{
res->w32[0] = min32U(argL->w32[0], argR->w32[0]);
@@ -163,7 +179,8 @@
res->w32[3] = min32U(argL->w32[3], argR->w32[3]);
}
-void h_generic_calc_Max16Ux8 ( /*OUT*/V128* res,
+void VEX_REGPARM(3)
+ h_generic_calc_Max16Ux8 ( /*OUT*/V128* res,
V128* argL, V128* argR )
{
res->w16[0] = max16U(argL->w16[0], argR->w16[0]);
@@ -176,7 +193,8 @@
res->w16[7] = max16U(argL->w16[7], argR->w16[7]);
}
-void h_generic_calc_Min16Ux8 ( /*OUT*/V128* res,
+void VEX_REGPARM(3)
+ h_generic_calc_Min16Ux8 ( /*OUT*/V128* res,
V128* argL, V128* argR )
{
res->w16[0] = min16U(argL->w16[0], argR->w16[0]);
@@ -189,7 +207,8 @@
res->w16[7] = min16U(argL->w16[7], argR->w16[7]);
}
-void h_generic_calc_Max8Sx16 ( /*OUT*/V128* res,
+void VEX_REGPARM(3)
+ h_generic_calc_Max8Sx16 ( /*OUT*/V128* res,
V128* argL, V128* argR )
{
res->w8[ 0] = max8S(argL->w8[ 0], argR->w8[ 0]);
@@ -210,7 +229,8 @@
res->w8[15] = max8S(argL->w8[15], argR->w8[15]);
}
-void h_generic_calc_Min8Sx16 ( /*OUT*/V128* res,
+void VEX_REGPARM(3)
+ h_generic_calc_Min8Sx16 ( /*OUT*/V128* res,
V128* argL, V128* argR )
{
res->w8[ 0] = min8S(argL->w8[ 0], argR->w8[ 0]);
@@ -231,14 +251,16 @@
res->w8[15] = min8S(argL->w8[15], argR->w8[15]);
}
-void h_generic_calc_CmpEQ64x2 ( /*OUT*/V128* res,
+void VEX_REGPARM(3)
+ h_generic_calc_CmpEQ64x2 ( /*OUT*/V128* res,
V128* argL, V128* argR )
{
res->w64[0] = cmpEQ64(argL->w64[0], argR->w64[0]);
res->w64[1] = cmpEQ64(argL->w64[1], argR->w64[1]);
}
-void h_generic_calc_CmpGT64Sx2 ( /*OUT*/V128* res,
+void VEX_REGPARM(3)
+ h_generic_calc_CmpGT64Sx2 ( /*OUT*/V128* res,
V128* argL, V128* argR )
{
res->w64[0] = cmpGT64S(argL->w64[0], argR->w64[0]);
@@ -252,7 +274,8 @@
semantics of these primops (Sar64x2, etc) it is an error if in
fact we are ever given an out-of-range shift amount.
*/
-void h_generic_calc_SarN64x2 ( /*OUT*/V128* res,
+void /*not-regparm*/
+ h_generic_calc_SarN64x2 ( /*OUT*/V128* res,
V128* argL, UInt nn)
{
/* vassert(nn < 64); */
@@ -261,7 +284,8 @@
res->w64[1] = sar64(argL->w64[1], nn);
}
-void h_generic_calc_SarN8x16 ( /*OUT*/V128* res,
+void /*not-regparm*/
+ h_generic_calc_SarN8x16 ( /*OUT*/V128* res,
V128* argL, UInt nn)
{
/* vassert(nn < 8); */
@@ -284,7 +308,8 @@
res->w8[15] = sar8(argL->w8[15], nn);
}
-void h_generic_calc_QNarrowBin32Sto16Ux8 ( /*OUT*/V128* res,
+void VEX_REGPARM(3)
+ h_generic_calc_QNarrowBin32Sto16Ux8 ( /*OUT*/V128* res,
V128* argL, V128* argR )
{
res->w16[0] = qnarrow32Sto16U(argR->w32[0]);
@@ -297,7 +322,43 @@
res->w16[7] = qnarrow32Sto16U(argL->w32[3]);
}
+void VEX_REGPARM(3)
+ h_generic_calc_NarrowBin16to8x16 ( /*OUT*/V128* res,
+ V128* argL, V128* argR )
+{
+ res->w8[ 0] = narrow16to8(argR->w16[0]);
+ res->w8[ 1] = narrow16to8(argR->w16[1]);
+ res->w8[ 2] = narrow16to8(argR->w16[2]);
+ res->w8[ 3] = narrow16to8(argR->w16[3]);
+ res->w8[ 4] = narrow16to8(argR->w16[4]);
+ res->w8[ 5] = narrow16to8(argR->w16[5]);
+ res->w8[ 6] = narrow16to8(argR->w16[6]);
+ res->w8[ 7] = narrow16to8(argR->w16[7]);
+ res->w8[ 8] = narrow16to8(argL->w16[0]);
+ res->w8[ 9] = narrow16to8(argL->w16[1]);
+ res->w8[10] = narrow16to8(argL->w16[2]);
+ res->w8[11] = narrow16to8(argL->w16[3]);
+ res->w8[12] = narrow16to8(argL->w16[4]);
+ res->w8[13] = narrow16to8(argL->w16[5]);
+ res->w8[14] = narrow16to8(argL->w16[6]);
+ res->w8[15] = narrow16to8(argL->w16[7]);
+}
+void VEX_REGPARM(3)
+ h_generic_calc_NarrowBin32to16x8 ( /*OUT*/V128* res,
+ V128* argL, V128* argR )
+{
+ res->w16[0] = narrow32to16(argR->w32[0]);
+ res->w16[1] = narrow32to16(argR->w32[1]);
+ res->w16[2] = narrow32to16(argR->w32[2]);
+ res->w16[3] = narrow32to16(argR->w32[3]);
+ res->w16[4] = narrow32to16(argL->w32[0]);
+ res->w16[5] = narrow32to16(argL->w32[1]);
+ res->w16[6] = narrow32to16(argL->w32[2]);
+ res->w16[7] = narrow32to16(argL->w32[3]);
+}
+
+
/*---------------------------------------------------------------*/
/*--- end host_generic_simd128.c ---*/
/*---------------------------------------------------------------*/
Modified: trunk/priv/host_generic_simd128.h
===================================================================
--- trunk/priv/host_generic_simd128.h 2011-10-20 21:15:55 UTC (rev 2222)
+++ trunk/priv/host_generic_simd128.h 2011-10-22 09:32:16 UTC (rev 2223)
@@ -45,27 +45,44 @@
#include "libvex_basictypes.h"
-/* DO NOT MAKE THESE INTO REGPARM FNS! THIS WILL BREAK CALLING
- SEQUENCES GENERATED BY host-x86/isel.c. */
+extern VEX_REGPARM(3)
+ void h_generic_calc_Mul32x4 ( /*OUT*/V128*, V128*, V128* );
+extern VEX_REGPARM(3)
+ void h_generic_calc_Max32Sx4 ( /*OUT*/V128*, V128*, V128* );
+extern VEX_REGPARM(3)
+ void h_generic_calc_Min32Sx4 ( /*OUT*/V128*, V128*, V128* );
+extern VEX_REGPARM(3)
+ void h_generic_calc_Max32Ux4 ( /*OUT*/V128*, V128*, V128* );
+extern VEX_REGPARM(3)
+ void h_generic_calc_Min32Ux4 ( /*OUT*/V128*, V128*, V128* );
+extern VEX_REGPARM(3)
+ void h_generic_calc_Max16Ux8 ( /*OUT*/V128*, V128*, V128* );
+extern VEX_REGPARM(3)
+ void h_generic_calc_Min16Ux8 ( /*OUT*/V128*, V128*, V128* );
+extern VEX_REGPARM(3)
+ void h_generic_calc_Max8Sx16 ( /*OUT*/V128*, V128*, V128* );
+extern VEX_REGPARM(3)
+ void h_generic_calc_Min8Sx16 ( /*OUT*/V128*, V128*, V128* );
+extern VEX_REGPARM(3)
+ void h_generic_calc_CmpEQ64x2 ( /*OUT*/V128*, V128*, V128* );
+extern VEX_REGPARM(3)
+ void h_generic_calc_CmpGT64Sx2 ( /*OUT*/V128*, V128*, V128* );
-extern void h_generic_calc_Mul32x4 ( /*OUT*/V128*, V128*, V128* );
-extern void h_generic_calc_Max32Sx4 ( /*OUT*/V128*, V128*, V128* );
-extern void h_generic_calc_Min32Sx4 ( /*OUT*/V128*, V128*, V128* );
-extern void h_generic_calc_Max32Ux4 ( /*OUT*/V128*, V128*, V128* );
-extern void h_generic_calc_Min32Ux4 ( /*OUT*/V128*, V128*, V128* );
-extern void h_generic_calc_Max16Ux8 ( /*OUT*/V128*, V128*, V128* );
-extern void h_generic_calc_Min16Ux8 ( /*OUT*/V128*, V128*, V128* );
-extern void h_generic_calc_Max8Sx16 ( /*OUT*/V128*, V128*, V128* );
-extern void h_generic_calc_Min8Sx16 ( /*OUT*/V128*, V128*, V128* );
-extern void h_generic_calc_CmpEQ64x2 ( /*OUT*/V128*, V128*, V128* );
-extern void h_generic_calc_CmpGT64Sx2 ( /*OUT*/V128*, V128*, V128* );
-extern void h_generic_calc_SarN64x2 ( /*OUT*/V128*, V128*, UInt );
-extern void h_generic_calc_SarN8x16 ( /*OUT*/V128*, V128*, UInt );
+extern /*not-regparm*/
+ void h_generic_calc_SarN64x2 ( /*OUT*/V128*, V128*, UInt );
+extern /*not-regparm*/
+ void h_generic_calc_SarN8x16 ( /*OUT*/V128*, V128*, UInt );
-extern void h_generic_calc_QNarrowBin32Sto16Ux8
+extern VEX_REGPARM(3)
+ void h_generic_calc_QNarrowBin32Sto16Ux8
( /*OUT*/V128*, V128*, V128* );
+extern VEX_REGPARM(3)
+ void h_generic_calc_NarrowBin16to8x16
+ ( /*OUT*/V128*, V128*, V128* );
+extern VEX_REGPARM(3)
+ void h_generic_calc_NarrowBin32to16x8
+ ( /*OUT*/V128*, V128*, V128* );
-
#endif /* ndef __VEX_HOST_GENERIC_SIMD128_H */
/*---------------------------------------------------------------*/
Modified: trunk/priv/host_generic_simd64.c
===================================================================
--- trunk/priv/host_generic_simd64.c 2011-10-20 21:15:55 UTC (rev 2222)
+++ trunk/priv/host_generic_simd64.c 2011-10-22 09:32:16 UTC (rev 2223)
@@ -296,6 +296,16 @@
return (UChar)xx;
}
+static inline UShort narrow32to16 ( UInt xx )
+{
+ return (UShort)xx;
+}
+
+static inline UChar narrow16to8 ( UShort xx )
+{
+ return (UChar)xx;
+}
+
/* shifts: we don't care about out-of-range ones, since
that is dealt with at a higher level. */
@@ -817,6 +827,44 @@
);
}
+/* ------------ Truncating narrowing ------------ */
+
+ULong h_generic_calc_NarrowBin32to16x4 ( ULong aa, ULong bb )
+{
+ UInt d = sel32x2_1(aa);
+ UInt c = sel32x2_0(aa);
+ UInt b = sel32x2_1(bb);
+ UInt a = sel32x2_0(bb);
+ return mk16x4(
+ narrow32to16(d),
+ narrow32to16(c),
+ narrow32to16(b),
+ narrow32to16(a)
+ );
+}
+
+ULong h_generic_calc_NarrowBin16to8x8 ( ULong aa, ULong bb )
+{
+ UShort h = sel16x4_3(aa);
+ UShort g = sel16x4_2(aa);
+ UShort f = sel16x4_1(aa);
+ UShort e = sel16x4_0(aa);
+ UShort d = sel16x4_3(bb);
+ UShort c = sel16x4_2(bb);
+ UShort b = sel16x4_1(bb);
+ UShort a = sel16x4_0(bb);
+ return mk8x8(
+ narrow16to8(h),
+ narrow16to8(g),
+ narrow16to8(f),
+ narrow16to8(e),
+ narrow16to8(d),
+ narrow16to8(c),
+ narrow16to8(b),
+ narrow16to8(a)
+ );
+}
+
/* ------------ Interleaving ------------ */
ULong h_generic_calc_InterleaveHI8x8 ( ULong aa, ULong bb )
Modified: trunk/priv/host_generic_simd64.h
===================================================================
--- trunk/priv/host_generic_simd64.h 2011-10-20 21:15:55 UTC (rev 2222)
+++ trunk/priv/host_generic_simd64.h 2011-10-22 09:32:16 UTC (rev 2223)
@@ -90,6 +90,8 @@
extern ULong h_generic_calc_QNarrowBin32Sto16Sx4 ( ULong, ULong );
extern ULong h_generic_calc_QNarrowBin16Sto8Sx8 ( ULong, ULong );
extern ULong h_generic_calc_QNarrowBin16Sto8Ux8 ( ULong, ULong );
+extern ULong h_generic_calc_NarrowBin32to16x4 ( ULong, ULong );
+extern ULong h_generic_calc_NarrowBin16to8x8 ( ULong, ULong );
extern ULong h_generic_calc_InterleaveHI8x8 ( ULong, ULong );
extern ULong h_generic_calc_InterleaveLO8x8 ( ULong, ULong );
Modified: trunk/priv/host_x86_isel.c
===================================================================
--- trunk/priv/host_x86_isel.c 2011-10-20 21:15:55 UTC (rev 2222)
+++ trunk/priv/host_x86_isel.c 2011-10-22 09:32:16 UTC (rev 2223)
@@ -42,6 +42,7 @@
#include "main_globals.h"
#include "host_generic_regs.h"
#include "host_generic_simd64.h"
+#include "host_generic_simd128.h"
#include "host_x86_defs.h"
/* TODO 21 Apr 2005:
@@ -2392,6 +2393,10 @@
fn = (HWord)h_generic_calc_QNarrowBin16Sto8Sx8; goto binnish;
case Iop_QNarrowBin16Sto8Ux8:
fn = (HWord)h_generic_calc_QNarrowBin16Sto8Ux8; goto binnish;
+ case Iop_NarrowBin16to8x8:
+ fn = (HWord)h_generic_calc_NarrowBin16to8x8; goto binnish;
+ case Iop_NarrowBin32to16x4:
+ fn = (HWord)h_generic_calc_NarrowBin32to16x4; goto binnish;
case Iop_QSub8Sx8:
fn = (HWord)h_generic_calc_QSub8Sx8; goto binnish;
@@ -3135,6 +3140,7 @@
# define SSE2_OR_ABOVE \
(env->hwcaps & VEX_HWCAPS_X86_SSE2)
+ HWord fn = 0; /* address of helper fn, if required */
MatchInfo mi;
Bool arg1isEReg = False;
X86SseOp op = Xsse_INVALID;
@@ -3601,6 +3607,59 @@
return dst;
}
+ case Iop_NarrowBin32to16x8:
+ fn = (HWord)h_generic_calc_NarrowBin32to16x8;
+ goto do_SseAssistedBinary;
+ case Iop_NarrowBin16to8x16:
+ fn = (HWord)h_generic_calc_NarrowBin16to8x16;
+ goto do_SseAssistedBinary;
+ do_SseAssistedBinary: {
+ /* As with the amd64 case (where this is copied from) we
+ generate pretty bad code. */
+ vassert(fn != 0);
+ HReg dst = newVRegV(env);
+ HReg argL = iselVecExpr(env, e->Iex.Binop.arg1);
+ HReg argR = iselVecExpr(env, e->Iex.Binop.arg2);
+ HReg argp = newVRegI(env);
+ /* subl $112, %esp -- make a space */
+ sub_from_esp(env, 112);
+ /* leal 48(%esp), %r_argp -- point into it */
+ addInstr(env, X86Instr_Lea32(X86AMode_IR(48, hregX86_ESP()),
+ argp));
+ /* andl $-16, %r_argp -- 16-align the pointer */
+ addInstr(env, X86Instr_Alu32R(Xalu_AND,
+ X86RMI_Imm( ~(UInt)15 ),
+ argp));
+ /* Prepare 3 arg regs:
+ leal 0(%r_argp), %eax
+ leal 16(%r_argp), %edx
+ leal 32(%r_argp), %ecx
+ */
+ addInstr(env, X86Instr_Lea32(X86AMode_IR(0, argp),
+ hregX86_EAX()));
+ addInstr(env, X86Instr_Lea32(X86AMode_IR(16, argp),
+ hregX86_EDX()));
+ addInstr(env, X86Instr_Lea32(X86AMode_IR(32, argp),
+ hregX86_ECX()));
+ /* Store the two args, at (%edx) and (%ecx):
+ movupd %argL, 0(%edx)
+ movupd %argR, 0(%ecx)
+ */
+ addInstr(env, X86Instr_SseLdSt(False/*!isLoad*/, argL,
+ X86AMode_IR(0, hregX86_EDX())));
+ addInstr(env, X86Instr_SseLdSt(False/*!isLoad*/, argR,
+ X86AMode_IR(0, hregX86_ECX())));
+ /* call the helper */
+ addInstr(env, X86Instr_Call( Xcc_ALWAYS, (Addr32)fn, 3 ));
+ /* fetch the result from memory, using %r_argp, which the
+ register allocator will keep alive across the call. */
+ addInstr(env, X86Instr_SseLdSt(True/*isLoad*/, dst,
+ X86AMode_IR(0, argp)));
+ /* and finally, clear the space */
+ add_to_esp(env, 112);
+ return dst;
+ }
+
default:
break;
} /* switch (e->Iex.Binop.op) */
Modified: trunk/priv/ir_defs.c
===================================================================
--- trunk/priv/ir_defs.c 2011-10-20 21:15:55 UTC (rev 2222)
+++ trunk/priv/ir_defs.c 2011-10-22 09:32:16 UTC (rev 2223)
@@ -514,6 +514,8 @@
case Iop_QNarrowBin16Sto8Ux8: vex_printf("QNarrowBin16Sto8Ux8"); return;
case Iop_QNarrowBin16Sto8Sx8: vex_printf("QNarrowBin16Sto8Sx8"); return;
case Iop_QNarrowBin32Sto16Sx4: vex_printf("QNarrowBin32Sto16Sx4"); return;
+ case Iop_NarrowBin16to8x8: vex_printf("NarrowBin16to8x8"); return;
+ case Iop_NarrowBin32to16x4: vex_printf("NarrowBin32to16x4"); return;
case Iop_InterleaveHI8x8: vex_printf("InterleaveHI8x8"); return;
case Iop_InterleaveHI16x4: vex_printf("InterleaveHI16x4"); return;
case Iop_InterleaveHI32x2: vex_printf("InterleaveHI32x2"); return;
@@ -2066,6 +2068,7 @@
case Iop_PwAdd32Fx2:
case Iop_QNarrowBin32Sto16Sx4:
case Iop_QNarrowBin16Sto8Sx8: case Iop_QNarrowBin16Sto8Ux8:
+ case Iop_NarrowBin16to8x8: case Iop_NarrowBin32to16x4:
case Iop_Sub8x8: case Iop_Sub16x4: case Iop_Sub32x2:
case Iop_QSub8Sx8: case Iop_QSub16Sx4:
case Iop_QSub32Sx2: case Iop_QSub64Sx1:
Modified: trunk/pub/libvex_ir.h
===================================================================
--- trunk/pub/libvex_ir.h 2011-10-20 21:15:55 UTC (rev 2222)
+++ trunk/pub/libvex_ir.h 2011-10-22 09:32:16 UTC (rev 2223)
@@ -923,6 +923,7 @@
*/
Iop_QNarrowBin16Sto8Ux8,
Iop_QNarrowBin16Sto8Sx8, Iop_QNarrowBin32Sto16Sx4,
+ Iop_NarrowBin16to8x8, Iop_NarrowBin32to16x4,
/* INTERLEAVING */
/* Interleave lanes from low or high halves of
|
|
From: <sv...@va...> - 2011-10-22 09:34:25
|
Author: sewardj
Date: 2011-10-22 10:29:41 +0100 (Sat, 22 Oct 2011)
New Revision: 12190
Log:
Change and simplify the way that Memcheck instruments saturating
narrowing operations. The previous scheme was simply wrong and could
cause false negatives, by causing some narrowing operations to have a
defined output even when the inputs are undefined. This was what
#279698 reported. This patch is a fix for that bug.
Modified:
trunk/memcheck/mc_translate.c
Modified: trunk/memcheck/mc_translate.c
===================================================================
--- trunk/memcheck/mc_translate.c 2011-10-22 09:21:24 UTC (rev 12189)
+++ trunk/memcheck/mc_translate.c 2011-10-22 09:29:41 UTC (rev 12190)
@@ -1957,37 +1957,92 @@
/* --- --- Vector saturated narrowing --- --- */
-/* This is quite subtle. What to do is simple:
+/* We used to do something very clever here, but on closer inspection
+ (2011-Jun-15), and in particular bug #279698, it turns out to be
+ wrong. Part of the problem came from the fact that for a long
+ time, the IR primops to do with saturated narrowing were
+ underspecified and managed to confuse multiple cases which needed
+ to be separate: the op names had a signedness qualifier, but in
+ fact the source and destination signednesses needed to be specified
+ independently, so the op names really need two independent
+ signedness specifiers.
- Let the original narrowing op be QNarrowW{S,U}xN. Produce:
+ As of 2011-Jun-15 (ish) the underspecification was sorted out
+ properly. The incorrect instrumentation remained, though. That
+ has now (2011-Oct-22) been fixed.
- the-narrowing-op( PCastWxN(vatom1), PCastWxN(vatom2))
+ What we now do is simple:
- Why this is right is not so simple. Consider a lane in the args,
- vatom1 or 2, doesn't matter.
+ Let the original narrowing op be QNarrowBinXtoYxZ, where Z is a
+ number of lanes, X is the source lane width and signedness, and Y
+ is the destination lane width and signedness. In all cases the
+ destination lane width is half the source lane width, so the names
+ have a bit of redundancy, but are at least easy to read.
- After the PCast, that lane is all 0s (defined) or all
- 1s(undefined).
+ For example, Iop_QNarrowBin32Sto16Ux8 narrows 8 lanes of signed 32s
+ to unsigned 16s.
- Both signed and unsigned saturating narrowing of all 0s produces
- all 0s, which is what we want.
+ Let Vanilla(OP) be a function that takes OP, one of these
+ saturating narrowing ops, and produces the same "shaped" narrowing
+ op which is not saturating, but merely dumps the most significant
+ bits. "same shape" means that the lane numbers and widths are the
+ same as with OP.
- The all-1s case is more complex. Unsigned narrowing interprets an
- all-1s input as the largest unsigned integer, and so produces all
- 1s as a result since that is the largest unsigned value at the
- smaller width.
+ For example, Vanilla(Iop_QNarrowBin32Sto16Ux8)
+ = Iop_NarrowBin32to16x8,
+ that is, narrow 8 lanes of 32 bits to 8 lanes of 16 bits, by
+ dumping the top half of each lane.
- Signed narrowing interprets all 1s as -1. Fortunately, -1 narrows
- to -1, so we still wind up with all 1s at the smaller width.
+ So, with that in place, the scheme is simple, and it is simple to
+ pessimise each lane individually and then apply Vanilla(OP) so as
+ to get the result in the right "shape". If the original OP is
+ QNarrowBinXtoYxZ then we produce
- So: In short, pessimise the args, then apply the original narrowing
- op.
+ Vanilla(OP)( PCast-X-to-X-x-Z(vatom1), PCast-X-to-X-x-Z(vatom2) )
- FIXME JRS 2011-Jun-15: figure out if this is still correct
- following today's rationalisation/cleanup of vector narrowing
- primops.
+ or for the case when OP is unary (Iop_QNarrowUn*)
+
+ Vanilla(OP)( PCast-X-to-X-x-Z(vatom) )
*/
static
+IROp vanillaNarrowingOpOfShape ( IROp qnarrowOp )
+{
+ switch (qnarrowOp) {
+ /* Binary: (128, 128) -> 128 */
+ case Iop_QNarrowBin16Sto8Ux16:
+ case Iop_QNarrowBin16Sto8Sx16:
+ case Iop_QNarrowBin16Uto8Ux16:
+ return Iop_NarrowBin16to8x16;
+ case Iop_QNarrowBin32Sto16Ux8:
+ case Iop_QNarrowBin32Sto16Sx8:
+ case Iop_QNarrowBin32Uto16Ux8:
+ return Iop_NarrowBin32to16x8;
+ /* Binary: (64, 64) -> 64 */
+ case Iop_QNarrowBin32Sto16Sx4:
+ return Iop_NarrowBin32to16x4;
+ case Iop_QNarrowBin16Sto8Ux8:
+ case Iop_QNarrowBin16Sto8Sx8:
+ return Iop_NarrowBin16to8x8;
+ /* Unary: 128 -> 64 */
+ case Iop_QNarrowUn64Uto32Ux2:
+ case Iop_QNarrowUn64Sto32Sx2:
+ case Iop_QNarrowUn64Sto32Ux2:
+ return Iop_NarrowUn64to32x2;
+ case Iop_QNarrowUn32Uto16Ux4:
+ case Iop_QNarrowUn32Sto16Sx4:
+ case Iop_QNarrowUn32Sto16Ux4:
+ return Iop_NarrowUn32to16x4;
+ case Iop_QNarrowUn16Uto8Ux8:
+ case Iop_QNarrowUn16Sto8Sx8:
+ case Iop_QNarrowUn16Sto8Ux8:
+ return Iop_NarrowUn16to8x8;
+ default:
+ ppIROp(qnarrowOp);
+ VG_(tool_panic)("vanillaNarrowOpOfShape");
+ }
+}
+
+static
IRAtom* vectorNarrowBinV128 ( MCEnv* mce, IROp narrow_op,
IRAtom* vatom1, IRAtom* vatom2)
{
@@ -2002,11 +2057,12 @@
case Iop_QNarrowBin16Sto8Ux16: pcast = mkPCast16x8; break;
default: VG_(tool_panic)("vectorNarrowBinV128");
}
+ IROp vanilla_narrow = vanillaNarrowingOpOfShape(narrow_op);
tl_assert(isShadowAtom(mce,vatom1));
tl_assert(isShadowAtom(mce,vatom2));
at1 = assignNew('V', mce, Ity_V128, pcast(mce, vatom1));
at2 = assignNew('V', mce, Ity_V128, pcast(mce, vatom2));
- at3 = assignNew('V', mce, Ity_V128, binop(narrow_op, at1, at2));
+ at3 = assignNew('V', mce, Ity_V128, binop(vanilla_narrow, at1, at2));
return at3;
}
@@ -2022,26 +2078,36 @@
case Iop_QNarrowBin16Sto8Ux8: pcast = mkPCast16x4; break;
default: VG_(tool_panic)("vectorNarrowBin64");
}
+ IROp vanilla_narrow = vanillaNarrowingOpOfShape(narrow_op);
tl_assert(isShadowAtom(mce,vatom1));
tl_assert(isShadowAtom(mce,vatom2));
at1 = assignNew('V', mce, Ity_I64, pcast(mce, vatom1));
at2 = assignNew('V', mce, Ity_I64, pcast(mce, vatom2));
- at3 = assignNew('V', mce, Ity_I64, binop(narrow_op, at1, at2));
+ at3 = assignNew('V', mce, Ity_I64, binop(vanilla_narrow, at1, at2));
return at3;
}
static
-IRAtom* vectorNarrowUnV128 ( MCEnv* mce, IROp shorten_op,
+IRAtom* vectorNarrowUnV128 ( MCEnv* mce, IROp narrow_op,
IRAtom* vatom1)
{
IRAtom *at1, *at2;
IRAtom* (*pcast)( MCEnv*, IRAtom* );
- switch (shorten_op) {
- /* FIXME: first 3 are too pessimistic; we can just
- apply them directly to the V bits. */
- case Iop_NarrowUn16to8x8: pcast = mkPCast16x8; break;
- case Iop_NarrowUn32to16x4: pcast = mkPCast32x4; break;
- case Iop_NarrowUn64to32x2: pcast = mkPCast64x2; break;
+ tl_assert(isShadowAtom(mce,vatom1));
+ /* For vanilla narrowing (non-saturating), we can just apply
+ the op directly to the V bits. */
+ switch (narrow_op) {
+ case Iop_NarrowUn16to8x8:
+ case Iop_NarrowUn32to16x4:
+ case Iop_NarrowUn64to32x2:
+ at1 = assignNew('V', mce, Ity_I64, unop(narrow_op, vatom1));
+ return at1;
+ default:
+ break; /* Do Plan B */
+ }
+ /* Plan B: for ops that involve a saturation operation on the args,
+ we must PCast before the vanilla narrow. */
+ switch (narrow_op) {
case Iop_QNarrowUn16Sto8Sx8: pcast = mkPCast16x8; break;
case Iop_QNarrowUn16Sto8Ux8: pcast = mkPCast16x8; break;
case Iop_QNarrowUn16Uto8Ux8: pcast = mkPCast16x8; break;
@@ -2053,9 +2119,9 @@
case Iop_QNarrowUn64Uto32Ux2: pcast = mkPCast64x2; break;
default: VG_(tool_panic)("vectorNarrowUnV128");
}
- tl_assert(isShadowAtom(mce,vatom1));
+ IROp vanilla_narrow = vanillaNarrowingOpOfShape(narrow_op);
at1 = assignNew('V', mce, Ity_V128, pcast(mce, vatom1));
- at2 = assignNew('V', mce, Ity_I64, unop(shorten_op, at1));
+ at2 = assignNew('V', mce, Ity_I64, unop(vanilla_narrow, at1));
return at2;
}
|
|
From: <sv...@va...> - 2011-10-22 09:26:10
|
Author: bart
Date: 2011-10-22 10:21:24 +0100 (Sat, 22 Oct 2011)
New Revision: 12189
Log:
Ran configure.in through autoupdate:
- Replaced AC_CONFIG_HEADER() by AC_CONFIG_HEADERS().
- Replaced AC_TRY_LINK() by AC_LINK_IFELSE().
- Replaced AC_TRY_COMPILE() by AC_COMPILE_IFELSE().
- Removed AC_TYPE_SIGNAL because RETSIGTYPE isn't used anywhere.
Modified:
trunk/configure.in
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2011-10-22 08:24:32 UTC (rev 12188)
+++ trunk/configure.in 2011-10-22 09:21:24 UTC (rev 12189)
@@ -8,9 +8,9 @@
##------------------------------------------------------------##
# Process this file with autoconf to produce a configure script.
-AC_INIT(Valgrind, 3.7.0.SVN, val...@li...)
+AC_INIT([Valgrind],[3.7.0.SVN],[val...@li...])
AC_CONFIG_SRCDIR(coregrind/m_main.c)
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE
@@ -325,10 +325,9 @@
AC_MSG_CHECKING([for 32 bit build support])
safe_CFLAGS=$CFLAGS
CFLAGS="-m32"
- AC_TRY_LINK(, [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
- ],
- [
+ ]])], [
AC_MSG_RESULT([yes])
], [
vg_cv_only64bit="yes"
@@ -872,15 +871,13 @@
AC_MSG_CHECKING([for CLOCK_MONOTONIC])
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <time.h>
-], [
+]], [[
struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);
return 0;
-],
-[
+]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_CLOCK_MONOTONIC], 1,
[Define to 1 if you have the `CLOCK_MONOTONIC' constant.])
@@ -893,14 +890,12 @@
AC_MSG_CHECKING([for pthread_rwlock_t])
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <pthread.h>
-], [
+]], [[
pthread_rwlock_t rwl;
-],
-[
+]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PTHREAD_RWLOCK_T], 1,
[Define to 1 if you have the `pthread_rwlock_t' type.])
@@ -913,14 +908,12 @@
AC_MSG_CHECKING([for PTHREAD_MUTEX_ADAPTIVE_NP])
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <pthread.h>
-], [
+]], [[
return (PTHREAD_MUTEX_ADAPTIVE_NP);
-],
-[
+]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PTHREAD_MUTEX_ADAPTIVE_NP], 1,
[Define to 1 if you have the `PTHREAD_MUTEX_ADAPTIVE_NP' constant.])
@@ -933,14 +926,12 @@
AC_MSG_CHECKING([for PTHREAD_MUTEX_ERRORCHECK_NP])
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <pthread.h>
-], [
+]], [[
return (PTHREAD_MUTEX_ERRORCHECK_NP);
-],
-[
+]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PTHREAD_MUTEX_ERRORCHECK_NP], 1,
[Define to 1 if you have the `PTHREAD_MUTEX_ERRORCHECK_NP' constant.])
@@ -953,14 +944,12 @@
AC_MSG_CHECKING([for PTHREAD_MUTEX_RECURSIVE_NP])
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <pthread.h>
-], [
+]], [[
return (PTHREAD_MUTEX_RECURSIVE_NP);
-],
-[
+]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE_NP], 1,
[Define to 1 if you have the `PTHREAD_MUTEX_RECURSIVE_NP' constant.])
@@ -973,15 +962,13 @@
AC_MSG_CHECKING([for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP])
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <pthread.h>
-], [
+]], [[
pthread_mutex_t m = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
return 0;
-],
-[
+]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], 1,
[Define to 1 if you have the `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' constant.])
@@ -1020,13 +1007,11 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-maltivec"
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <altivec.h>
-], [
+]], [[
vector unsigned int v;
-],
-[
+]])], [
ac_have_altivec=yes
AC_MSG_RESULT([yes])
AC_DEFINE([HAS_ALTIVEC], 1,
@@ -1053,14 +1038,12 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-mvsx"
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <altivec.h>
-], [
+]], [[
vector unsigned int v;
__asm__ __volatile__("xsmaddadp 32, 32, 33" ::: "memory","cc");
-],
-[
+]])], [
ac_have_vsx=yes
AC_MSG_RESULT([yes])
], [
@@ -1077,12 +1060,11 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-lpthread"
-AC_TRY_LINK(
-[
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
extern int pthread_create_glibc_2_0(void*, const void*,
void *(*)(void*), void*);
__asm__(".symver pthread_create_glibc_2_0, pthread_create@GLIBC_2.0");
-], [
+]], [[
#ifdef __powerpc__
/*
* Apparently on PowerPC linking this program succeeds and generates an
@@ -1093,8 +1075,7 @@
pthread_create_glibc_2_0(0, 0, 0, 0);
#endif
return 0;
-],
-[
+]])], [
ac_have_pthread_create_glibc_2_0=yes
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PTHREAD_CREATE_GLIBC_2_0], 1,
@@ -1112,18 +1093,16 @@
# Check for eventfd_t, eventfd() and eventfd_read()
AC_MSG_CHECKING([for eventfd()])
-AC_TRY_LINK(
-[
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/eventfd.h>
-], [
+]], [[
eventfd_t ev;
int fd;
fd = eventfd(5, 0);
eventfd_read(fd, &ev);
return 0;
-],
-[
+]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_EVENTFD], 1,
[Define to 1 if you have the `eventfd' function.])
@@ -1144,10 +1123,9 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-m32"
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
-],
-[
+]])], [
FLAG_M32="-m32"
AC_MSG_RESULT([yes])
], [
@@ -1165,10 +1143,9 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-m64"
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
-],
-[
+]])], [
FLAG_M64="-m64"
AC_MSG_RESULT([yes])
], [
@@ -1186,10 +1163,9 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-mmmx"
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
-],
-[
+]])], [
FLAG_MMMX="-mmmx"
AC_MSG_RESULT([yes])
], [
@@ -1207,10 +1183,9 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-msse"
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
-],
-[
+]])], [
FLAG_MSSE="-msse"
AC_MSG_RESULT([yes])
], [
@@ -1228,10 +1203,9 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-mpreferred-stack-boundary=2"
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
-],
-[
+]])], [
PREFERRED_STACK_BOUNDARY="-mpreferred-stack-boundary=2"
AC_MSG_RESULT([yes])
], [
@@ -1249,10 +1223,9 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-Wno-pointer-sign"
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
-],
-[
+]])], [
no_pointer_sign=yes
AC_MSG_RESULT([yes])
], [
@@ -1273,16 +1246,12 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-Wno-empty-body"
-AC_TRY_COMPILE(
-[ ],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
return 0;
-],
-[
+]])], [
AC_SUBST([FLAG_W_NO_EMPTY_BODY], [-Wno-empty-body])
AC_MSG_RESULT([yes])
-],
-[
+], [
AC_SUBST([FLAG_W_NO_EMPTY_BODY], [])
AC_MSG_RESULT([no])
])
@@ -1296,16 +1265,12 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-Wno-format-zero-length"
-AC_TRY_COMPILE(
-[ ],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
return 0;
-],
-[
+]])], [
AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [-Wno-format-zero-length])
AC_MSG_RESULT([yes])
-],
-[
+], [
AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [])
AC_MSG_RESULT([no])
])
@@ -1319,16 +1284,12 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-Wno-nonnull"
-AC_TRY_COMPILE(
-[ ],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
return 0;
-],
-[
+]])], [
AC_SUBST([FLAG_W_NO_NONNULL], [-Wno-nonnull])
AC_MSG_RESULT([yes])
-],
-[
+], [
AC_SUBST([FLAG_W_NO_NONNULL], [])
AC_MSG_RESULT([no])
])
@@ -1342,16 +1303,12 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-Wno-overflow"
-AC_TRY_COMPILE(
-[ ],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
return 0;
-],
-[
+]])], [
AC_SUBST([FLAG_W_NO_OVERFLOW], [-Wno-overflow])
AC_MSG_RESULT([yes])
-],
-[
+], [
AC_SUBST([FLAG_W_NO_OVERFLOW], [])
AC_MSG_RESULT([no])
])
@@ -1365,16 +1322,12 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-Wno-uninitialized"
-AC_TRY_COMPILE(
-[ ],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
return 0;
-],
-[
+]])], [
AC_SUBST([FLAG_W_NO_UNINITIALIZED], [-Wno-uninitialized])
AC_MSG_RESULT([yes])
-],
-[
+], [
AC_SUBST([FLAG_W_NO_UNINITIALIZED], [])
AC_MSG_RESULT([no])
])
@@ -1388,22 +1341,16 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-Wextra"
-AC_TRY_COMPILE(
-[ ],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
return 0;
-],
-[
+]])], [
AC_SUBST([FLAG_W_EXTRA], [-Wextra])
AC_MSG_RESULT([-Wextra])
], [
CFLAGS="-W"
- AC_TRY_COMPILE(
- [ ],
- [
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ ]], [[
return 0;
- ],
- [
+ ]]), [
AC_SUBST([FLAG_W_EXTRA], [-W])
AC_MSG_RESULT([-W])
], [
@@ -1420,10 +1367,9 @@
safe_CFLAGS=$CFLAGS
CFLAGS="-fno-stack-protector"
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
-],
-[
+]])], [
no_stack_protector=yes
FLAG_FNO_STACK_PROTECTOR="-fno-stack-protector"
AC_MSG_RESULT([yes])
@@ -1448,12 +1394,9 @@
safe_CFLAGS=$CFLAGS
CFLAGS="--param inline-unit-growth=900"
-AC_TRY_COMPILE(
-[ ],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
return 0;
-],
-[
+]])], [
AC_SUBST([FLAG_UNLIMITED_INLINE_UNIT_GROWTH],
["--param inline-unit-growth=900"])
AC_MSG_RESULT([yes])
@@ -1489,11 +1432,10 @@
# does the ppc assembler support "mtocrf" et al?
AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf])
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
__asm__ __volatile__("mtocrf 4,0");
__asm__ __volatile__("mfocrf 0,4");
-],
-[
+]])], [
ac_have_as_ppc_mftocrf=yes
AC_MSG_RESULT([yes])
], [
@@ -1512,12 +1454,11 @@
# automake-level symbol (BUILD_SSE3_TESTS), used in test Makefile.am's
AC_MSG_CHECKING([if x86/amd64 assembler speaks SSE3])
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
do { long long int x;
__asm__ __volatile__("fisttpq (%0)" : :"r"(&x) ); }
while (0)
-],
-[
+]])], [
ac_have_as_sse3=yes
AC_MSG_RESULT([yes])
], [
@@ -1533,13 +1474,12 @@
# automake-level symbol (BUILD_SSSE3_TESTS), used in test Makefile.am's
AC_MSG_CHECKING([if x86/amd64 assembler speaks SSSE3])
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
do { long long int x;
__asm__ __volatile__(
"pabsb (%0),%%xmm7" : : "r"(&x) : "xmm7" ); }
while (0)
-],
-[
+]])], [
ac_have_as_ssse3=yes
AC_MSG_RESULT([yes])
], [
@@ -1554,13 +1494,12 @@
# Note, this doesn't generate a C-level symbol. It generates a
# automake-level symbol (BUILD_PCLMULQDQ_TESTS), used in test Makefile.am's
AC_MSG_CHECKING([if x86/amd64 assembler supports 'pclmulqdq'])
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
do {
__asm__ __volatile__(
"pclmulqdq \$17,%%xmm6,%%xmm7" : : : "xmm6", "xmm7" ); }
while (0)
-],
-[
+]])], [
ac_have_as_pclmulqdq=yes
AC_MSG_RESULT([yes])
], [
@@ -1576,12 +1515,11 @@
# automake-level symbol (BUILD_LZCNT_TESTS), used in test Makefile.am's
AC_MSG_CHECKING([if x86/amd64 assembler supports 'lzcnt'])
-AC_TRY_COMPILE([], [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
do {
__asm__ __volatile__("lzcnt %rax,%rax");
} while (0)
-],
-[
+]])], [
ac_have_as_lzcnt=yes
AC_MSG_RESULT([yes])
], [
@@ -1597,13 +1535,12 @@
# automake-level symbol (BUILD_SSE42_TESTS), used in test Makefile.am's
AC_MSG_CHECKING([if x86/amd64 assembler speaks SSE4.2])
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
do { long long int x;
__asm__ __volatile__(
"crc32q %%r15,%%r15" : : : "r15" ); }
while (0)
-],
-[
+]])], [
ac_have_as_sse42=yes
AC_MSG_RESULT([yes])
], [
@@ -1669,12 +1606,11 @@
# Verify whether the <linux/futex.h> header is usable.
AC_MSG_CHECKING([if <linux/futex.h> is usable])
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <linux/futex.h>
-], [
+]], [[
return FUTEX_WAIT;
-],
-[
+]])], [
AC_DEFINE([HAVE_USABLE_LINUX_FUTEX_H], 1,
[Define to 1 if you have a usable <linux/futex.h> header file.])
AC_MSG_RESULT([yes])
@@ -1696,7 +1632,6 @@
#----------------------------------------------------------------------------
AC_FUNC_MEMCMP
AC_FUNC_MMAP
-AC_TYPE_SIGNAL
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([rt], [clock_gettime])
@@ -1786,14 +1721,14 @@
saved_CFLAGS=$CFLAGS
CC=$MPI_CC
CFLAGS=$mflag_primary
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <mpi.h>
#include <stdio.h>
-],[
+]], [[
int r = MPI_Init(NULL,NULL);
r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
return r;
-], [
+]])], [
ac_have_mpi2_pri=yes
AC_MSG_RESULT([yes, $MPI_CC])
], [
@@ -1818,14 +1753,14 @@
CC=$MPI_CC
fi
CFLAGS=$mflag_secondary
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <mpi.h>
#include <stdio.h>
-],[
+]], [[
int r = MPI_Init(NULL,NULL);
r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
return r;
-], [
+]])], [
ac_have_mpi2_sec=yes
AC_MSG_RESULT([yes, $MPI_CC])
], [
@@ -1925,18 +1860,15 @@
safe_CFLAGS=$CFLAGS
CFLAGS="$mflag_primary"
-AC_TRY_LINK(,
-[
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
int variable = 1;
return (__sync_bool_compare_and_swap(&variable, 1, 2)
&& __sync_add_and_fetch(&variable, 1) ? 1 : 0)
-],
-[
+]])], [
ac_have_builtin_atomic=yes
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Define to 1 if gcc supports __sync_bool_compare_and_swap() and __sync_add_and_fetch()])
-],
-[
+], [
ac_have_builtin_atomic=no
AC_MSG_RESULT([no])
])
@@ -1952,18 +1884,15 @@
CXXFLAGS="$mflag_primary"
AC_LANG_PUSH(C++)
-AC_TRY_LINK(,
-[
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
int variable = 1;
return (__sync_bool_compare_and_swap(&variable, 1, 2)
&& __sync_add_and_fetch(&variable, 1) ? 1 : 0)
-],
-[
+]])], [
ac_have_builtin_atomic_cxx=yes
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_BUILTIN_ATOMIC_CXX, 1, [Define to 1 if g++ supports __sync_bool_compare_and_swap() and __sync_add_and_fetch()])
-],
-[
+], [
ac_have_builtin_atomic_cxx=no
AC_MSG_RESULT([no])
])
|
|
From: <sv...@va...> - 2011-10-22 08:29:17
|
Author: bart
Date: 2011-10-22 09:24:32 +0100 (Sat, 22 Oct 2011)
New Revision: 12188
Log:
XML output: escape XML-metacharacters in executable path and arguments. This is a modified version of the patch submitted by Evgeniy Stepanov <eug...@gm...>. See also #284621.
Modified:
trunk/coregrind/m_main.c
Modified: trunk/coregrind/m_main.c
===================================================================
--- trunk/coregrind/m_main.c 2011-10-21 08:07:13 UTC (rev 12187)
+++ trunk/coregrind/m_main.c 2011-10-22 08:24:32 UTC (rev 12188)
@@ -1026,21 +1026,26 @@
/*=== Printing the preamble ===*/
/*====================================================================*/
-// Print the command, escaping any chars that require it.
-static void umsg_or_xml_arg(const Char* arg,
- UInt (*umsg_or_xml)( const HChar*, ... ) )
+// Print the argument, escaping any chars that require it.
+static void umsg_arg(const Char* arg)
{
SizeT len = VG_(strlen)(arg);
Char* special = " \\<>";
Int i;
for (i = 0; i < len; i++) {
if (VG_(strchr)(special, arg[i])) {
- umsg_or_xml("\\"); // escape with a backslash if necessary
+ VG_(umsg)("\\"); // escape with a backslash if necessary
}
- umsg_or_xml("%c", arg[i]);
+ VG_(umsg)("%c", arg[i]);
}
}
+// Send output to the XML-stream and escape any XML meta-characters.
+static void xml_arg(const Char* arg)
+{
+ VG_(printf_xml)("%pS", arg);
+}
+
/* Ok, the logging sink is running now. Print a suitable preamble.
If logging to file or a socket, write details of parent PID and
command line args, to help people trying to interpret the
@@ -1055,6 +1060,9 @@
UInt (*umsg_or_xml)( const HChar*, ... )
= VG_(clo_xml) ? VG_(printf_xml) : VG_(umsg);
+ UInt (*umsg_or_xml_arg)( const HChar* )
+ = VG_(clo_xml) ? xml_arg : umsg_arg;
+
vg_assert( VG_(args_for_client) );
vg_assert( VG_(args_for_valgrind) );
vg_assert( toolname );
@@ -1106,11 +1114,12 @@
// favour utility and simplicity over aesthetics.
umsg_or_xml("%sCommand: ", xpre);
if (VG_(args_the_exename))
- umsg_or_xml_arg(VG_(args_the_exename), umsg_or_xml);
+ umsg_or_xml_arg(VG_(args_the_exename));
+
for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++) {
HChar* s = *(HChar**)VG_(indexXA)( VG_(args_for_client), i );
umsg_or_xml(" ");
- umsg_or_xml_arg(s, umsg_or_xml);
+ umsg_or_xml_arg(s);
}
umsg_or_xml("%s\n", xpost);
|
|
From: Philippe W. <phi...@sk...> - 2011-10-22 07:04:40
|
> By the way, I was able to successfully run mcsigpass manually (one session for valgrind and one session for gdb) using > mcsigpass.stdinB.gdb > as input to the gdb session, so I *think* I'm running the two processes correctly in manual mode. Any idea what I'm doing wrong? > I'm not versed in using gdbserver, so it's very possible I'm missing something. IIUC, these tests are ok on fedora16/Power7 and not ok on suse11/power7. One thing you can try is to do the same commands as in the stdinB.gdb but with the standard gdbserver part of the gdb distribution, and see if this also fails to put the breakpoints. I can take a look at the problem if you run the following commands on both platforms, and send the gdbserver_tests/*.out files. rm gdbserver_tests/*.out perl tests/vg_regtest --keep-unfiltered gdbserver_tests/mcinfcallRU.vgtest .... send the gdbserver_tests/*.out export EXTRA_REGTEST_OPTS="-v -v -d -d -d" .... redo the above Thanks |
|
From: Philippe W. <phi...@sk...> - 2011-10-22 06:30:09
|
> I favor integrating support for ARMv5. Integrating ARMv5 gives the advantage that Valgrind runs on the Google Android emulator (which only emulates ARMv5). This is how I ported and tested vgdb.c to Android. The emulator is slow, but I am patient :). Philippe |
|
From: Rich C. <rc...@wi...> - 2011-10-22 05:49:28
|
valgrind revision: 12187
VEX revision: 2222
GCC version: gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291]
C library: GNU C Library stable release version 2.9 (20081117), by Roland McGrath et al.
uname -mrs: Linux 2.6.27.45-0.1-default ppc
Vendor version: Welcome to openSUSE 11.1 - Kernel %r (%t).
Nightly build on ppc32 ( Linux 2.6.27.45-0.1-default ppc )
Started at 2011-10-21 23:26:01 CDT
Ended at 2011-10-22 00:49:15 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
== 483 tests, 12 stderr failures, 5 stdout failures, 2 stderrB failures, 0 stdoutB failures, 3 post failures ==
gdbserver_tests/mcinfcallWSRU (stderrB)
gdbserver_tests/mcvabits (stderrB)
memcheck/tests/linux/stack_changes (stderr)
memcheck/tests/supp_unknown (stderr)
memcheck/tests/varinfo6 (stderr)
massif/tests/big-alloc (post)
massif/tests/deep-D (post)
massif/tests/overloaded-new (post)
none/tests/ppc32/jm-fp (stdout)
none/tests/ppc32/jm-fp (stderr)
none/tests/ppc32/power5+_round (stdout)
none/tests/ppc32/power5+_round (stderr)
none/tests/ppc32/round (stdout)
none/tests/ppc32/round (stderr)
none/tests/ppc32/test_fx (stdout)
none/tests/ppc32/test_fx (stderr)
none/tests/ppc32/test_gx (stdout)
helgrind/tests/cond_timedwait_invalid (stderr)
helgrind/tests/hg05_race2 (stderr)
helgrind/tests/tc18_semabuse (stderr)
helgrind/tests/tc20_verifywrap (stderr)
helgrind/tests/tc23_bogus_condwait (stderr)
=================================================
./valgrind-new/gdbserver_tests/mcinfcallWSRU.stderrB.diff
=================================================
--- mcinfcallWSRU.stderrB.exp 2011-10-22 00:07:54.000000000 -0500
+++ mcinfcallWSRU.stderrB.out 2011-10-22 00:24:18.000000000 -0500
@@ -21,35 +21,33 @@
0x........ in do_burn () at sleepers.c:39
39 for (i = 0; i < burn; i++) loopnr++;
[Switching to thread 1 (Thread ....)]
-#0 0x........ in do_burn () at sleepers.c:39
+#0 0x........ in do_burn ()
+ ...
39 for (i = 0; i < burn; i++) loopnr++;
$1 = void
[Switching to thread 2 (Thread ....)]
#0 0x........ in syscall ...
-Could not write register "xxx"; remote failure reply 'E.
+Remote failure reply: E.
ERROR changing register xxx regno y
gdb commands changing registers (pc, sp, ...) (e.g. 'jump',
set pc, calling from gdb a function in the debugged process, ...)
can only be accepted if the thread is VgTs_Runnable or VgTs_Yielding state
Thread status is VgTs_WaitSys
-'
[Switching to thread 3 (Thread ....)]
#0 0x........ in syscall ...
-Could not write register "xxx"; remote failure reply 'E.
+Remote failure reply: E.
ERROR changing register xxx regno y
gdb commands changing registers (pc, sp, ...) (e.g. 'jump',
set pc, calling from gdb a function in the debugged process, ...)
can only be accepted if the thread is VgTs_Runnable or VgTs_Yielding state
Thread status is VgTs_WaitSys
-'
[Switching to thread 4 (Thread ....)]
#0 0x........ in syscall ...
-Could not write register "xxx"; remote failure reply 'E.
+Remote failure reply: E.
ERROR changing register xxx regno y
gdb commands changing registers (pc, sp, ...) (e.g. 'jump',
set pc, calling from gdb a function in the debugged process, ...)
can only be accepted if the thread is VgTs_Runnable or VgTs_Yielding state
Thread status is VgTs_WaitSys
-'
monitor command request to kill this process
Remote connection closed
=================================================
./valgrind-new/gdbserver_tests/mcvabits.stderrB.diff
=================================================
--- mcvabits.stderrB.exp 2011-10-22 00:07:54.000000000 -0500
+++ mcvabits.stderrB.out 2011-10-22 00:24:51.000000000 -0500
@@ -1,55 +1,32 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
-Address 0x........ len 10 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 defined
- Address 0x........ is 0 bytes inside data symbol "undefined"
-00000000 00000000 0000
-Address 0x........ len 10 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-ff00ff00 ff00ff00 ff00
-Address 0x........ len 10 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-ff000000 0000ff00 ff00
-Address 0x........ len 10 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-ff00ffff ffffff00 ff00
-Address 0x........ len 2 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 2 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-ff00
-Address 0x........ len 2 not addressable:
-bad address 0x........
- Address 0x........ is 2 bytes inside data symbol "undefined"
-Address 0x........ len 2 not addressable:
-bad address 0x........
- Address 0x........ is 2 bytes inside data symbol "undefined"
-____
-Address 0x........ len 2 has 2 bytes unaddressable
-Address 0x........ len 6 addressable
- Address 0x........ is 4 bytes inside data symbol "undefined"
-Address 0x........ len 6 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 4 bytes inside data symbol "undefined"
-ffffff00 ff00
-Address 0x........ len 10 not addressable:
-bad address 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 not addressable:
-bad address 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-0000____ 00000000 0000
-Address 0x........ len 10 has 2 bytes unaddressable
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
monitor command request to kill this process
Remote connection closed
=================================================
./valgrind-new/helgrind/tests/cond_timedwait_invalid.stderr.diff
=================================================
--- cond_timedwait_invalid.stderr.exp 2011-10-22 00:07:52.000000000 -0500
+++ cond_timedwait_invalid.stderr.out 2011-10-22 00:37:19.000000000 -0500
@@ -9,6 +9,7 @@
with error code 22 (EINVAL: Invalid argument)
at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...)
by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
+ ...
by 0x........: main (cond_timedwait_invalid.c:16)
=================================================
./valgrind-new/helgrind/tests/hg05_race2.stderr.diff
=================================================
--- hg05_race2.stderr.exp 2011-10-22 00:07:52.000000000 -0500
+++ hg05_race2.stderr.out 2011-10-22 00:37:46.000000000 -0500
@@ -29,9 +29,6 @@
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
-Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
-declared at hg05_race2.c:24, in frame #x of thread x
-
----------------------------------------------------------------
Possible data race during write of size 4 at 0x........ by thread #x
@@ -46,8 +43,5 @@
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
-Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
-declared at hg05_race2.c:24, in frame #x of thread x
-
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc18_semabuse.stderr.diff
=================================================
--- tc18_semabuse.stderr.exp 2011-10-22 00:07:52.000000000 -0500
+++ tc18_semabuse.stderr.out 2011-10-22 00:39:04.000000000 -0500
@@ -18,13 +18,5 @@
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:34)
-----------------------------------------------------------------
-Thread #x's call to sem_post failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_post_WRK (hg_intercepts.c:...)
- by 0x........: sem_post (hg_intercepts.c:...)
- by 0x........: main (tc18_semabuse.c:37)
-
-
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc20_verifywrap.stderr.diff
=================================================
--- tc20_verifywrap.stderr.exp 2011-10-22 00:07:52.000000000 -0500
+++ tc20_verifywrap.stderr.out 2011-10-22 00:39:26.000000000 -0500
@@ -215,14 +215,6 @@
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:242)
-----------------------------------------------------------------
-
-Thread #x's call to sem_post failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_post_WRK (hg_intercepts.c:...)
- by 0x........: sem_post (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:245)
-
FIXME: can't figure out how to verify wrap of sem_post
@@ -235,4 +227,4 @@
...
-ERROR SUMMARY: 23 errors from 23 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 22 errors from 22 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc23_bogus_condwait.stderr.diff
=================================================
--- tc23_bogus_condwait.stderr.exp 2011-10-22 00:07:52.000000000 -0500
+++ tc23_bogus_condwait.stderr.out 2011-10-22 00:39:40.000000000 -0500
@@ -24,33 +24,25 @@
by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:72)
-----------------------------------------------------------------
-
-Thread #x: pthread_cond_{timed}wait called with mutex of type pthread_rwlock_t*
- at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
- by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
- by 0x........: main (tc23_bogus_condwait.c:75)
+tc23_bogus_condwait: tpp.c:66: __pthread_tpp_change_priority: Assertion `previous_prio == -1 || (previous_prio >= __sched_fifo_min_prio && previous_prio <= __sched_fifo_max_prio)' failed.
+---Thread-Announcement------------------------------------------
-----------------------------------------------------------------
-
-Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
- by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
- by 0x........: main (tc23_bogus_condwait.c:75)
+Thread #x was created
+ ...
+ by 0x........: pthread_create_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_create@* (hg_intercepts.c:...)
+ by 0x........: main (tc23_bogus_condwait.c:61)
----------------------------------------------------------------
-Thread #x: pthread_cond_{timed}wait called with mutex held by a different thread
- at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
- by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
- by 0x........: main (tc23_bogus_condwait.c:78)
-
-----------------------------------------------------------------
-
-Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
- by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
- by 0x........: main (tc23_bogus_condwait.c:78)
+Thread #x: Exiting thread still holds 1 lock
+ ...
+ by 0x........: sem_wait_WRK (hg_intercepts.c:...)
+ by 0x........: sem_wait (hg_intercepts.c:...)
+ by 0x........: my_sem_wait (tc23_bogus_condwait.c:134)
+ by 0x........: grab_the_lock (tc23_bogus_condwait.c:41)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
-ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/massif/tests/big-alloc.post.diff
=================================================
--- big-alloc.post.exp 2011-10-22 00:08:00.000000000 -0500
+++ big-alloc.post.out 2011-10-22 00:33:51.000000000 -0500
@@ -36,19 +36,19 @@
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
--------------------------------------------------------------------------------
0 0 0 0 0 0
- 1 10,489,832 10,489,832 10,485,760 4,072 0
- 2 20,979,664 20,979,664 20,971,520 8,144 0
- 3 31,469,496 31,469,496 31,457,280 12,216 0
- 4 41,959,328 41,959,328 41,943,040 16,288 0
- 5 52,449,160 52,449,160 52,428,800 20,360 0
- 6 62,938,992 62,938,992 62,914,560 24,432 0
- 7 73,428,824 73,428,824 73,400,320 28,504 0
- 8 83,918,656 83,918,656 83,886,080 32,576 0
- 9 94,408,488 94,408,488 94,371,840 36,648 0
+ 1 10,489,816 10,489,816 10,485,760 4,056 0
+ 2 20,979,632 20,979,632 20,971,520 8,112 0
+ 3 31,469,448 31,469,448 31,457,280 12,168 0
+ 4 41,959,264 41,959,264 41,943,040 16,224 0
+ 5 52,449,080 52,449,080 52,428,800 20,280 0
+ 6 62,938,896 62,938,896 62,914,560 24,336 0
+ 7 73,428,712 73,428,712 73,400,320 28,392 0
+ 8 83,918,528 83,918,528 83,886,080 32,448 0
+ 9 94,408,344 94,408,344 94,371,840 36,504 0
99.96% (94,371,840B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->99.96% (94,371,840B) 0x........: main (big-alloc.c:12)
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
--------------------------------------------------------------------------------
- 10 104,898,320 104,898,320 104,857,600 40,720 0
+ 10 104,898,160 104,898,160 104,857,600 40,560 0
=================================================
./valgrind-new/massif/tests/big-alloc.post.diff-64bit
=================================================
--- big-alloc.post.exp-64bit 2011-10-22 00:08:00.000000000 -0500
+++ big-alloc.post.out 2011-10-22 00:33:51.000000000 -0500
@@ -36,19 +36,19 @@
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
--------------------------------------------------------------------------------
0 0 0 0 0 0
- 1 10,489,800 10,489,800 10,485,760 4,040 0
- 2 20,979,600 20,979,600 20,971,520 8,080 0
- 3 31,469,400 31,469,400 31,457,280 12,120 0
- 4 41,959,200 41,959,200 41,943,040 16,160 0
- 5 52,449,000 52,449,000 52,428,800 20,200 0
- 6 62,938,800 62,938,800 62,914,560 24,240 0
- 7 73,428,600 73,428,600 73,400,320 28,280 0
- 8 83,918,400 83,918,400 83,886,080 32,320 0
- 9 94,408,200 94,408,200 94,371,840 36,360 0
+ 1 10,489,816 10,489,816 10,485,760 4,056 0
+ 2 20,979,632 20,979,632 20,971,520 8,112 0
+ 3 31,469,448 31,469,448 31,457,280 12,168 0
+ 4 41,959,264 41,959,264 41,943,040 16,224 0
+ 5 52,449,080 52,449,080 52,428,800 20,280 0
+ 6 62,938,896 62,938,896 62,914,560 24,336 0
+ 7 73,428,712 73,428,712 73,400,320 28,392 0
+ 8 83,918,528 83,918,528 83,886,080 32,448 0
+ 9 94,408,344 94,408,344 94,371,840 36,504 0
99.96% (94,371,840B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->99.96% (94,371,840B) 0x........: main (big-alloc.c:12)
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
--------------------------------------------------------------------------------
- 10 104,898,000 104,898,000 104,857,600 40,400 0
+ 10 104,898,160 104,898,160 104,857,600 40,560 0
=================================================
./valgrind-new/massif/tests/deep-D.post.diff
=================================================
--- deep-D.post.exp 2011-10-22 00:08:00.000000000 -0500
+++ deep-D.post.out 2011-10-22 00:33:59.000000000 -0500
@@ -46,8 +46,9 @@
8 3,264 3,264 3,200 64 0
9 3,672 3,672 3,600 72 0
98.04% (3,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
-->98.04% (3,600B) 0x........: (below main)
-
+->98.04% (3,600B) 0x........: ??? (in /...libc...)
+ ->98.04% (3,600B) 0x........: (below main)
+
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
--------------------------------------------------------------------------------
=================================================
./valgrind-new/massif/tests/overloaded-new.post.diff
=================================================
--- overloaded-new.post.exp 2011-10-22 00:08:00.000000000 -0500
+++ overloaded-new.post.out 2011-10-22 00:34:11.000000000 -0500
@@ -42,14 +42,18 @@
4 12,032 12,032 12,000 32 0
5 12,032 12,032 12,000 32 0
99.73% (12,000B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
-->33.24% (4,000B) 0x........: main (overloaded-new.cpp:49)
-|
-->33.24% (4,000B) 0x........: main (overloaded-new.cpp:50)
-|
-->16.62% (2,000B) 0x........: main (overloaded-new.cpp:51)
-|
-->16.62% (2,000B) 0x........: main (overloaded-new.cpp:52)
-
+->33.24% (4,000B) 0x........: operator new(unsigned int) (overloaded-new.cpp:19)
+| ->33.24% (4,000B) 0x........: main (overloaded-new.cpp:49)
+|
+->33.24% (4,000B) 0x........: operator new(unsigned int, std::nothrow_t const&) (overloaded-new.cpp:24)
+| ->33.24% (4,000B) 0x........: main (overloaded-new.cpp:50)
+|
+->16.62% (2,000B) 0x........: operator new[](unsigned int) (overloaded-new.cpp:29)
+| ->16.62% (2,000B) 0x........: main (overloaded-new.cpp:51)
+|
+->16.62% (2,000B) 0x........: operator new[](unsigned int, std::nothrow_t const&) (overloaded-new.cpp:34)
+ ->16.62% (2,000B) 0x........: main (overloaded-new.cpp:52)
+
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
--------------------------------------------------------------------------------
=================================================
./valgrind-new/memcheck/tests/linux/stack_changes.stderr.diff
=================================================
--- stack_changes.stderr.exp 2011-10-22 00:07:58.000000000 -0500
+++ stack_changes.stderr.out 2011-10-22 00:28:14.000000000 -0500
@@ -0,0 +1,5 @@
+WARNING: unhandled syscall: 249
+You may be able to write your own handler.
+Read the file README_MISSING_SYSCALL_OR_IOCTL.
+Nevertheless we consider this a bug. Please report
+it at http://valgrind.org/support/bug_reports.html.
=================================================
./valgrind-new/memcheck/tests/supp_unknown.stderr.diff
=================================================
--- supp_unknown.stderr.exp 2011-10-22 00:07:59.000000000 -0500
+++ supp_unknown.stderr.out 2011-10-22 00:31:34.000000000 -0500
@@ -1,8 +1,11 @@
+Jump to the invalid address stated on the next line
+ ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
Process terminating with default action of signal 11 (SIGSEGV)
Access not within mapped region at address 0x........
...
- by 0x........: main (badjump.c:17)
If you believe this happened as a result of a stack
overflow in your program's main thread (unlikely but
possible), you can try to increase the size of the
=================================================
./valgrind-new/memcheck/tests/supp_unknown.stderr.diff-kfail
=================================================
--- supp_unknown.stderr.exp-kfail 2011-10-22 00:07:59.000000000 -0500
+++ supp_unknown.stderr.out 2011-10-22 00:31:34.000000000 -0500
@@ -1,3 +1,7 @@
+Jump to the invalid address stated on the next line
+ ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
Process terminating with default action of signal 11 (SIGSEGV)
Access not within mapped region at address 0x........
=================================================
./valgrind-new/memcheck/tests/varinfo6.stderr.diff
=================================================
--- varinfo6.stderr.exp 2011-10-22 00:07:59.000000000 -0500
+++ varinfo6.stderr.out 2011-10-22 00:32:16.000000000 -0500
@@ -7,8 +7,7 @@
by 0x........: BZ2_bzCompress (varinfo6.c:4860)
by 0x........: BZ2_bzBuffToBuffCompress (varinfo6.c:5667)
by 0x........: main (varinfo6.c:6517)
- Location 0x........ is 2 bytes inside local var "budget"
- declared at varinfo6.c:3115, in frame #2 of thread 1
+ Address 0x........ is on thread 1's stack
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo6.c:34)
=================================================
./valgrind-new/memcheck/tests/varinfo6.stderr.diff-ppc64
=================================================
--- varinfo6.stderr.exp-ppc64 2011-10-22 00:07:59.000000000 -0500
+++ varinfo6.stderr.out 2011-10-22 00:32:16.000000000 -0500
@@ -1,5 +1,5 @@
Uninitialised byte(s) found during client check request
- at 0x........: croak (varinfo6.c:35)
+ at 0x........: croak (varinfo6.c:34)
by 0x........: mainSort (varinfo6.c:2999)
by 0x........: BZ2_blockSort (varinfo6.c:3143)
by 0x........: BZ2_compressBlock (varinfo6.c:4072)
@@ -10,7 +10,7 @@
Address 0x........ is on thread 1's stack
Uninitialised byte(s) found during client check request
- at 0x........: croak (varinfo6.c:35)
+ at 0x........: croak (varinfo6.c:34)
by 0x........: BZ2_decompress (varinfo6.c:1699)
by 0x........: BZ2_bzDecompress (varinfo6.c:5230)
by 0x........: BZ2_bzBuffToBuffDecompress (varinfo6.c:5715)
=================================================
./valgrind-new/none/tests/ppc32/jm-fp.stderr.diff
=================================================
--- jm-fp.stderr.exp 2011-10-22 00:08:09.000000000 -0500
+++ jm-fp.stderr.out 2011-10-22 00:35:44.000000000 -0500
@@ -1,2 +1,27 @@
+disInstr(ppc): declined to decode a GeneralPurpose-Optional insn.
+disInstr(ppc): unhandled instruction: 0x........
+ primary 63(0x........), secondary 44(0x........)
+valgrind: Unrecognised instruction at address 0x.........
+ at 0x........: test_fsqrt (jm-insns.c:1984)
+ by 0x........: test_float_one_arg (jm-insns.c:5739)
+ by 0x........: ??? (in /...libc...)
+ by 0x........: (below main)
+Your program just tried to execute an instruction that Valgrind
+did not recognise. There are two possible reasons for this.
+1. Your program has a bug and erroneously jumped to a non-code
+ location. If you are running Memcheck and you just saw a
+ warning about a bad jump, it's probably your program's fault.
+2. The instruction is legitimate but Valgrind doesn't handle it,
+ i.e. it's Valgrind's fault. If you think this is the case or
+ you are not sure, please let us know and we'll try to fix it.
+Either way, Valgrind will now raise a SIGILL signal which will
+probably kill your program.
+
+Process terminating with default action of signal 4 (SIGILL)
+ Illegal opcode at address 0x........
+ at 0x........: test_fsqrt (jm-insns.c:1984)
+ by 0x........: test_float_one_arg (jm-insns.c:5739)
+ by 0x........: ??? (in /...libc...)
+ by 0x........: (below main)
=================================================
./valgrind-new/none/tests/ppc32/jm-fp.stdout.diff
=================================================
--- jm-fp.stdout.exp 2011-10-22 00:08:09.000000000 -0500
+++ jm-fp.stdout.out 2011-10-22 00:35:44.000000000 -0500
@@ -707,8 +707,8 @@
fres 7ff8000000000000 => 7ff8000000000000
fres fff8000000000000 => fff8000000000000
- frsqrte 0010000000000001 => 5fdf000000000000
- frsqrte 00100094e0000359 => 5fdf000000000000
+ frsqrte 0010000000000001 => 5fdf800000000000
+ frsqrte 00100094e0000359 => 5fdf800000000000
frsqrte 3fe0000000000001 => 3ff6000000000000
frsqrte 3fe00094e0000359 => 3ff6000000000000
frsqrte 8010000000000001 => 7ff8000000000000
@@ -794,638 +794,4 @@
fneg 0010000000000001 => 8010000000000001
fneg 00100094e0000359 => 80100094e0000359
- fneg 3fe0000000000001 => bfe0000000000001
- fneg 3fe00094e0000359 => bfe00094e0000359
- fneg 8010000000000001 => 0010000000000001
- fneg 80100094e0000359 => 00100094e0000359
- fneg bfe0000000000001 => 3fe0000000000001
- fneg bfe00094e0000359 => 3fe00094e0000359
- fneg 0000000000000000 => 8000000000000000
- fneg 8000000000000000 => 0000000000000000
- fneg 7ff0000000000000 => fff0000000000000
- fneg fff0000000000000 => 7ff0000000000000
- fneg 7ff7ffffffffffff => fff7ffffffffffff
- fneg fff7ffffffffffff => 7ff7ffffffffffff
- fneg 7ff8000000000000 => fff8000000000000
- fneg fff8000000000000 => 7ff8000000000000
-
- fabs 0010000000000001 => 0010000000000001
- fabs 00100094e0000359 => 00100094e0000359
- fabs 3fe0000000000001 => 3fe0000000000001
- fabs 3fe00094e0000359 => 3fe00094e0000359
- fabs 8010000000000001 => 0010000000000001
- fabs 80100094e0000359 => 00100094e0000359
- fabs bfe0000000000001 => 3fe0000000000001
- fabs bfe00094e0000359 => 3fe00094e0000359
- fabs 0000000000000000 => 0000000000000000
- fabs 8000000000000000 => 0000000000000000
- fabs 7ff0000000000000 => 7ff0000000000000
- fabs fff0000000000000 => 7ff0000000000000
- fabs 7ff7ffffffffffff => 7ff7ffffffffffff
- fabs fff7ffffffffffff => 7ff7ffffffffffff
- fabs 7ff8000000000000 => 7ff8000000000000
- fabs fff8000000000000 => 7ff8000000000000
-
- fnabs 0010000000000001 => 8010000000000001
- fnabs 00100094e0000359 => 80100094e0000359
- fnabs 3fe0000000000001 => bfe0000000000001
- fnabs 3fe00094e0000359 => bfe00094e0000359
- fnabs 8010000000000001 => 8010000000000001
- fnabs 80100094e0000359 => 80100094e0000359
- fnabs bfe0000000000001 => bfe0000000000001
- fnabs bfe00094e0000359 => bfe00094e0000359
- fnabs 0000000000000000 => 8000000000000000
- fnabs 8000000000000000 => 8000000000000000
- fnabs 7ff0000000000000 => fff0000000000000
- fnabs fff0000000000000 => fff0000000000000
- fnabs 7ff7ffffffffffff => fff7ffffffffffff
- fnabs fff7ffffffffffff => fff7ffffffffffff
- fnabs 7ff8000000000000 => fff8000000000000
- fnabs fff8000000000000 => fff8000000000000
-
- fsqrt 0010000000000001 => 2000000000000000
- fsqrt 00100094e0000359 => 2000004a6f52dd4a
- fsqrt 3fe0000000000001 => 3fe6a09e667f3bcd
- fsqrt 3fe00094e0000359 => 3fe6a107aacb50df
- fsqrt 8010000000000001 => 7ff8000000000000
- fsqrt 80100094e0000359 => 7ff8000000000000
- fsqrt bfe0000000000001 => 7ff8000000000000
- fsqrt bfe00094e0000359 => 7ff8000000000000
- fsqrt 0000000000000000 => 0000000000000000
- fsqrt 8000000000000000 => 8000000000000000
- fsqrt 7ff0000000000000 => 7ff0000000000000
- fsqrt fff0000000000000 => 7ff8000000000000
- fsqrt 7ff7ffffffffffff => 7fffffffffffffff
- fsqrt fff7ffffffffffff => ffffffffffffffff
- fsqrt 7ff8000000000000 => 7ff8000000000000
- fsqrt fff8000000000000 => fff8000000000000
-
-PPC floating point arith insns
- with one arg with flags update:
- fres. 0010000000000001 => 7ff0000000000000
- fres. 00100094e0000359 => 7ff0000000000000
- fres. 3fe0000000000001 => 4000000000000000
- fres. 3fe00094e0000359 => 3ffff00000000000
- fres. 8010000000000001 => fff0000000000000
- fres. 80100094e0000359 => fff0000000000000
- fres. bfe0000000000001 => c000000000000000
- fres. bfe00094e0000359 => bffff00000000000
- fres. 0000000000000000 => 7ff0000000000000
- fres. 8000000000000000 => fff0000000000000
- fres. 7ff0000000000000 => 0000000000000000
- fres. fff0000000000000 => 8000000000000000
- fres. 7ff7ffffffffffff => 7ffff00000000000
- fres. fff7ffffffffffff => fffff00000000000
- fres. 7ff8000000000000 => 7ff8000000000000
<truncated beyond 100 lines>
=================================================
./valgrind-new/none/tests/ppc32/power5+_round.stderr.diff
=================================================
--- power5+_round.stderr.exp 2011-10-22 00:08:09.000000000 -0500
+++ power5+_round.stderr.out 2011-10-22 00:35:52.000000000 -0500
@@ -1,2 +1,20 @@
+disInstr(ppc): unhandled instruction: 0x........
+ primary 63(0x........), secondary 784(0x........)
+valgrind: Unrecognised instruction at address 0x.........
+ at 0x........: main (power5+_round.c:124)
+Your program just tried to execute an instruction that Valgrind
+did not recognise. There are two possible reasons for this.
+1. Your program has a bug and erroneously jumped to a non-code
+ location. If you are running Memcheck and you just saw a
+ warning about a bad jump, it's probably your program's fault.
+2. The instruction is legitimate but Valgrind doesn't handle it,
+ i.e. it's Valgrind's fault. If you think this is the case or
+ you are not sure, please let us know and we'll try to fix it.
+Either way, Valgrind will now raise a SIGILL signal which will
+probably kill your program.
+
+Process terminating with default action of signal 4 (SIGILL)
+ Illegal opcode at address 0x........
+ at 0x........: main (power5+_round.c:124)
=================================================
./valgrind-new/none/tests/ppc32/power5+_round.stdout.diff
=================================================
--- power5+_round.stdout.exp 2011-10-22 00:08:09.000000000 -0500
+++ power5+_round.stdout.out 2011-10-22 00:35:51.000000000 -0500
@@ -1,60 +0,0 @@
-frin inf inf 0 PASS
-frin 1.9 2 0 PASS
-frin 1.1 1 0 PASS
-frin 0 0 0 PASS
-frin -0 -0 0 PASS
-frin -1.1 -1 0 PASS
-frin -1.9 -2 0 PASS
-frin -inf -inf 0 PASS
-frin nan nan 0 PASS
-frin 0.9 1 0 PASS
-frin 0.1 0 0 PASS
-frin -0.1 -0 0 PASS
-frin -0.9 -1 0 PASS
-frin 1e-40 0 0 PASS
-frin -1e-40 -0 0 PASS
-friz inf inf 0 PASS
-friz 1.9 1 0 PASS
-friz 1.1 1 0 PASS
-friz 0 0 0 PASS
-friz -0 -0 0 PASS
-friz -1.1 -1 0 PASS
-friz -1.9 -1 0 PASS
-friz -inf -inf 0 PASS
-friz nan nan 0 PASS
-friz 0.9 0 0 PASS
-friz 0.1 0 0 PASS
-friz -0.1 -0 0 PASS
-friz -0.9 -0 0 PASS
-friz 1e-40 0 0 PASS
-friz -1e-40 -0 0 PASS
-frip inf inf 0 PASS
-frip 1.9 2 0 PASS
-frip 1.1 2 0 PASS
-frip 0 0 0 PASS
-frip -0 -0 0 PASS
-frip -1.1 -1 0 PASS
-frip -1.9 -1 0 PASS
-frip -inf -inf 0 PASS
-frip nan nan 0 PASS
-frip 0.9 1 0 PASS
-frip 0.1 1 0 PASS
-frip -0.1 -0 0 PASS
-frip -0.9 -0 0 PASS
-frip 1e-40 1 0 PASS
-frip -1e-40 -0 0 PASS
-frim inf inf 0 PASS
-frim 1.9 1 0 PASS
-frim 1.1 1 0 PASS
-frim 0 0 0 PASS
-frim -0 -0 0 PASS
-frim -1.1 -2 0 PASS
-frim -1.9 -2 0 PASS
-frim -inf -inf 0 PASS
-frim nan nan 0 PASS
-frim 0.9 0 0 PASS
-frim 0.1 0 0 PASS
-frim -0.1 -1 0 PASS
-frim -0.9 -1 0 PASS
-frim 1e-40 0 0 PASS
-frim -1e-40 -1 0 PASS
=================================================
./valgrind-new/none/tests/ppc32/round.stderr.diff
=================================================
--- round.stderr.exp 2011-10-22 00:08:09.000000000 -0500
+++ round.stderr.out 2011-10-22 00:35:54.000000000 -0500
@@ -1,2 +1,25 @@
+disInstr(ppc): declined to decode a GeneralPurpose-Optional insn.
+disInstr(ppc): unhandled instruction: 0x........
+ primary 63(0x........), secondary 44(0x........)
+valgrind: Unrecognised instruction at address 0x.........
+ at 0x........: check_double_guarded_arithmetic_op (round.c:1116)
+ by 0x........: test_float_arithmetic_ops (round.c:1185)
+ by 0x........: main (round.c:1206)
+Your program just tried to execute an instruction that Valgrind
+did not recognise. There are two possible reasons for this.
+1. Your program has a bug and erroneously jumped to a non-code
+ location. If you are running Memcheck and you just saw a
+ warning about a bad jump, it's probably your program's fault.
+2. The instruction is legitimate but Valgrind doesn't handle it,
+ i.e. it's Valgrind's fault. If you think this is the case or
+ you are not sure, please let us know and we'll try to fix it.
+Either way, Valgrind will now raise a SIGILL signal which will
+probably kill your program.
+
+Process terminating with default action of signal 4 (SIGILL)
+ Illegal opcode at address 0x........
+ at 0x........: check_double_guarded_arithmetic_op (round.c:1116)
+ by 0x........: test_float_arithmetic_ops (round.c:1185)
+ by 0x........: main (round.c:1206)
=================================================
./valgrind-new/none/tests/ppc32/round.stdout.diff
=================================================
--- round.stdout.exp 2011-10-22 00:08:09.000000000 -0500
+++ round.stdout.out 2011-10-22 00:35:54.000000000 -0500
@@ -2259,77 +2259,4 @@
-inf:PASSED:fnmsub(-0x1.000000000000bp+0, 0x1.2p+0 , 0x1.0000000000001p-1) = 0x1.a00000000000dp+0
-inf:PASSED:fnmsub(-0x1.000000000000cp+0, 0x1.2p+0 , 0x1.0000000000001p-1) = 0x1.a00000000000ep+0
-inf:PASSED:fnmsub(-0x1.000000000000dp+0, 0x1.2p+0 , 0x1.0000000000001p-1) = 0x1.a00000000001p+0
--inf:PASSED:fnmsub(-0x1.000000000000ep+0, 0x1.2p+0 , 0x1.0000000000001p-1) = 0x1.a000000000011p+0
--inf:PASSED:fnmsub(-0x1.000000000000fp+0, 0x1.2p+0 , 0x1.0000000000001p-1) = 0x1.a000000000012p+0
--inf:PASSED:fnmsub(0x1p+0 , 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.ap+0
--inf:PASSED:fnmsub(0x1.0000000000001p+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a000000000001p+0
--inf:PASSED:fnmsub(0x1.0000000000002p+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a000000000002p+0
--inf:PASSED:fnmsub(0x1.0000000000003p+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a000000000003p+0
--inf:PASSED:fnmsub(0x1.0000000000004p+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a000000000005p+0
--inf:PASSED:fnmsub(0x1.0000000000005p+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a000000000006p+0
--inf:PASSED:fnmsub(0x1.0000000000006p+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a000000000007p+0
--inf:PASSED:fnmsub(0x1.0000000000007p+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a000000000008p+0
--inf:PASSED:fnmsub(0x1.0000000000008p+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a000000000009p+0
--inf:PASSED:fnmsub(0x1.0000000000009p+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a00000000000ap+0
--inf:PASSED:fnmsub(0x1.000000000000ap+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a00000000000bp+0
--inf:PASSED:fnmsub(0x1.000000000000bp+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a00000000000cp+0
--inf:PASSED:fnmsub(0x1.000000000000cp+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a00000000000ep+0
--inf:PASSED:fnmsub(0x1.000000000000dp+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a00000000000fp+0
--inf:PASSED:fnmsub(0x1.000000000000ep+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a00000000001p+0
--inf:PASSED:fnmsub(0x1.000000000000fp+0, 0x1.2p+0 , -0x1.0000000000001p-1) = -0x1.a000000000011p+0
-near:PASSED:fsqrt(0x1.a44p-1 ) = 0x1.cfdcaf353049ep-1
-near:PASSED:fsqrt(0x1.a822p+0 ) = 0x1.498302b49cd6dp+0
-near:PASSED:fsqrt(0x1.05a2p+0 ) = 0x1.02cd13b44f3bfp+0
-near:PASSED:fsqrt(0x1.9504p-1 ) = 0x1.c76073cec0937p-1
-near:PASSED:fsqrt(0x1.dca2p+0 ) = 0x1.5d4f8d4e4c2b2p+0
-near:PASSED:fsqrt(0x1.02c8p+0 ) = 0x1.016309cde7483p+0
-near:PASSED:fsqrt(0x1.b9p-1 ) = 0x1.db2cfe686fe7cp-1
-near:PASSED:fsqrt(0x1.1d02p+0 ) = 0x1.0e1d62e78ed9ep+0
-near:PASSED:fsqrt(0x1.c39p-1 ) = 0x1.e0d526020fb6cp-1
-near:PASSED:fsqrt(0x1.9p-1 ) = 0x1.c48c6001f0acp-1
-near:PASSED:fsqrt(0x1.4852p+0 ) = 0x1.21e9ed813e2e3p+0
-near:PASSED:fsqrt(0x1.e984p-1 ) = 0x1.f4a1b09bbf0b1p-1
-near:PASSED:fsqrt(0x1.9a1p-1 ) = 0x1.ca34879b907afp-1
-near:PASSED:fsqrt(0x1.76b2p+0 ) = 0x1.35b6781aed828p+0
-zero:PASSED:fsqrt(0x1.a44p-1 ) = 0x1.cfdcaf353049ep-1
-zero:PASSED:fsqrt(0x1.a822p+0 ) = 0x1.498302b49cd6dp+0
-zero:PASSED:fsqrt(0x1.05a2p+0 ) = 0x1.02cd13b44f3bfp+0
-zero:PASSED:fsqrt(0x1.9504p-1 ) = 0x1.c76073cec0937p-1
-zero:PASSED:fsqrt(0x1.dca2p+0 ) = 0x1.5d4f8d4e4c2b2p+0
-zero:PASSED:fsqrt(0x1.02c8p+0 ) = 0x1.016309cde7483p+0
-zero:PASSED:fsqrt(0x1.b9p-1 ) = 0x1.db2cfe686fe7cp-1
-zero:PASSED:fsqrt(0x1.1d02p+0 ) = 0x1.0e1d62e78ed9dp+0
-zero:PASSED:fsqrt(0x1.c39p-1 ) = 0x1.e0d526020fb6bp-1
-zero:PASSED:fsqrt(0x1.9p-1 ) = 0x1.c48c6001f0abfp-1
-zero:PASSED:fsqrt(0x1.4852p+0 ) = 0x1.21e9ed813e2e2p+0
-zero:PASSED:fsqrt(0x1.e984p-1 ) = 0x1.f4a1b09bbf0bp-1
-zero:PASSED:fsqrt(0x1.9a1p-1 ) = 0x1.ca34879b907aep-1
-zero:PASSED:fsqrt(0x1.76b2p+0 ) = 0x1.35b6781aed827p+0
-+inf:PASSED:fsqrt(0x1.a44p-1 ) = 0x1.cfdcaf353049fp-1
-+inf:PASSED:fsqrt(0x1.a822p+0 ) = 0x1.498302b49cd6ep+0
-+inf:PASSED:fsqrt(0x1.05a2p+0 ) = 0x1.02cd13b44f3cp+0
-+inf:PASSED:fsqrt(0x1.9504p-1 ) = 0x1.c76073cec0938p-1
-+inf:PASSED:fsqrt(0x1.dca2p+0 ) = 0x1.5d4f8d4e4c2b3p+0
-+inf:PASSED:fsqrt(0x1.02c8p+0 ) = 0x1.016309cde7484p+0
-+inf:PASSED:fsqrt(0x1.b9p-1 ) = 0x1.db2cfe686fe7dp-1
-+inf:PASSED:fsqrt(0x1.1d02p+0 ) = 0x1.0e1d62e78ed9ep+0
-+inf:PASSED:fsqrt(0x1.c39p-1 ) = 0x1.e0d526020fb6cp-1
-+inf:PASSED:fsqrt(0x1.9p-1 ) = 0x1.c48c6001f0acp-1
-+inf:PASSED:fsqrt(0x1.4852p+0 ) = 0x1.21e9ed813e2e3p+0
-+inf:PASSED:fsqrt(0x1.e984p-1 ) = 0x1.f4a1b09bbf0b1p-1
-+inf:PASSED:fsqrt(0x1.9a1p-1 ) = 0x1.ca34879b907afp-1
-+inf:PASSED:fsqrt(0x1.76b2p+0 ) = 0x1.35b6781aed828p+0
--inf:PASSED:fsqrt(0x1.a44p-1 ) = 0x1.cfdcaf353049ep-1
--inf:PASSED:fsqrt(0x1.a822p+0 ) = 0x1.498302b49cd6dp+0
--inf:PASSED:fsqrt(0x1.05a2p+0 ) = 0x1.02cd13b44f3bfp+0
--inf:PASSED:fsqrt(0x1.9504p-1 ) = 0x1.c76073cec0937p-1
--inf:PASSED:fsqrt(0x1.dca2p+0 ) = 0x1.5d4f8d4e4c2b2p+0
--inf:PASSED:fsqrt(0x1.02c8p+0 ) = 0x1.016309cde7483p+0
--inf:PASSED:fsqrt(0x1.b9p-1 ) = 0x1.db2cfe686fe7cp-1
--inf:PASSED:fsqrt(0x1.1d02p+0 ) = 0x1.0e1d62e78ed9dp+0
--inf:PASSED:fsqrt(0x1.c39p-1 ) = 0x1.e0d526020fb6bp-1
--inf:PASSED:fsqrt(0x1.9p-1 ) = 0x1.c48c6001f0abfp-1
--inf:PASSED:fsqrt(0x1.4852p+0 ) = 0x1.21e9ed813e2e2p+0
--inf:PASSED:fsqrt(0x1.e984p-1 ) = 0x1.f4a1b09bbf0bp-1
--inf:PASSED:fsqrt(0x1.9a1p-1 ) = 0x1.ca34879b907aep-1
--inf:PASSED:fsqrt(0x1.76b2p+0 ) = 0x1.35b6781aed827p+0
+-inf:PASSED:fnmsub(-0x1.000000000000ep+0, 0x1.2p+0 , 0x1.0000000000001p-1) = 0x1.a000000000
\ No newline at end of file
=================================================
./valgrind-new/none/tests/ppc32/test_fx.stderr.diff
=================================================
--- test_fx.stderr.exp 2011-10-22 00:08:09.000000000 -0500
+++ test_fx.stderr.out 2011-10-22 00:35:55.000000000 -0500
@@ -1,2 +1,25 @@
+disInstr(ppc): declined to decode a GeneralPurpose-Optional insn.
+disInstr(ppc): unhandled instruction: 0x........
+ primary 63(0x........), secondary 44(0x........)
+valgrind: Unrecognised instruction at address 0x.........
+ at 0x........: do_fsqrt (test_fx.c:9)
+ by 0x........: do_one (test_fx.c:48)
+ by 0x........: main (test_fx.c:81)
+Your program just tried to execute an instruction that Valgrind
+did not recognise. There are two possible reasons for this.
+1. Your program has a bug and erroneously jumped to a non-code
+ location. If you are running Memcheck and you just saw a
+ warning about a bad jump, it's probably your program's fault.
+2. The instruction is legitimate but Valgrind doesn't handle it,
+ i.e. it's Valgrind's fault. If you think this is the case or
+ you are not sure, please let us know and we'll try to fix it.
+Either way, Valgrind will now raise a SIGILL signal which will
+probably kill your program.
+
+Process terminating with default action of signal 4 (SIGILL)
+ Illegal opcode at address 0x........
+ at 0x........: do_fsqrt (test_fx.c:9)
+ by 0x........: do_one (test_fx.c:48)
+ by 0x........: main (test_fx.c:81)
=================================================
./valgrind-new/none/tests/ppc32/test_fx.stdout.diff
=================================================
--- test_fx.stdout.exp 2011-10-22 00:08:09.000000000 -0500
+++ test_fx.stdout.out 2011-10-22 00:35:54.000000000 -0500
@@ -1,40 +0,0 @@
-
-fsqrt 0.000000e+00 -> 0.00000000000000e+00
-fsqrt inf -> inf
-fsqrt -inf -> nan
-fsqrt nan -> nan
-fsqrt nan -> nan
-fsqrt -5.000000e+100 -> nan
-fsqrt -5.000000e+20 -> nan
-fsqrt -5.010000e+02 -> nan
-fsqrt -6.000000e+00 -> nan
-fsqrt -1.000000e+00 -> nan
-fsqrt -2.000000e-20 -> nan
-fsqrt -2.000000e-200 -> nan
-fsqrt 2.000000e-200 -> 1.41421356237310e-100
-fsqrt 2.000000e-20 -> 1.41421356237310e-10
-fsqrt 1.000000e+00 -> 1.00000000000000e+00
-fsqrt 6.000000e+00 -> 2.44948974278318e+00
-fsqrt 5.010000e+02 -> 2.23830292855994e+01
-fsqrt 5.000000e+20 -> 2.23606797749979e+10
-fsqrt 5.000000e+100 -> 2.23606797749979e+50
-
-fsqrts 0.000000e+00 -> 0.000000e+00
-fsqrts inf -> inf
-fsqrts -inf -> nan
-fsqrts nan -> nan
-fsqrts nan -> nan
-fsqrts -5.000000e+100 -> nan
-fsqrts -5.000000e+20 -> nan
-fsqrts -5.010000e+02 -> nan
-fsqrts -6.000000e+00 -> nan
-fsqrts -1.000000e+00 -> nan
-fsqrts -2.000000e-20 -> nan
-fsqrts -2.000000e-200 -> nan
-fsqrts 2.000000e-200 -> 1.414214e-100
-fsqrts 2.000000e-20 -> 1.414214e-10
-fsqrts 1.000000e+00 -> 1.000000e+00
-fsqrts 6.000000e+00 -> 2.449490e+00
-fsqrts 5.010000e+02 -> 2.238303e+01
-fsqrts 5.000000e+20 -> 2.236068e+10
-fsqrts 5.000000e+100 -> 2.236068e+50
=================================================
./valgrind-new/none/tests/ppc32/test_fx.stdout.diff_Minus_nan
=================================================
--- test_fx.stdout.exp_Minus_nan 2011-10-22 00:08:09.000000000 -0500
+++ test_fx.stdout.out 2011-10-22 00:35:54.000000000 -0500
@@ -1,40 +0,0 @@
-
-fsqrt 0.000000e+00 -> 0.00000000000000e+00
-fsqrt inf -> inf
-fsqrt -inf -> nan
-fsqrt nan -> nan
-fsqrt -nan -> -nan
-fsqrt -5.000000e+100 -> nan
-fsqrt -5.000000e+20 -> nan
-fsqrt -5.010000e+02 -> nan
-fsqrt -6.000000e+00 -> nan
-fsqrt -1.000000e+00 -> nan
-fsqrt -2.000000e-20 -> nan
-fsqrt -2.000000e-200 -> nan
-fsqrt 2.000000e-200 -> 1.41421356237310e-100
-fsqrt 2.000000e-20 -> 1.41421356237310e-10
-fsqrt 1.000000e+00 -> 1.00000000000000e+00
-fsqrt 6.000000e+00 -> 2.44948974278318e+00
-fsqrt 5.010000e+02 -> 2.23830292855994e+01
-fsqrt 5.000000e+20 -> 2.23606797749979e+10
-fsqrt 5.000000e+100 -> 2.23606797749979e+50
-
-fsqrts 0.000000e+00 -> 0.000000e+00
-fsqrts inf -> inf
-fsqrts -inf -> nan
-fsqrts nan -> nan
-fsqrts -nan -> -nan
-fsqrts -5.000000e+100 -> nan
-fsqrts -5.000000e+20 -> nan
-fsqrts -5.010000e+02 -> nan
-fsqrts -6.000000e+00 -> nan
-fsqrts -1.000000e+00 -> nan
-fsqrts -2.000000e-20 -> nan
-fsqrts -2.000000e-200 -> nan
-fsqrts 2.000000e-200 -> 1.414214e-100
-fsqrts 2.000000e-20 -> 1.414214e-10
-fsqrts 1.000000e+00 -> 1.000000e+00
-fsqrts 6.000000e+00 -> 2.449490e+00
-fsqrts 5.010000e+02 -> 2.238303e+01
-fsqrts 5.000000e+20 -> 2.236068e+10
-fsqrts 5.000000e+100 -> 2.236068e+50
=================================================
./valgrind-new/none/tests/ppc32/test_gx.stdout.diff
=================================================
--- test_gx.stdout.exp 2011-10-22 00:08:09.000000000 -0500
+++ test_gx.stdout.out 2011-10-22 00:35:56.000000000 -0500
@@ -51,13 +51,13 @@
frsqrte -1.010000e+00 -> nan
frsqrte -2.000000e-20 -> nan
frsqrte -2.000000e-200 -> nan
-frsqrte 2.000000e-200 -> 7.0e+99
+frsqrte 2.000000e-200 -> 7.1e+99
frsqrte 2.000000e-20 -> 7.1e+09
-frsqrte 1.010000e+00 -> 9.7e-01
+frsqrte 1.010000e+00 -> 9.8e-01
frsqrte 6.000000e+00 -> 4.0e-01
-frsqrte 5.010000e+02 -> 4.5e-02
-frsqrte 5.000000e+20 -> 4.5e-11
-frsqrte 5.000000e+100 -> 4.4e-51
+frsqrte 5.010000e+02 -> 4.4e-02
+frsqrte 5.000000e+20 -> 4.4e-11
+frsqrte 5.000000e+100 -> 4.5e-51
frsqrtes 0.000000e+00 -> inf
frsqrtes inf -> 0.0e+00
@@ -71,10 +71,10 @@
frsqrtes -1.010000e+00 -> nan
frsqrtes -2.000000e-20 -> nan
frsqrtes -2.000000e-200 -> nan
-frsqrtes 2.000000e-200 -> 7.0e+99
+frsqrtes 2.000000e-200 -> 7.1e+99
frsqrtes 2.000000e-20 -> 7.1e+09
-frsqrtes 1.010000e+00 -> 9.7e-01
+frsqrtes 1.010000e+00 -> 9.8e-01
frsqrtes 6.000000e+00 -> 4.0e-01
-frsqrtes 5.010000e+02 -> 4.5e-02
-frsqrtes 5.000000e+20 -> 4.5e-11
-frsqrtes 5.000000e+100 -> 4.4e-51
+frsqrtes 5.010000e+02 -> 4.4e-02
+frsqrtes 5.000000e+20 -> 4.4e-11
+frsqrtes 5.000000e+100 -> 4.5e-51
=================================================
./valgrind-new/none/tests/ppc32/test_gx.stdout.diff_Minus_nan
=================================================
--- test_gx.stdout.exp_Minus_nan 2011-10-22 00:08:09.000000000 -0500
+++ test_gx.stdout.out 2011-10-22 00:35:56.000000000 -0500
@@ -3,7 +3,7 @@
fre inf -> 0.0e+00
fre -inf -> -0.0e+00
fre nan -> nan
-fre -nan -> -nan
+fre nan -> nan
fre -5.000000e+100 -> -2.0e-101
fre -5.000000e+20 -> -2.0e-21
fre -5.010000e+02 -> -2.0e-03
@@ -23,7 +23,7 @@
fres inf -> 0.0e+00
fres -inf -> -0.0e+00
fres nan -> nan
-fres -nan -> -nan
+fres nan -> nan
fres -5.000000e+100 -> -0.0e+00
fres -5.000000e+20 -> -2.0e-21
fres -5.010000e+02 -> -2.0e-03
@@ -43,7 +43,7 @@
frsqrte inf -> 0.0e+00
frsqrte -inf -> nan
frsqrte nan -> nan
-frsqrte -nan -> -nan
+frsqrte nan -> nan
frsqrte -5.000000e+100 -> nan
frsqrte -5.000000e+20 -> nan
frsqrte -5.010000e+02 -> nan
@@ -53,17 +53,17 @@
frsqrte -2.000000e-200 -> nan
frsqrte 2.000000e-200 -> 7.1e+99
frsqrte 2.000000e-20 -> 7.1e+09
-frsqrte 1.010000e+00 -> 1.0e+00
-frsqrte 6.000000e+00 -> 4.1e-01
-frsqrte 5.010000e+02 -> 4.5e-02
-frsqrte 5.000000e+20 -> 4.5e-11
+frsqrte 1.010000e+00 -> 9.8e-01
+frsqrte 6.000000e+00 -> 4.0e-01
+frsqrte 5.010000e+02 -> 4.4e-02
+frsqrte 5.000000e+20 -> 4.4e-11
frsqrte 5.000000e+100 -> 4.5e-51
frsqrtes 0.000000e+00 -> inf
frsqrtes inf -> 0.0e+00
frsqrtes -inf -> nan
frsqrtes nan -> nan
-frsqrtes -nan -> -nan
+frsqrtes nan -> nan
frsqrtes -5.000000e+100 -> nan
frsqrtes -5.000000e+20 -> nan
frsqrtes -5.010000e+02 -> nan
@@ -73,8 +73,8 @@
frsqrtes -2.000000e-200 -> nan
frsqrtes 2.000000e-200 -> 7.1e+99
frsqrtes 2.000000e-20 -> 7.1e+09
-frsqrtes 1.010000e+00 -> 1.0e+00
-frsqrtes 6.000000e+00 -> 4.1e-01
-frsqrtes 5.010000e+02 -> 4.5e-02
-frsqrtes 5.000000e+20 -> 4.5e-11
+frsqrtes 1.010000e+00 -> 9.8e-01
+frsqrtes 6.000000e+00 -> 4.0e-01
+frsqrtes 5.010000e+02 -> 4.4e-02
+frsqrtes 5.000000e+20 -> 4.4e-11
frsqrtes 5.000000e+100 -> 4.5e-51
=================================================
./valgrind-old/gdbserver_tests/mcinfcallWSRU.stderrB.diff
=================================================
--- mcinfcallWSRU.stderrB.exp 2011-10-21 23:26:23.000000000 -0500
+++ mcinfcallWSRU.stderrB.out 2011-10-21 23:42:47.000000000 -0500
@@ -21,35 +21,33 @@
0x........ in do_burn () at sleepers.c:39
39 for (i = 0; i < burn; i++) loopnr++;
[Switching to thread 1 (Thread ....)]
-#0 0x........ in do_burn () at sleepers.c:39
+#0 0x........ in do_burn ()
+ ...
39 for (i = 0; i < burn; i++) loopnr++;
$1 = void
[Switching to thread 2 (Thread ....)]
#0 0x........ in syscall ...
-Could not write register "xxx"; remote failure reply 'E.
+Remote failure reply: E.
ERROR changing register xxx regno y
gdb commands changing registers (pc, sp, ...) (e.g. 'jump',
set pc, calling from gdb a function in the debugged process, ...)
can only be accepted if the thread is VgTs_Runnable or VgTs_Yielding state
Thread status is VgTs_WaitSys
-'
[Switching to thread 3 (Thread ....)]
#0 0x........ in syscall ...
-Could not write register "xxx"; remote failure reply 'E.
+Remote failure reply: E.
ERROR changing register xxx regno y
gdb commands changing registers (pc, sp, ...) (e.g. 'jump',
set pc, calling from gdb a function in the debugged process, ...)
can only be accepted if the thread is VgTs_Runnable or VgTs_Yielding state
Thread status is VgTs_WaitSys
-'
[Switching to thread 4 (Thread ....)]
#0 0x........ in syscall ...
-Could not write register "xxx"; remote failure reply 'E.
+Remote failure reply: E.
ERROR changing register xxx regno y
gdb commands changing registers (pc, sp, ...) (e.g. 'jump',
set pc, calling from gdb a function in the debugged process, ...)
can only be accepted if the thread is VgTs_Runnable or VgTs_Yielding state
Thread status is VgTs_WaitSys
-'
monitor command request to kill this process
Remote connection closed
=================================================
./valgrind-old/gdbserver_tests/mcvabits.stderrB.diff
=================================================
--- mcvabits.stderrB.exp 2011-10-21 23:26:23.000000000 -0500
+++ mcvabits.stderrB.out 2011-10-21 23:43:20.000000000 -0500
@@ -1,55 +1,32 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
-Address 0x........ len 10 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 defined
- Address 0x........ is 0 bytes inside data symbol "undefined"
-00000000 00000000 0000
-Address 0x........ len 10 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-ff00ff00 ff00ff00 ff00
-Address 0x........ len 10 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-ff000000 0000ff00 ff00
-Address 0x........ len 10 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-ff00ffff ffffff00 ff00
-Address 0x........ len 2 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 2 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-ff00
-Address 0x........ len 2 not addressable:
-bad address 0x........
- Address 0x........ is 2 bytes inside data symbol "undefined"
-Address 0x........ len 2 not addressable:
-bad address 0x........
- Address 0x........ is 2 bytes inside data symbol "undefined"
-____
-Address 0x........ len 2 has 2 bytes unaddressable
-Address 0x........ len 6 addressable
- Address 0x........ is 4 bytes inside data symbol "undefined"
-Address 0x........ len 6 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 4 bytes inside data symbol "undefined"
-ffffff00 ff00
-Address 0x........ len 10 not addressable:
-bad address 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 not addressable:
-bad address 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-0000____ 00000000 0000
-Address 0x........ len 10 has 2 bytes unaddressable
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
monitor command request to kill this process
Remote connection closed
=================================================
./valgrind-old/helgrind/tests/cond_timedwait_invalid.stderr.diff
=================================================
--- cond_timedwait_invalid.stderr.exp 2011-10-21 23:26:21.000000000 -0500
+++ cond_timedwait_invalid.stderr.out 2011-10-21 23:55:49.000000000 -0500
@@ -9,6 +9,7 @@
with error code 22 (EINVAL: Invalid argument)
at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...)
by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
+ ...
by 0x........: main (cond_timedwait_invalid.c:16)
=================================================
./valgrind-old/helgrind/tests/hg05_race2.stderr.diff
=================================================
--- hg05_race2.stderr.exp 2011-10-21 23:26:21.000000000 -0500
+++ hg05_race2.stderr.out 2011-10-21 23:56:16.000000000 -0500
@@ -29,9 +29,6 @@
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
-Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
-declared at hg05_race2.c:24, in frame #x of thread x
-
----------------------------------------------------------------
Possible data race during write of size 4 at 0x........ by thread #x
@@ -46,8 +43,5 @@
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
-Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
-declared at hg05_race2.c:24, in frame #x of thread x
-
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc18_semabuse.stderr.diff
=================================================
--- tc18_semabuse.stderr.exp 2011-10-21 23:26:21.000000000 -0500
+++ tc18_semabuse.stderr.out 2011-10-21 23:57:33.000000000 -0500
@@ -18,13 +18,5 @@
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:34)
-----------------------------------------------------------------
-Thread #x's call to sem_post failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_post_WRK (hg_intercepts.c:...)
- by 0x........: sem_post (hg_intercepts.c:...)
- by 0x........: main (tc18_semabuse.c:37)
-
-
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc20_verifywrap.stderr.diff
=================================================
--- tc20_verifywrap.stderr.exp 2011-10-21 23:26:21.000000000 -0500
+++ tc20_verifywrap.stderr.out 2011-10-21 23:57:56.000000000 -0500
@@ -215,14 +215,6 @@
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:242)
-----------------------------------------------------------------
-
-Thread #x's call to sem_post failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_post_WRK (hg_intercepts.c:...)
- by 0x........: sem_post (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:245)
-
FIXME: can't figure out how to verify wrap of sem_post
@@ -235,4 +227,4 @@
...
-ERROR SUMMARY: 23 errors from 23 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 22 errors from 22 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc23_bogus_condwait.stderr.diff
=================================================
--- tc23_bogus_condwait.stderr.exp 2011-10-21 23:26:21.000000000 -0500
+++ tc23_bogus_condwait.stderr.out 2011-10-21 23:58:13.000000000 -0500
@@ -26,6 +26,14 @@
----------------------------------------------------------------
+Thread #x's call to pthread_cond_wait failed
+ with error code 1 (EPERM: Operation not permitted)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ by 0x........: main (tc23_bogus_condwait.c:72)
+
+----------------------------------------------------------------
+
Thread #x: pthread_cond_{timed}wait called with mutex of type pthread_rwlock_t*
at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
@@ -53,4 +61,4 @@
by 0x........: main (tc23_bogus_condwait.c:78)
-ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/massif/tests/big-alloc.post.diff
=================================================
--- big-alloc.post.exp 2011-10-21 23:26:30.000000000 -0500
+++ big-alloc.post.out 2011-10-21 23:52:21.000000000 -0500
@@ -36,19 +36,19 @@
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
--------------------------------------------------------------------------------
0 0 0 0 0 0
- 1 10,489,832 10,489,832 10,485,760 4,072 0
- 2 20,979,664 20,979,664 20,971,520 8,144 0
- 3 31,469,496 31,469,496 31,457,280 12,216 0
- 4 41,959,328 41,959,328 41,943,040 16,288 0
- 5 52,449,160 52,449...
[truncated message content] |