Added:
/trunk/valgrind/README.android
/trunk/valgrind/README.s390
/trunk/valgrind/auxprogs/nightly-build-summary
/trunk/valgrind/memcheck/tests/origin5-bz2.stderr.exp-glibc212-s390x
Deleted:
/trunk/valgrind/callgrind/command.c
Modified:
/trunk/valgrind/AUTHORS
/trunk/valgrind/Makefile.am
/trunk/valgrind/Makefile.tool.am
/trunk/valgrind/NEWS
/trunk/valgrind/README
/trunk/valgrind/VEX/priv/guest_arm_toIR.c
/trunk/valgrind/VEX/priv/guest_x86_helpers.c
/trunk/valgrind/auxprogs/Makefile.am
/trunk/valgrind/auxprogs/gsl16test
/trunk/valgrind/auxprogs/gsl19test
/trunk/valgrind/callgrind/Makefile.am
/trunk/valgrind/callgrind/bbcc.c
/trunk/valgrind/callgrind/callstack.c
/trunk/valgrind/callgrind/dump.c
/trunk/valgrind/callgrind/global.h
/trunk/valgrind/callgrind/jumps.c
/trunk/valgrind/callgrind/main.c
/trunk/valgrind/callgrind/threads.c
/trunk/valgrind/configure.in
/trunk/valgrind/coregrind/Makefile.am
/trunk/valgrind/coregrind/m_debuginfo/debuginfo.c
/trunk/valgrind/coregrind/m_debuginfo/readelf.c
/trunk/valgrind/coregrind/m_gdbserver/remote-utils.c
/trunk/valgrind/coregrind/m_machine.c
/trunk/valgrind/coregrind/m_options.c
/trunk/valgrind/coregrind/m_sigframe/sigframe-arm-linux.c
/trunk/valgrind/coregrind/m_sparsewa.c
/trunk/valgrind/coregrind/m_syswrap/syswrap-linux.c
/trunk/valgrind/coregrind/m_trampoline.S
/trunk/valgrind/coregrind/pub_core_trampoline.h
/trunk/valgrind/docs/xml/dist-docs.xml
/trunk/valgrind/docs/xml/manual-core-adv.xml
/trunk/valgrind/docs/xml/manual-core.xml
/trunk/valgrind/docs/xml/vg-entities.xml
/trunk/valgrind/exp-sgcheck/tests/bad_percentify.vgtest
/trunk/valgrind/exp-sgcheck/tests/globalerr.vgtest
/trunk/valgrind/exp-sgcheck/tests/hackedbz2.vgtest
/trunk/valgrind/exp-sgcheck/tests/hsg.vgtest
/trunk/valgrind/exp-sgcheck/tests/preen_invars.vgtest
/trunk/valgrind/exp-sgcheck/tests/stackerr.vgtest
/trunk/valgrind/helgrind/tests/Makefile.am
/trunk/valgrind/helgrind/tests/cond_timedwait_invalid.c
/trunk/valgrind/memcheck/mc_replace_strmem.c
/trunk/valgrind/memcheck/tests/badjump2.c
/trunk/valgrind/memcheck/tests/origin5-bz2.c
/trunk/valgrind/memcheck/tests/origin5-bz2.stderr.exp-glibc25-amd64
/trunk/valgrind/memcheck/tests/origin5-bz2.stderr.exp-glibc25-x86
/trunk/valgrind/memcheck/tests/origin5-bz2.stderr.exp-glibc27-ppc64
/trunk/valgrind/memcheck/tests/x86-linux/scalar.c
/trunk/valgrind/nightly/bin/nightly
/trunk/valgrind/none/tests/amd64/Makefile.am
/trunk/valgrind/none/tests/s390x/add_EI.vgtest
/trunk/valgrind/none/tests/s390x/add_GE.vgtest
/trunk/valgrind/none/tests/s390x/and_EI.vgtest
/trunk/valgrind/none/tests/s390x/condloadstore.vgtest
/trunk/valgrind/none/tests/s390x/flogr.vgtest
/trunk/valgrind/none/tests/s390x/insert_EI.vgtest
/trunk/valgrind/none/tests/s390x/mul_GE.vgtest
/trunk/valgrind/none/tests/s390x/or_EI.vgtest
/trunk/valgrind/none/tests/s390x/sub_EI.vgtest
/trunk/valgrind/none/tests/s390x/xor_EI.vgtest
/trunk/valgrind/none/tests/x86/insn_ssse3.vgtest
/trunk/valgrind/none/tests/x86/ssse3_misaligned.vgtest
/trunk/valgrind/tests/platform_test
=======================================
--- /dev/null
+++ /trunk/valgrind/README.android Mon Dec 12 00:02:05 2011
@@ -0,0 +1,110 @@
+
+How to cross-compile for Android. These notes were last updated on
+27 Sept 2011, for Valgrind SVN revision 12060/2209.
+
+This is known to work at least for Android 2.3.4 running on a (rooted,
+AOSP build) Nexus S. It has also worked in the past on a
+un-messed-with Motorola Xoom, although I haven't tested it recently.
+Other configurations and toolchains might work, but haven't been
+tested. Feedback is welcome.
+
+You need the android-ndk-r6 native development kit. Install it
+somewhere. Doesn't matter where. Then do this:
+
+
+# Modify this (obviously). Note, this "export" command is only done
+# so as to reduce the amount of typing required. None of the commands
+# below read it as part of their operation.
+#
+export NDKROOT=/path/to/android-ndk-r6
+
+
+# Modify this too. Tell the build system which Android hardware you
+# are building for. It needs to know this so it can compile in
+# support for the right Android-hw-specific ioctls. (sigh.) As with
+# NDKROOT above, this is merely to avoid repeated typing; none of the
+# commands read it.
+#
+# Currently the supported values are: nexus_s pandaboard
+# So choose one of the below:
+#
+export HWKIND=nexus_s # Samsung Nexus S
+export HWKIND=pandaboard # Pandaboard running Linaro Android
+
+# Then cd to the root of your Valgrind source tree.
+#
+cd /path/to/valgrind/source/tree
+
+
+# After this point, you don't need to modify anything; just copy and
+# paste the commands below.
+
+
+# Set up toolchain paths.
+#
+export
AR=$NDKROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-ar
+export
LD=$NDKROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-ld
+export
CC=$NDKROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc
+
+
+# Do configuration stuff. Don't mess with the --prefix in the
+# configure command below, even if you think it's wrong.
+# You may need to set the --with-tmpdir path to something
+# different if /sdcard doesn't work on the device -- this is
+# a known cause of difficulties.
+
+./autogen.sh
+
+CPPFLAGS="--sysroot=$NDKROOT/platforms/android-3/arch-arm
-DANDROID_HARDWARE_$HWKIND" \
+ CFLAGS="--sysroot=$NDKROOT/platforms/android-3/arch-arm" \
+ ./configure --prefix=/data/local/Inst \
+ --host=armv7-unknown-linux --target=armv7-unknown-linux \
+ --with-tmpdir=/sdcard
+
+
+# At the end of the configure run, a few lines of details
+# are printed. Make sure that you see these two lines:
+#
+# Platform variant: android
+# Primary -DVGPV string: -DVGPV_arm_linux_android=1
+#
+# If you see anything else at this point, something is wrong, and
+# either the build will fail, or will succeed but you'll get something
+# which won't work.
+
+
+# Build, and park the install tree in `pwd`/Inst
+#
+make -j2
+make -j2 install DESTDIR=`pwd`/Inst
+
+
+# To get the install tree onto the device:
+# (I don't know why it's not "adb push Inst /data/local", but this
+# formulation does appear to put the result in /data/local/Inst.)
+#
+adb push Inst /
+
+# To run (on the device)
+/data/local/Inst/bin/valgrind [the usual args etc]
+
+
+# Once you're up and running, a handy modify-V-rebuild-reinstall
+# command line (on the host, of course) is
+#
+mq -j2 && mq -j2 install DESTDIR=`pwd`/Inst && adb push Inst /
+#
+# where 'mq' is an alias for 'make --quiet'.
+
+
+# One common cause of runs failing at startup is the inability of
+# Valgrind to find a suitable temporary directory. On the device,
+# there doesn't seem to be any one location which we always have
+# permission to write to. The instructions above use /sdcard. If
+# that doesn't work for you, and you're Valgrinding one specific
+# application which is already installed, you could try using its
+# temporary directory, in /data/data, for example
+# /data/data/org.mozilla.firefox_beta.
+#
+# Using /system/bin/logcat on the device is helpful for diagnosing
+# these kinds of problems.
=======================================
--- /dev/null
+++ /trunk/valgrind/README.s390 Mon Dec 12 00:02:05 2011
@@ -0,0 +1,36 @@
+
+Requirements
+------------
+- You need GCC 3.4 or later to compile the s390 port.
+- A working combination of autotools is required.
+- To run valgrind a z900 machine or any later model is needed.
+
+
+Limitations
+-----------
+- 31-bit client programs are not supported.
+- Hexadecimal floating point is not supported.
+- Decimal floating point is not supported yet.
+- Currently, only memcheck, massif, lackey, and none are supported
+- helgrind and drd seem to work on SLES10,11 and RHEL5,6 on z9,z10 and z196
+ but might fail on other hardware/software combinations.
+- Some gcc versions use mvc to copy 4/8 byte values. This will affect some
+ debug messages. Valgrind will complain about 4 or 8 one-byte reads/writes
+ instead of just 1 read/write.
+- exp-ptrcheck and callgrind are not supported.
+
+
+Recommendations
+---------------
+Applications should be compiled with -fno-builtin to avoid
+false positives due to builtin string operations when running memcheck.
+
+
+Reading Material
+----------------
+(1) Linux for zSeries ELF ABI Supplement
+ http://refspecs.linuxfoundation.org/ELF/zSeries/index.html
+(2) z/Architecture Principles of Operation
+ http://publibfi.boulder.ibm.com/epubs/pdf/dz9zr008.pdf
+(3) z/Architecture Reference Summary
+ http://publibfi.boulder.ibm.com/epubs/pdf/dz9zs006.pdf
=======================================
--- /dev/null
+++ /trunk/valgrind/auxprogs/nightly-build-summary Mon Dec 12 00:02:05 2011
@@ -0,0 +1,478 @@
+#!/usr/bin/env perl
+
+#-----------------------------------------------------------------
+# Quick and dirty script to summarize build information for a
+# set of nightly runs.
+#
+# The results of the nighly regression runs are extracted from
+# the GMANE mail archive. The URL for a given mail sent to the
+# valgrind-developers mailing list is
+#
+# http://article.gmane.org/gmane.comp.debugging.valgrind.devel/<integer>
+#
+# The script extracts information about the regression run from a
+# block of information at the beginning of the mail. That information
+# was added beginning October 4, 2011. Therefore, only regression runs
+# from that date or later can be analyzed.
+#
+# There is unfortunately no good way of figuring out the interval
+# of integers in the above URL that include all nightly regression
+# runs.
+#
+# The function get_regtest_data does all the work. It returns a hash
+# whose keys are the dates at which nightly runs took place. The value
+# is in turn a hash.
+#
+# Each such hash has the following keys:
+# "builds" array of hashes
+# "num_builds" int
+# "num_failing_builds" int
+# "num_passing_builds" int
+# "num_testcase_failures" int
+# "num_failing_testcases" int
+# "failure_frequency" hash indexed by testcase name; value = int
+#
+# "builds" is an array of hashes with the following keys
+# "arch" string (architecture)
+# "distro" string (distribution, e.g. Fedora-15)
+# "failures" array of strings (failing testcases)
+# "valgrind revision" integer
+# "VEX revision" integer
+# "GCC version" string
+# "C library" string
+# "uname -mrs" string
+# "Vendor version" string
+#
+#-----------------------------------------------------------------
+use strict;
+use warnings;
+
+use LWP::Simple;
+use Getopt::Long;
+
+my $prog_name = "nightly-build-summary";
+
+my $debug = 0;
+my $keep = 0;
+
+my $usage=<<EOF;
+USAGE
+
+ $prog_name
+
+ --from=INTEGER beginning of mail interval; > 14800
+
+ [--to=INTEGER] end of mail interval; default = from + 100
+
+ [--debug] verbose mode (debugging)
+
+ [--keep] write individual emails to files (debugging)
+
+ [--dump] write results suitable for post-processing
+
+ [--readable] write results in human readable form (default)
+
+EOF
+
+
+#-----------------------------------------------------------------
+# Search for a line indicating that this is an email containing
+# the results of a valgrind regression run.
+# Return 1, if found and 0 oherwise.
+#-----------------------------------------------------------------
+sub is_regtest_result {
+ my (@lines) = @_;
+
+ foreach my $line (@lines) {
+ return 1 if ($line =~ "^valgrind revision:");
+ }
+
+ return 0;
+}
+
+
+#-----------------------------------------------------------------
+# Extract information from the run. Don't prep the data here. This
+# is done later on.
+#-----------------------------------------------------------------
+sub get_raw_data {
+ my (@lines, $msgno) = @_;
+ my ($i, $n, $line, $date);
+
+ $n = scalar @lines;
+
+ my %hash = ();
+
+# 1) Locate the section with the info about the environment of this
nightly run
+ for ($i = $i + 1; $i < $n; ++$i) {
+ last if ($lines[$i] =~ /^valgrind revision:/);
+ }
+ die "no info block in message $msgno" if ($i == $n);
+
+# 2) Read the info about the build: compiler, valgrind revision etc.
+# and put it into a hash.
+ for ( ; $i < $n; ++$i) {
+ $line = $lines[$i];
+ last if ($line =~ /^$/); # empty line indicates end of section
+ my ($key, $value) = split(/:/, $line);
+ $value =~ s/^[ ]*//; # removing leading blanks
+ $hash{$key} = $value;
+ }
+
+ if ($debug) {
+ foreach my $key (keys %hash) {
+ my ($val) = $hash{$key};
+ print "regtest env: KEY = |$key| VAL = |$val|\n";
+ }
+ }
+
+# 3) Get the date from when the build was kicked off.
+ for ( ; $i < $n; ++$i) {
+ $line = $lines[$i];
+
+ if ($line =~ /^Started at[ ]+([^ ]+)/) {
+ $date = $1;
+ print "DATE = $date\n";
+ last;
+ }
+ }
+ die "no date found in message $msgno" if ($i == $n);
+
+
+# 4) Find out if the regression run failed or passed
+ $hash{"failures"} = [];
+ for ($i = $i + 1; $i < $n; ++$i) {
+ $line = $lines[$i];
+ if ($line =~ /Running regression tests/) {
+ return %hash if ($line =~ /done$/); # regtest succeeded; no
failures
+ die "cannot determine regtest outcome for message $msgno"
+ if (! ($line =~ /failed$/));
+ last;
+ }
+ }
+
+# 5) Regtest failed; locate the section with the list of failing testcases
+ for ($i = $i + 1; $i < $n; ++$i) {
+ $line = $lines[$i];
+# Match for end-of-line == because line might be split.
+ last if ($line =~ /==$/);
+ }
+ die "cannot locate failing testcases in message $msgno" if ($i == $n);
+
+# 6) Get list of failing testcases
+ for ($i = $i + 1; $i < $n; ++$i) {
+ $line = $lines[$i];
+
+ last if ($line =~ /^$/);
+
+ my ($testcase) = (split(/\s+/, $line))[0];
+ print "ADD failing testcase $testcase\n" if ($debug);
+ push @{$hash{"failures"}}, $testcase;
+ }
+
+ return ($date, %hash);
+}
+
+
+#-----------------------------------------------------------------
+# Extract architecture; get a pretty name for the distro
+#-----------------------------------------------------------------
+sub prep_regtest_data {
+ my (%hash) = @_;
+ my ($val, $arch, $distro);
+
+ $val = $hash{"uname -mrs"};
+ die "uname -mrs info is missing" if (! defined $val);
+ $arch = (split(/ /, $val))[2];
+
+ $val = $hash{"Vendor version"};
+ die "Vendor version info is missing" if (! defined $val);
+
+ if ($val =~ /Fedora release ([0-9]+)/) {
+ $distro = "Fedora-$1";
+ } elsif ($val =~ /openSUSE ([0-9]+)\.([0-9]+)/) {
+ $distro = "openSUSE-$1.$2";
+ } elsif ($val =~ /SUSE Linux Enterprise Server 11 SP1/) {
+ $distro = "SLES-11-SP1";
+ } elsif ($val =~ /Red Hat Enterprise Linux AS release 4/) {
+ $distro = "RHEL-4";
+ } else {
+ $distro = "UNKNOWN";
+ }
+
+# Add architecture and distribution to hash
+ $hash{"arch"} = $arch;
+ $hash{"distro"} = $distro;
+
+ return %hash;
+}
+
+
+#-----------------------------------------------------------------
+# Precompute some summary information and record it
+#-----------------------------------------------------------------
+sub precompute_summary_info
+{
+ my (%dates) = @_;
+
+ foreach my $date (sort keys %dates) {
+ my %failure_frequency = ();
+
+ my %nightly = %{ $dates{$date} };
+ my @builds = @{ $nightly{"builds"} };
+
+ $nightly{"num_builds"} = scalar (@builds);
+ $nightly{"num_failing_builds"} = 0;
+ $nightly{"num_testcase_failures"} = 0;
+
+ foreach my $build (@builds) {
+ my %regtest_data = %{ $build };
+
+ my @failures = @{ $regtest_data{"failures"} };
+ my $num_fail = scalar (@failures);
+
+ ++$nightly{"num_failing_builds"} if ($num_fail != 0);
+ $nightly{"num_testcase_failures"} += $num_fail;
+
+# Compute how often a testcase failed
+ foreach my $test ( @failures ) {
+ if (defined $failure_frequency{$test}) {
+ ++$failure_frequency{$test};
+ } else {
+ $failure_frequency{$test} = 1;
+ }
+ }
+ }
+
+ $nightly{"num_passing_builds"} =
+ $nightly{"num_builds"} - $nightly{"num_failing_builds"};
+
+ $nightly{"num_failing_testcases"} = scalar
(keys %failure_frequency);
+
+ $nightly{"failure_frequency"} = { %failure_frequency };
+
+ $dates{$date} = { %nightly };
+ }
+
+ return %dates;
+}
+
+
+#-----------------------------------------------------------------
+# Get messages from GMANE, and build up a database of results.
+#-----------------------------------------------------------------
+sub get_regtest_data {
+ my ($from, $to) = @_;
+
+ my $url_base
= "http://article.gmane.org/gmane.comp.debugging.valgrind.devel/";
+
+ my %dates = ();
+
+ my $old_date = "-1";
+ my @builds = ();
+
+ for (my $i = $from; $i <= $to; ++$i) {
+ my $url = "$url_base" . "$i";
+
+ my $page = get("$url");
+
+ if ($keep) {
+ open (EMAIL, ">$i");
+ print EMAIL $page;
+ close(EMAIL);
+ }
+
+# Detect if the article does not exist. Happens for too large --to= values
+ last if ($page eq "No such file.\n");
+
+# Split the page into lines
+ my @lines = split(/\n/, $page);
+
+# Check whether it contains a regression test result
+ next if (! is_regtest_result(@lines));
+ print "message $i is a regression test result\n" if ($debug);
+
+# Get the raw data
+ my ($date, %regtest_data) = get_raw_data(@lines);
+
+ %regtest_data = prep_regtest_data(%regtest_data);
+
+ if ($date ne $old_date) {
+ my %nightly = ();
+ $nightly{"builds"} = [ @builds ];
+ $dates{$old_date} = { %nightly } if ($old_date ne "-1");
+
+ $old_date = $date;
+ @builds = ();
+ }
+
+ push @builds, { %regtest_data };
+ }
+ my %nightly = ();
+ $nightly{"builds"} = [ @builds ];
+ $dates{$old_date} = { %nightly } if ($old_date ne "-1");
+
+# Convenience: precompute some info we'll be interested in
+ %dates = precompute_summary_info( %dates );
+
+ return %dates;
+}
+
+
+#-----------------------------------------------------------------
+# Write out the results in a form suitable for automatic post-processing
+#-----------------------------------------------------------------
+sub dump_results {
+ my (%dates) = @_;
+
+ foreach my $date (sort keys %dates) {
+
+ my %nightly = %{ $dates{$date} };
+ my @builds = @{ $nightly{"builds"} };
+
+ foreach my $build (@builds) {
+ my %regtest_data = %{ $build };
+
+ my $arch = $regtest_data{"arch"};
+ my $distro = $regtest_data{"distro"};
+ my @failures = @{ $regtest_data{"failures"} };
+ my $num_fail = scalar (@failures);
+ my $fails = join(":", sort @failures);
+
+ printf("Regrun: %s %3d %-10s %-20s %s\n",
+ $date, $num_fail, $arch, $distro, $fails);
+ }
+
+ my %failure_frequency = %{ $nightly{"failure_frequency"} };
+
+ foreach my $test (keys %failure_frequency) {
+ printf("Test: %s %3d %s\n",
+ $date, $failure_frequency{$test}, $test);
+ }
+
+ printf("Total: %s builds: %d %d fail %d pass tests: %d
fail %d unique\n",
+ $date, $nightly{"num_builds"},
$nightly{"num_failing_builds"},
+ $nightly{"num_passing_builds"},
$nightly{"num_testcase_failures"},
+ $nightly{"num_failing_testcases"});
+ }
+}
+
+
+sub write_readable_results {
+ my (%dates) = @_;
+
+ foreach my $date (sort keys %dates) {
+ my %nightly = %{ $dates{$date} };
+
+ print "$date\n----------\n";
+
+ printf("%3d builds\n", $nightly{"num_builds"});
+ printf("%3d builds fail\n", $nightly{"num_failing_builds"});
+ printf("%3d builds pass\n", $nightly{"num_passing_builds"});
+ print "\n";
+ printf("%3d testcase failures (across all runs)\n",
+ $nightly{"num_testcase_failures"});
+ printf("%3d failing testcases (unique)\n",
+ $nightly{"num_failing_testcases"});
+ print "\n";
+
+ my @builds = @{ $nightly{"builds"} };
+
+ if ($nightly{"num_passing_builds"} != 0) {
+ print "Passing builds\n";
+ print "--------------\n";
+ foreach my $build (@builds) {
+ my %regtest_data = %{ $build };
+ my @failures = @{ $regtest_data{"failures"} };
+ my $num_fail = scalar (@failures);
+
+ if ($num_fail == 0) {
+ my $arch = $regtest_data{"arch"};
+ my $distro = $regtest_data{"distro"};
+
+ printf("%-8s %-15s\n", $arch, $distro);
+ }
+ print "\n";
+ }
+ print "\n";
+ }
+
+ if ($nightly{"num_failing_builds"} != 0) {
+ print "Failing builds\n";
+ print "--------------\n";
+ foreach my $build (@builds) {
+ my %regtest_data = %{ $build };
+ my @failures = @{ $regtest_data{"failures"} };
+ my $num_fail = scalar (@failures);
+
+ if ($num_fail != 0) {
+ my $arch = $regtest_data{"arch"};
+ my $distro = $regtest_data{"distro"};
+
+ printf("%-8s %-15s %d failures\n", $arch, $distro,
$num_fail);
+ foreach my $test (@failures) {
+ print " $test\n";
+ }
+ print "\n";
+ }
+ }
+ print "\n";
+ }
+
+ print "Failing testcases and their frequency\n";
+ print "-------------------------------------\n";
+ my %failure_frequency = %{ $nightly{"failure_frequency"} };
+
+# Sorted in decreasing frequency
+ foreach my $test (sort {$failure_frequency{$b} cmp
$failure_frequency{$a} }
+ keys %failure_frequency) {
+ printf("%3d %s\n", $failure_frequency{$test}, $test);
+ }
+ print "\n";
+ }
+}
+
+
+sub main
+{
+ my ($from, $to, $dump, $readable);
+
+ $from = $to = 0;
+ $dump = $readable = 0;
+
+ GetOptions( "from=i" => \$from,
+ "to=i" => \$to,
+ "debug" => \$debug,
+ "dump" => \$dump,
+ "keep" => \$keep,
+ "readable" => \$readable
+ ) || die $usage;
+
+# 14800 is about Oct 4, 2011 which is when we began including information
+# about the environment
+
+ die $usage if ($from < 14800);
+
+ $to = $from + 100 if ($to == 0);
+
+ if ($from > $to) {
+ print STDERR "*** invalid [from,to] interval. Try again\n";
+ die $usage;
+ }
+
+ $readable = 1 if ($dump == 0 && $readable == 0);
+
+ print "check message interval [$from...$to]\n" if ($debug);
+
+# Get mails from GMANE mail archive
+
+ my %dates = get_regtest_data($from, $to);
+
+ dump_results(%dates) if ($dump);
+
+ write_readable_results(%dates) if ($readable);
+}
+
+main();
+
+exit 0;
=======================================
--- /dev/null
+++ /trunk/valgrind/memcheck/tests/origin5-bz2.stderr.exp-glibc212-s390x
Mon Dec 12 00:02:05 2011
@@ -0,0 +1,136 @@
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: main (origin5-bz2.c:6481)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
+ by 0x........: handle_compress (origin5-bz2.c:4750)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 8
+ at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
+ by 0x........: handle_compress (origin5-bz2.c:4750)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 8
+ at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
+ by 0x........: handle_compress (origin5-bz2.c:4750)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 8
+ at 0x........: mainSort (origin5-bz2.c:2820)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
+ by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
+ by 0x........: handle_compress (origin5-bz2.c:4753)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 8
+ at 0x........: mainSort (origin5-bz2.c:2823)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
+ by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
+ by 0x........: handle_compress (origin5-bz2.c:4753)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 8
+ at 0x........: mainSort (origin5-bz2.c:2854)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
+ by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
+ by 0x........: handle_compress (origin5-bz2.c:4753)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 8
+ at 0x........: mainSort (origin5-bz2.c:2858)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
+ by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
+ by 0x........: handle_compress (origin5-bz2.c:4753)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 8
+ at 0x........: mainSort (origin5-bz2.c:2859)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
+ by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
+ by 0x........: handle_compress (origin5-bz2.c:4753)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 8
+ at 0x........: mainSort (origin5-bz2.c:2963)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
+ by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
+ by 0x........: handle_compress (origin5-bz2.c:4753)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 8
+ at 0x........: mainSort (origin5-bz2.c:2964)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
+ by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
+ by 0x........: handle_compress (origin5-bz2.c:4753)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 8
+ at 0x........: fallbackSort (origin5-bz2.c:2269)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
+ by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
+ by 0x........: handle_compress (origin5-bz2.c:4753)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 8
+ at 0x........: fallbackSort (origin5-bz2.c:2275)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
+ by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
+ by 0x........: handle_compress (origin5-bz2.c:4753)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: main (origin5-bz2.c:6512)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
=======================================
--- /trunk/valgrind/callgrind/command.c Tue Oct 25 09:11:36 2011
+++ /dev/null
@@ -1,535 +0,0 @@
-/*
- This file is part of Callgrind, a Valgrind tool for call graph
- profiling programs.
-
- Copyright (C) 2002-2011, Josef Weidendorfer (Josef.Wei...@gmx.de)
-
- This tool is derived from and contains lot of code from Cachegrind
- Copyright (C) 2002-2011 Nicholas Nethercote (n...@valgrind.org)
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-/*
- * Functions related to interactive commands via "callgrind.cmd"
- */
-
-#include "config.h"
-#include "global.h"
-
-#include "pub_tool_threadstate.h" // VG_N_THREADS
-
-// Version for the syntax in command/result files for interactive control
-#define COMMAND_VERSION "1.0"
-
-static Char outbuf[FILENAME_LEN + FN_NAME_LEN + OBJ_NAME_LEN];
-
-static Char* command_file = 0;
-static Char* command_file2 = 0;
-static Char* current_command_file = 0;
-static Char* result_file = 0;
-static Char* result_file2 = 0;
-static Char* current_result_file = 0;
-static Char* info_file = 0;
-static Char* out_file = 0;
-
-static Int thisPID = 0;
-
-/**
- * Setup for interactive control of a callgrind run
- */
-static void setup_control(void)
-{
- Int fd, size;
- SysRes res;
- Char* dir;
- const HChar *tmpdir;
-
- CLG_ASSERT(thisPID != 0);
-
- fd = -1;
- dir = CLG_(get_out_directory)();
- out_file = CLG_(get_out_file)();
-
- /* name of command file */
- size = VG_(strlen)(dir) + VG_(strlen)(DEFAULT_COMMANDNAME) +10;
- command_file = (char*) CLG_MALLOC("cl.command.sc.1", size);
- CLG_ASSERT(command_file != 0);
- VG_(sprintf)(command_file, "%s/%s.%d",
- dir, DEFAULT_COMMANDNAME, thisPID);
-
- /* This is for compatibility with the "Force Now" Button of current
- * KCachegrind releases, as it doesn't use ".pid" to distinguish
- * different callgrind instances from same base directory.
- */
- command_file2 = (char*) CLG_MALLOC("cl.command.sc.2", size);
- CLG_ASSERT(command_file2 != 0);
- VG_(sprintf)(command_file2, "%s/%s",
- dir, DEFAULT_COMMANDNAME);
-
- size = VG_(strlen)(dir) + VG_(strlen)(DEFAULT_RESULTNAME) +10;
- result_file = (char*) CLG_MALLOC("cl.command.sc.3", size);
- CLG_ASSERT(result_file != 0);
- VG_(sprintf)(result_file, "%s/%s.%d",
- dir, DEFAULT_RESULTNAME, thisPID);
-
- /* If we get a command from a command file without .pid, use
- * a result file without .pid suffix
- */
- result_file2 = (char*) CLG_MALLOC("cl.command.sc.4", size);
- CLG_ASSERT(result_file2 != 0);
- VG_(sprintf)(result_file2, "%s/%s",
- dir, DEFAULT_RESULTNAME);
-
- tmpdir = VG_(tmpdir)();
- info_file = (char*) CLG_MALLOC("cl.command.sc.5",
- VG_(strlen)(tmpdir) +
- VG_(strlen)(DEFAULT_INFONAME) + 10);
- CLG_ASSERT(info_file != 0);
- VG_(sprintf)(info_file, "%s/%s.%d", tmpdir, DEFAULT_INFONAME, thisPID);
-
- CLG_DEBUG(1, "Setup for interactive control (PID: %d):\n", thisPID);
- CLG_DEBUG(1, " output file: '%s'\n", out_file);
- CLG_DEBUG(1, " command file: '%s'\n", command_file);
- CLG_DEBUG(1, " result file: '%s'\n", result_file);
- CLG_DEBUG(1, " info file: '%s'\n", info_file);
-
- /* create info file to indicate that we are running */
- res = VG_(open)(info_file, VKI_O_WRONLY|VKI_O_TRUNC, 0);
- if (sr_isError(res)) {
- res = VG_(open)(info_file, VKI_O_CREAT|VKI_O_WRONLY,
- VKI_S_IRUSR|VKI_S_IWUSR);
- if (sr_isError(res)) {
- VG_(message)(Vg_DebugMsg,
- "warning: can't write info file '%s'\n", info_file);
- info_file = 0;
- fd = -1;
- }
- }
- if (!sr_isError(res))
- fd = (Int) sr_Res(res);
- if (fd>=0) {
- Char buf[512];
- Int i;
-
- WRITE_STR3(fd,
- "# This file is generated by Callgrind-" VERSION ".\n"
- "# It is used to enable controlling the supervision of\n"
- "# '", VG_(args_the_exename), "'\n"
- "# by external tools.\n\n");
-
- VG_(sprintf)(buf, "version: " COMMAND_VERSION "\n");
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
-
- WRITE_STR3(fd, "base: ", dir, "\n");
- WRITE_STR3(fd, "dumps: ", out_file, "\n");
- WRITE_STR3(fd, "control: ", command_file, "\n");
- WRITE_STR3(fd, "result: ", result_file, "\n");
-
- WRITE_STR2(fd, "cmd: ", VG_(args_the_exename));
- for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++) {
- HChar* arg = * (HChar**)VG_(indexXA)( VG_(args_for_client), i );
- if (!arg) continue;
- WRITE_STR2(fd, " ", arg);
- }
- VG_(write)(fd, "\n", 1);
- VG_(close)(fd);
- }
-}
-
-void CLG_(init_command)()
-{
- thisPID = VG_(getpid)();
- setup_control();
-}
-
-void CLG_(finish_command)()
-{
- /* unlink info file */
- if (info_file) VG_(unlink)(info_file);
-}
-
-
-static Int createRes(Int fd)
-{
- SysRes res;
-
- if (fd > -2) return fd;
-
- /* fd == -2: No error, but we need to create the file */
- CLG_ASSERT(current_result_file != 0);
- res = VG_(open)(current_result_file,
- VKI_O_CREAT|VKI_O_WRONLY|VKI_O_TRUNC,
- VKI_S_IRUSR|VKI_S_IWUSR);
-
- /* VG_(open) can return any negative number on error. Remap errors to
-1,
- * to not confuse it with our special value -2
- */
- if (sr_isError(res)) fd = -1;
- else fd = (Int) sr_Res(res);
-
- return fd;
-}
-
-/* Run Info: Persistant information of the callgrind run */
-static Int dump_info(Int fd)
-{
- Char* buf = outbuf;
- int i;
-
- if ( (fd = createRes(fd)) <0) return fd;
-
- /* creator */
- VG_(sprintf)(buf, "creator: callgrind-" VERSION "\n");
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
-
- /* version */
- VG_(sprintf)(buf, "version: " COMMAND_VERSION "\n");
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
-
- /* "pid:" line */
- VG_(sprintf)(buf, "pid: %d\n", VG_(getpid)());
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
-
- /* "base:" line */
- WRITE_STR3(fd, "base: ", out_file, "\n");
-
- /* "cmd:" line */
- WRITE_STR2(fd, "cmd: ", VG_(args_the_exename));
- for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++) {
- HChar* arg = * (HChar**)VG_(indexXA)( VG_(args_for_client), i );
- if (!arg) continue;
- WRITE_STR2(fd, " ", arg);
- }
- VG_(write)(fd, "\n", 1);
-
- return fd;
-}
-
-
-/* Helper for dump_state */
-
-Int dump_fd;
-
-void static dump_state_of_thread(thread_info* ti)
-{
- Char* buf = outbuf;
- int t = CLG_(current_tid);
- Int p, i;
- static FullCost sum = 0, tmp = 0;
- BBCC *from, *to;
- call_entry* ce;
-
- p = VG_(sprintf)(buf, "events-%d: ", t);
- CLG_(init_cost_lz)( CLG_(sets).full, &sum );
- CLG_(copy_cost_lz)( CLG_(sets).full, &tmp, ti->lastdump_cost );
- CLG_(add_diff_cost)( CLG_(sets).full, sum,
- ti->lastdump_cost,
- ti->states.entry[0]->cost);
- CLG_(copy_cost)( CLG_(sets).full, ti->lastdump_cost, tmp );
- p += CLG_(sprint_mappingcost)(buf + p, CLG_(dumpmap), sum);
- p += VG_(sprintf)(buf+p, "\n");
- VG_(write)(dump_fd, (void*)buf, p);
-
- p = VG_(sprintf)(buf, "frames-%d: %d\n", t,
- CLG_(current_call_stack).sp);
- VG_(write)(dump_fd, (void*)buf, p);
- ce = 0;
- for(i = 0; i < CLG_(current_call_stack).sp; i++) {
- ce = CLG_(get_call_entry)(i);
- /* if this frame is skipped, we don't have counters */
- if (!ce->jcc) continue;
-
- from = ce->jcc->from;
- p = VG_(sprintf)(buf, "function-%d-%d: %s\n",t, i,
- from->cxt->fn[0]->name);
- VG_(write)(dump_fd, (void*)buf, p);
-
- p = VG_(sprintf)(buf, "calls-%d-%d: ",t, i);
- p+= VG_(sprintf)(buf+p, "%llu\n", ce->jcc->call_counter);
- VG_(write)(dump_fd, (void*)buf, p);
-
- /* FIXME: EventSets! */
- CLG_(copy_cost)( CLG_(sets).full, sum, ce->jcc->cost );
- CLG_(copy_cost)( CLG_(sets).full, tmp, ce->enter_cost );
- CLG_(add_diff_cost)( CLG_(sets).full, sum,
- ce->enter_cost, CLG_(current_state).cost );
- CLG_(copy_cost)( CLG_(sets).full, ce->enter_cost, tmp );
-
- p = VG_(sprintf)(buf, "events-%d-%d: ",t, i);
- p += CLG_(sprint_mappingcost)(buf + p, CLG_(dumpmap), sum );
- p += VG_(sprintf)(buf+p, "\n");
- VG_(write)(dump_fd, (void*)buf, p);
- }
- if (ce && ce->jcc) {
- to = ce->jcc->to;
- p = VG_(sprintf)(buf, "function-%d-%d: %s\n",t, i,
- to->cxt->fn[0]->name );
- VG_(write)(dump_fd, (void*)buf, p);
- }
-}
-
-/* Dump info on current callgrind state */
-static Int dump_state(Int fd)
-{
- Char* buf = outbuf;
- thread_info** th;
- int t, p;
- Int orig_tid = CLG_(current_tid);
-
- if ( (fd = createRes(fd)) <0) return fd;
-
- VG_(sprintf)(buf, "instrumentation: %s\n",
- CLG_(instrument_state) ? "on":"off");
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
-
- if (!CLG_(instrument_state)) return fd;
-
- VG_(sprintf)(buf, "executed-bbs: %llu\n", CLG_(stat).bb_executions);
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
-
- VG_(sprintf)(buf, "executed-calls: %llu\n", CLG_(stat).call_counter);
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
-
- VG_(sprintf)(buf, "distinct-bbs: %d\n", CLG_(stat).distinct_bbs);
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
-
- VG_(sprintf)(buf, "distinct-calls: %d\n", CLG_(stat).distinct_jccs);
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
-
- VG_(sprintf)(buf, "distinct-functions: %d\n", CLG_(stat).distinct_fns);
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
-
- VG_(sprintf)(buf, "distinct-contexts: %d\n",
CLG_(stat).distinct_contexts);
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
-
- /* "events:" line. Given here because it will be dynamic in the future
*/
- p = VG_(sprintf)(buf, "events: ");
- CLG_(sprint_eventmapping)(buf+p, CLG_(dumpmap));
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
- VG_(write)(fd, "\n", 1);
-
- /* "part:" line (number of last part. Is 0 at start */
- VG_(sprintf)(buf, "\npart: %d\n", CLG_(get_dump_counter)());
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
-
- /* threads */
- th = CLG_(get_threads)();
- p = VG_(sprintf)(buf, "threads:");
- for(t=1;t<VG_N_THREADS;t++) {
- if (!th[t]) continue;
- p += VG_(sprintf)(buf+p, " %d", t);
- }
- p += VG_(sprintf)(buf+p, "\n");
- VG_(write)(fd, (void*)buf, p);
-
- VG_(sprintf)(buf, "current-tid: %d\n", orig_tid);
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
-
- /* current event counters */
- dump_fd = fd;
- CLG_(forall_threads)(dump_state_of_thread);
-
- return fd;
-}
-
-void CLG_(check_command)()
-{
- /* check for dumps needed */
- static Char buf[512];
- static Char cmdBuffer[512];
- Char *cmdPos = 0, *cmdNextLine = 0;
- Int fd, bytesRead = 0, do_kill = 0;
- SysRes res;
- Int currentPID;
- static Int check_counter = 0;
-
- /* Check for PID change, i.e. whether we run as child after a fork.
- * If yes, we setup interactive control for the new process
- */
- currentPID = VG_(getpid)();
- if (thisPID != currentPID) {
- thisPID = currentPID;
- setup_control();
- }
-
- /* Toggle between 2 command files, with/without ".pid" postfix
- * (needed for compatibility with KCachegrind, which wants to trigger
- * a dump by writing into a command file without the ".pid" postfix)
- */
- check_counter++;
- if (check_counter % 2) {
- current_command_file = command_file;
- current_result_file = result_file;
- }
- else {
- current_command_file = command_file2;
- current_result_file = result_file2;
- }
-
- res = VG_(open)(current_command_file, VKI_O_RDONLY,0);
- if (!sr_isError(res)) {
- fd = (Int) sr_Res(res);
- bytesRead = VG_(read)(fd,cmdBuffer,500);
- cmdBuffer[500] = 0; /* no command overrun please */
- VG_(close)(fd);
- /* don't delete command file on read error (e.g. EAGAIN) */
- if (bytesRead>0) {
- cmdPos = cmdBuffer;
- }
- }
-
- /* force creation of result file if needed */
- fd = -2;
-
- while((bytesRead>0) && *cmdPos) {
-
- /* Calculate pointer for next line */
- cmdNextLine = cmdPos+1;
- while((bytesRead>0) && *cmdNextLine && (*cmdNextLine != '\n')) {
- cmdNextLine++;
- bytesRead--;
- }
- if ((bytesRead>0) && (*cmdNextLine == '\n')) {
- *cmdNextLine = 0;
- cmdNextLine++;
- bytesRead--;
- }
-
- /* Command with integer option */
- if ((*cmdPos >= '0') && (*cmdPos <='9')) {
- int value = *cmdPos-'0';
- cmdPos++;
- while((*cmdPos >= '0') && (*cmdPos <='9')) {
- value = 10*value + (*cmdPos-'0');
- cmdPos++;
- }
- while((*cmdPos == ' ') || (*cmdPos == '\t')) cmdPos++;
-
- switch(*cmdPos) {
-#if CLG_ENABLE_DEBUG
- /* verbosity */
- case 'V':
- case 'v':
- CLG_(clo).verbose = value;
- break;
-#endif
- default:
- break;
- }
-
- cmdPos = cmdNextLine;
- continue;
- }
-
- /* Command with boolean/switch option */
- if ((*cmdPos=='+') ||
- (*cmdPos=='-')) {
- int value = (cmdPos[0] == '+');
- cmdPos++;
- while((*cmdPos == ' ') || (*cmdPos == '\t')) cmdPos++;
-
- switch(*cmdPos) {
- case 'I':
- case 'i':
- CLG_(set_instrument_state)("Command", value);
- break;
-
- default:
- break;
- }
-
- cmdPos = cmdNextLine;
- continue;
- }
-
- /* regular command */
- switch(*cmdPos) {
- case 'D':
- case 'd':
- /* DUMP */
-
- /* skip command */
- while(*cmdPos && (*cmdPos != ' ')) cmdPos++;
- if (*cmdPos)
- VG_(sprintf)(buf, "Dump Command:%s", cmdPos);
- else
- VG_(sprintf)(buf, "Dump Command");
- CLG_(dump_profile)(buf, False);
- break;
-
- case 'Z':
- case 'z':
- CLG_(zero_all_cost)(False);
- break;
-
- case 'K':
- case 'k':
- /* Kill: Delay to be able to remove command file before. */
- do_kill = 1;
- break;
-
- case 'I':
- case 'i':
- fd = dump_info(fd);
- break;
-
- case 's':
- case 'S':
- fd = dump_state(fd);
- break;
-
- case 'O':
- case 'o':
- /* Options Info */
- if ( (fd = createRes(fd)) <0) break;
-
- VG_(sprintf)(buf, "\ndesc: Option: --skip-plt=%s\n",
- CLG_(clo).skip_plt ? "yes" : "no");
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
- VG_(sprintf)(buf, "desc: Option: --collect-jumps=%s\n",
- CLG_(clo).collect_jumps ? "yes" : "no");
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
- VG_(sprintf)(buf, "desc: Option: --separate-recs=%d\n",
- CLG_(clo).separate_recursions);
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
- VG_(sprintf)(buf, "desc: Option: --separate-callers=%d\n",
- CLG_(clo).separate_callers);
- VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
-
- break;
-
- default:
- break;
- }
-
- cmdPos = cmdNextLine;
- }
-
- /* If command executed, delete command file */
- if (cmdPos) VG_(unlink)(current_command_file);
- if (fd>=0) VG_(close)(fd);
-
- if (do_kill) {
- VG_(message)(Vg_UserMsg,
- "Killed because of command from %s\n",
- current_command_file);
- CLG_(fini)(0);
- VG_(exit)(1);
- }
-}
=======================================
--- /trunk/valgrind/AUTHORS Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/AUTHORS Mon Dec 12 00:02:05 2011
@@ -1,7 +1,7 @@
Julian Seward was the original founder, designer and author of
Valgrind, created the dynamic translation frameworks, wrote Memcheck,
-the 3.X versions of Helgrind, Ptrcheck, DHAT, and did lots of other
+the 3.X versions of Helgrind, SGCheck, DHAT, and did lots of other
things.
Nicholas Nethercote did the core/tool generalisation, wrote
=======================================
--- /trunk/valgrind/Makefile.am Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/Makefile.am Mon Dec 12 00:02:05 2011
@@ -16,16 +16,6 @@
exp-bbv \
exp-dhat
-# DDD: once all tools work on Darwin, TEST_TOOLS and TEST_EXP_TOOLS can be
-# replaced with TOOLS and EXP_TOOLS.
-TEST_TOOLS = $(TOOLS)
-if !VGCONF_OS_IS_DARWIN
- TEST_EXP_TOOLS = $(EXP_TOOLS)
-else
- TEST_EXP_TOOLS = exp-bbv
-endif
-
-
# Put docs last because building the HTML is slow and we want to get
# everything else working before we try it.
SUBDIRS = \
@@ -76,13 +66,13 @@
## Preprend @PERL@ because tests/vg_regtest isn't executable
regtest: check
- -tests/check_makefile_consistency gdbserver_tests $(TEST_TOOLS)
$(TEST_EXP_TOOLS)
+ -tests/check_makefile_consistency gdbserver_tests $(TOOLS) $(EXP_TOOLS)
gdbserver_tests/make_local_links $(GDB)
- @PERL@ tests/vg_regtest gdbserver_tests $(TEST_TOOLS) $(TEST_EXP_TOOLS)
+ @PERL@ tests/vg_regtest gdbserver_tests $(TOOLS) $(EXP_TOOLS)
nonexp-regtest: check
- @PERL@ tests/vg_regtest $(TEST_TOOLS)
+ @PERL@ tests/vg_regtest $(TOOLS)
exp-regtest: check
- @PERL@ tests/vg_regtest gdbserver_tests $(TEST_EXP_TOOLS)
+ @PERL@ tests/vg_regtest gdbserver_tests $(EXP_TOOLS)
# Nb: gdbserver_tests are put in exp-regtest rather than nonexp-regtest
# because they are tested with various valgrind tools, so might be using
# an experimental tool.
=======================================
--- /trunk/valgrind/Makefile.tool.am Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/Makefile.tool.am Mon Dec 12 00:02:05 2011
@@ -59,6 +59,13 @@
TOOL_LDFLAGS_AMD64_DARWIN = \
$(TOOL_LDFLAGS_COMMON_DARWIN) -arch x86_64
+# On Android we must ask for non-executable stack, not sure why.
+if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
+if VGCONF_PLATVARIANT_IS_ANDROID
+TOOL_LDFLAGS_ARM_LINUX += -Wl,-z,noexecstack
+endif
+endif
+
# NB for 64-bit darwin. We may want to set -Wl,-pagezero_size to
# something smaller than the default of 4G, so as to facilitate
# loading clients who are also linked thusly (currently m_ume.c
=======================================
--- /trunk/valgrind/NEWS Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/NEWS Mon Dec 12 00:02:05 2011
@@ -1,6 +1,26 @@
-
-Release 3.7.0 (XX November 2011)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Release 3.7.1 (????)
+~~~~~~~~~~~~~~~~~~~~
+
+
+* ==================== FIXED BUGS ====================
+
+The following bugs have been fixed or resolved. Note that "n-i-bz"
+stands for "not in bugzilla" -- that is, a bug that was reported to us
+but never got a bugzilla entry. We encourage you to file bugs in
+bugzilla (http://bugs.kde.org/enter_valgrind_bug.cgi) rather than
+mailing the developers (or mailing lists) directly -- bugs that are
+not entered into bugzilla tend to get forgotten about or ignored.
+
+To see details of a given bug, visit
+https://bugs.kde.org/show_bug.cgi?id=XXXXXX
+where XXXXXX is the bug number as listed below.
+
+286374 Running cachegrind with --branch-sim=yes on 64-bit PowerPC program
fails
+
+
+
+Release 3.7.0 (5 November 2011)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3.7.0 is a feature release with many significant improvements and the
usual collection of bug fixes.
@@ -80,7 +100,9 @@
(--join-list-vol); fixed a memory leak triggered by repeated client
memory allocatation and deallocation; improved Darwin support.
-* exp-ptrcheck: this tool has been reduced in scope so as to improve
+* exp-ptrcheck: this tool has been renamed to exp-sgcheck
+
+* exp-sgcheck: this tool has been reduced in scope so as to improve
performance and remove checking that Memcheck does better.
Specifically, the ability to check for overruns for stack and global
arrays is unchanged, but the ability to check for overruns of heap
@@ -296,7 +318,9 @@
n-i-bz don't be spooked by libxul.so linked with gold
n-i-bz improved checking for VALGRIND_CHECK_MEM_IS_DEFINED
-(3.7.0: XX November 2011, vex rXXXX, valgrind rXXXXX).
+(3.7.0-TEST1: 27 October 2011, vex r2228, valgrind r12245)
+(3.7.0.RC1: 1 November 2011, vex r2231, valgrind r12257)
+(3.7.0: 5 November 2011, vex r2231, valgrind r12258)
=======================================
--- /trunk/valgrind/README Mon Oct 25 06:09:43 2010
+++ /trunk/valgrind/README Mon Dec 12 00:02:05 2011
@@ -39,6 +39,7 @@
- ARM/Linux
- x86/MacOSX
- AMD64/MacOSX
+- S390X/Linux
Note that AMD64 is just another name for x86-64, and Valgrind runs fine
on Intel processors. Also note that the core of MacOSX is called
=======================================
--- /trunk/valgrind/VEX/priv/guest_arm_toIR.c Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/VEX/priv/guest_arm_toIR.c Mon Dec 12 00:02:05 2011
@@ -16077,8 +16077,8 @@
UInt rN = INSN0(3,0);
UInt rD = INSN1(11,8);
Bool valid = !isBadRegT(rN) && !isBadRegT(rD);
- /* but allow "add.w reg, sp, #constT" */
- if (!valid && rN == 13 && rD != 15)
+ /* but allow "add.w reg, sp, #constT" for reg != PC */
+ if (!valid && rD <= 14 && rN == 13)
valid = True;
if (valid) {
IRTemp argL = newTemp(Ity_I32);
@@ -16104,8 +16104,8 @@
UInt rN = INSN0(3,0);
UInt rD = INSN1(11,8);
Bool valid = !isBadRegT(rN) && !isBadRegT(rD);
- /* but allow "addw sp, sp, #uimm12" */
- if (!valid && rD == 13 && rN == 13)
+ /* but allow "addw reg, sp, #uimm12" for reg != PC */
+ if (!valid && rD <= 14 && rN == 13)
valid = True;
if (valid) {
IRTemp argL = newTemp(Ity_I32);
=======================================
--- /trunk/valgrind/VEX/priv/guest_x86_helpers.c Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/VEX/priv/guest_x86_helpers.c Mon Dec 12 00:02:05 2011
@@ -1787,7 +1787,20 @@
/* Copy the x87 registers out of the image, into a temporary
Fpu_State struct. */
- for (i = 0; i < 14; i++) tmp.env[i] = 0;
+
+ /* LLVM on Darwin turns the following loop into a movaps plus a
+ handful of scalar stores. This would work fine except for the
+ fact that VEX doesn't keep the stack correctly (16-) aligned for
+ the call, so it segfaults. Hence, split the loop into two
+ pieces (and pray LLVM doesn't merely glue them back together) so
+ it's composed only of scalar stores and so is alignment
+ insensitive. Of course this is a kludge of the lamest kind --
+ VEX should be fixed properly. */
+ /* Code that seems to trigger the problem:
+ for (i = 0; i < 14; i++) tmp.env[i] = 0; */
+ for (i = 0; i < 7; i++) tmp.env[i+0] = 0;
+ for (i = 0; i < 7; i++) tmp.env[i+7] = 0;
+
for (i = 0; i < 80; i++) tmp.reg[i] = 0;
/* fill in tmp.reg[0..7] */
for (stno = 0; stno < 8; stno++) {
=======================================
--- /trunk/valgrind/auxprogs/Makefile.am Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/auxprogs/Makefile.am Mon Dec 12 00:02:05 2011
@@ -6,6 +6,7 @@
gen-mdg \
gsl16test \
gsl19test \
+ nightly-build-summary \
posixtestsuite-1.5.1-diff-results
EXTRA_DIST = \
=======================================
--- /trunk/valgrind/auxprogs/gsl16test Mon Jun 7 07:06:05 2010
+++ /trunk/valgrind/auxprogs/gsl16test Mon Dec 12 00:02:05 2011
@@ -20,6 +20,11 @@
# name of Valgrind
# args for Valgrind
+# Results: 3.7.0 --tool=none
+# x86 1 failure Ubuntu 10.10
+# FAIL: qawo(f456) elist (7.25063790881233303e-15 observed vs
7.25922435194575979e-15 expected)
+# same failure was also present in 3.6.1
+# s390x 0 failures on z900 running RHEL4
if [ $# != 5 ]
then
=======================================
--- /trunk/valgrind/auxprogs/gsl19test Mon Jun 7 07:06:05 2010
+++ /trunk/valgrind/auxprogs/gsl19test Mon Dec 12 00:02:05 2011
@@ -22,6 +22,11 @@
# name of Valgrind
# args for Valgrind
+# Results: 3.7.0 --tool=none
+# x86 1 failure Ubuntu 10.10
+# FAIL: qawo(f456) elist (7.25063790881233303e-15 observed vs
7.25922435194575979e-15 expected)
+# same failure was also present in 3.6.1
+# s390x 0 failures on z196 running SLES11
if [ $# != 5 ]
then
=======================================
--- /trunk/valgrind/callgrind/Makefile.am Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/callgrind/Makefile.am Mon Dec 12 00:02:05 2011
@@ -35,7 +35,6 @@
bbcc.c \
callstack.c \
clo.c \
- command.c \
context.c \
costs.c \
debug.c \
=======================================
--- /trunk/valgrind/callgrind/bbcc.c Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/callgrind/bbcc.c Mon Dec 12 00:02:05 2011
@@ -555,7 +555,9 @@
Addr sp;
BB* last_bb;
ThreadId tid;
- Int jmpkind, passed = 0, csp;
+ ClgJumpKind jmpkind;
+ Bool isConditionalJump;
+ Int passed = 0, csp;
Bool ret_without_call = False;
Int popcount_on_return = 1;
@@ -581,16 +583,8 @@
if (last_bb) {
passed = CLG_(current_state).jmps_passed;
CLG_ASSERT(passed <= last_bb->cjmp_count);
- if (passed == last_bb->cjmp_count) {
- jmpkind = last_bb->jmpkind;
-
- /* VEX always gives a Boring jump kind also when passed trough */
- if ((jmpkind == Ijk_Boring) &&
- (last_bb->offset + last_bb->instr_len == bb->offset))
- jmpkind = JmpNone;
- }
- else
- jmpkind = JmpCond;
+ jmpkind = last_bb->jmp[passed].jmpkind;
+ isConditionalJump = (passed < last_bb->cjmp_count);
/* if we are in a function which is skipped in the call graph, we
* do not increment the exe counter to produce cost (if simulation
off),
@@ -612,7 +606,8 @@
}
}
else {
- jmpkind = JmpNone;
+ jmpkind = jk_None;
+ isConditionalJump = False;
}
/* Manipulate JmpKind if needed, only using BB specific info */
@@ -620,7 +615,7 @@
csp = CLG_(current_call_stack).sp;
/* A return not matching the top call in our callstack is a jump */
- if ( (jmpkind == Ijk_Ret) && (csp >0)) {
+ if ( (jmpkind == jk_Return) && (csp >0)) {
Int csp_up = csp-1;
call_entry* top_ce = &(CLG_(current_call_stack).entry[csp_up]);
@@ -650,14 +645,14 @@
}
}
if (popcount_on_return == 0) {
- jmpkind = Ijk_Boring;
+ jmpkind = jk_Jump;
ret_without_call = True;
}
}
/* Should this jump be converted to call or pop/call ? */
- if (( jmpkind != Ijk_Ret) &&
- ( jmpkind != Ijk_Call) && last_bb) {
+ if (( jmpkind != jk_Return) &&
+ ( jmpkind != jk_Call) && last_bb) {
/* We simulate a JMP/Cont to be a CALL if
* - jump is in another ELF object or section kind
@@ -701,30 +696,32 @@
}
}
- jmpkind = Ijk_Call;
+ jmpkind = jk_Call;
call_emulation = True;
}
}
- if (jmpkind == Ijk_Call)
+ if (jmpkind == jk_Call)
skip = CLG_(get_fn_node)(bb)->skip;
CLG_DEBUGIF(1) {
- if (jmpkind == JmpCond)
- VG_(printf)("Conditional");
- else if (jmpkind == JmpNone)
- VG_(printf)("None");
- else
- ppIRJumpKind( jmpkind );
-
- VG_(printf)(" %08lx -> %08lx, SP %08lx\n",
- last_bb ? bb_jmpaddr(last_bb) : 0,
- bb_addr(bb), sp);
+ if (isConditionalJump)
+ VG_(printf)("Cond-");
+ switch(jmpkind) {
+ case jk_None: VG_(printf)("Fall-through"); break;
+ case jk_Jump: VG_(printf)("Jump"); break;
+ case jk_Call: VG_(printf)("Call"); break;
+ case jk_Return: VG_(printf)("Return"); break;
+ default: tl_assert(0);
+ }
+ VG_(printf)(" %08lx -> %08lx, SP %08lx\n",
+ last_bb ? bb_jmpaddr(last_bb) : 0,
+ bb_addr(bb), sp);
}
/* Handle CALL/RET and update context to get correct BBCC */
- if (jmpkind == Ijk_Ret) {
+ if (jmpkind == jk_Return) {
if ((csp == 0) ||
((CLG_(current_fn_stack).top > CLG_(current_fn_stack).bottom) &&
@@ -745,10 +742,10 @@
Int unwind_count = CLG_(unwind_call_stack)(sp, 0);
if (unwind_count > 0) {
/* if unwinding was done, this actually is a return */
- jmpkind = Ijk_Ret;
+ jmpkind = jk_Return;
}
- if (jmpkind == Ijk_Call) {
+ if (jmpkind == jk_Call) {
delayed_push = True;
csp = CLG_(current_call_stack).sp;
@@ -811,10 +808,10 @@
if (delayed_push && !skip) {
if (CLG_(clo).skip_direct_recursion) {
- /* do not increment rec. level if called from
- * same function */
- if (!CLG_(current_state).bbcc ||
- (CLG_(current_state).bbcc->cxt->fn[0] != bbcc->cxt->fn[0]))
+ /* a call was detected, which means that the source BB != 0 */
+ CLG_ASSERT(CLG_(current_state).bbcc != 0);
+ /* only increment rec. level if called from different function */
+ if (CLG_(current_state).bbcc->cxt->fn[0] != bbcc->cxt->fn[0])
level++;
}
else level++;
@@ -848,8 +845,7 @@
bbcc, sp, skip);
}
- if (CLG_(clo).collect_jumps &&
- ((jmpkind == JmpCond) || (jmpkind == Ijk_Boring))) {
+ if (CLG_(clo).collect_jumps && (jmpkind == jk_Jump)) {
/* Handle conditional jumps followed, i.e. trace arcs
* This uses JCC structures, too */
@@ -857,15 +853,15 @@
jCC* jcc = CLG_(get_jcc)(last_bbcc, passed, bbcc);
CLG_ASSERT(jcc != 0);
// Change from default, and check if already changed
- if (jcc->jmpkind == Ijk_Call)
- jcc->jmpkind = jmpkind;
+ if (jcc->jmpkind == jk_Call)
+ jcc->jmpkind = isConditionalJump ? jk_CondJump : jk_Jump;
else {
// FIXME: Why can this fail?
// CLG_ASSERT(jcc->jmpkind == jmpkind);
}
jcc->call_counter++;
- if (jmpkind == JmpCond)
+ if (isConditionalJump)
CLG_(stat).jcnd_counter++;
else
CLG_(stat).jump_counter++;
=======================================
--- /trunk/valgrind/callgrind/callstack.c Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/callgrind/callstack.c Mon Dec 12 00:02:05 2011
@@ -235,8 +235,14 @@
/* return address is only is useful with a real call;
* used to detect RET w/o CALL */
- ret_addr = (from->bb->jmpkind == Ijk_Call) ?
- bb_addr(from->bb) + from->bb->instr_len : 0;
+ if (from->bb->jmp[jmp].jmpkind == jk_Call) {
+ UInt instr = from->bb->jmp[jmp].instr;
+ ret_addr = bb_addr(from->bb) +
+ from->bb->instr[instr].instr_offset +
+ from->bb->instr[instr].instr_size;
+ }
+ else
+ ret_addr = 0;
/* put jcc on call stack */
current_entry->jcc = jcc;
=======================================
--- /trunk/valgrind/callgrind/dump.c Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/callgrind/dump.c Mon Dec 12 00:02:05 2011
@@ -669,7 +669,7 @@
target.file = last->file;
}
- if ((jcc->jmpkind == JmpCond) || (jcc->jmpkind == Ijk_Boring)) {
+ if ((jcc->jmpkind == jk_CondJump) || (jcc->jmpkind == jk_Jump)) {
/* this is a JCC for a followed conditional or boring jump. */
CLG_ASSERT(CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost));
@@ -703,7 +703,7 @@
print_fn(fd, outbuf, "jfn", jcc->to->cxt->fn[0]);
}
- if (jcc->jmpkind == JmpCond) {
+ if (jcc->jmpkind == jk_CondJump) {
/* format: jcnd=<followed>/<executions> <target> */
VG_(sprintf)(outbuf, "jcnd=%llu/%llu ",
jcc->call_counter, ecounter);
@@ -834,7 +834,7 @@
if (bb->jmp[jmp].instr == instr) {
jcc_count=0;
for(jcc=bbcc->jmp[jmp].jcc_list; jcc; jcc=jcc->next_from)
- if (((jcc->jmpkind != Ijk_Call) && (jcc->call_counter >0)) ||
+ if (((jcc->jmpkind != jk_Call) && (jcc->call_counter >0)) ||
(!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost )))
jcc_count++;
@@ -848,7 +848,7 @@
fprint_apos(fd, &(currCost->p), last, bbcc->cxt->fn[0]->file);
something_written = True;
for(jcc=bbcc->jmp[jmp].jcc_list; jcc; jcc=jcc->next_from) {
- if (((jcc->jmpkind != Ijk_Call) && (jcc->call_counter >0)) ||
+ if (((jcc->jmpkind != jk_Call) && (jcc->call_counter >0)) ||
(!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost )))
fprint_jcc(fd, jcc, &(currCost->p), last, ecounter);
}
@@ -867,7 +867,7 @@
jcc_count = 0;
for(jcc=bbcc->jmp[jmp].jcc_list; jcc; jcc=jcc->next_from) {
/* yes, if JCC only counts jmp arcs or cost >0 */
- if ( ((jcc->jmpkind != Ijk_Call) && (jcc->call_counter >0)) ||
+ if ( ((jcc->jmpkind != jk_Call) && (jcc->call_counter >0)) ||
(!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost )))
jcc_count++;
}
@@ -901,7 +901,7 @@
if (jcc_count > 0)
for(jcc=bbcc->jmp[jmp].jcc_list; jcc; jcc=jcc->next_from) {
CLG_ASSERT(jcc->jmp == jmp);
- if ( ((jcc->jmpkind != Ijk_Call) && (jcc->call_counter >0)) ||
+ if ( ((jcc->jmpkind != jk_Call) && (jcc->call_counter >0)) ||
(!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost )))
fprint_jcc(fd, jcc, &(currCost->p), last, ecounter);
=======================================
--- /trunk/valgrind/callgrind/global.h Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/callgrind/global.h Mon Dec 12 00:02:05 2011
@@ -51,9 +51,6 @@
/*------------------------------------------------------------*/
#define DEFAULT_OUTFORMAT "callgrind.out.%p"
-#define DEFAULT_COMMANDNAME "callgrind.cmd"
-#define DEFAULT_RESULTNAME "callgrind.res"
-#define DEFAULT_INFONAME "callgrind.info"
typedef struct _CommandLineOptions CommandLineOptions;
struct _CommandLineOptions {
@@ -232,6 +229,18 @@
typedef ULong* FullCost; /* Simulator + User */
+/* The types of control flow changes that can happen between
+ * execution of two BBs in a thread.
+ */
+typedef enum {
+ jk_None = 0, /* no explicit change by a guest instruction */
+ jk_Jump, /* regular jump */
+ jk_Call,
+ jk_Return,
+ jk_CondJump /* conditional jump taken (only used as jCC type) */
+} ClgJumpKind;
+
+
/* JmpCall cost center
* for subroutine call (from->bb->jmp_addr => to->bb->addr)
*
@@ -251,11 +260,9 @@
* After updating, <last> is set to current event counters. Thus,
* events are not counted twice for recursive calls (TODO: True?)
*/
-#define JmpNone (Ijk_Boring+30)
-#define JmpCond (Ijk_Boring+31)
struct _jCC {
- Int jmpkind; /* JmpCall, JmpBoring, JmpCond */
+ ClgJumpKind jmpkind; /* jk_Call, jk_Jump, jk_CondJump */
jCC* next_hash; /* for hash entry chain */
jCC* next_from; /* next JCC from a BBCC */
BBCC *from, *to; /* call arc from/to this BBCC */
@@ -279,13 +286,14 @@
};
+
/*
- * Info for a conditional jump in a basic block
+ * Info for a side exit in a BB
*/
typedef struct _CJmpInfo CJmpInfo;
struct _CJmpInfo {
- UInt instr; /* instruction index in this basic block */
- Bool skip; /* Cond.Jumps to next instruction should be ignored */
+ UInt instr; /* instruction index for BB.instr array */
+ ClgJumpKind jmpkind; /* jump kind when leaving BB at this side exit */
};
@@ -322,11 +330,10 @@
BBCC* last_bbcc; /* Temporary: Cached for faster access (LRU) */
/* filled by CLG_(instrument) if not seen before */
- UInt cjmp_count; /* number of conditional exits */
+ UInt cjmp_count; /* number of side exits */
CJmpInfo* jmp; /* array of info for condition jumps,
* allocated directly after this struct */
- Int jmpkind; /* remember jump kind of final exit */
- Bool cjmp_inverted; /* condition of last cond.jump can be inverted
by VEX */
+ Bool cjmp_inverted; /* is last side exit actually fall through? */
UInt instr_len;
UInt cost_count;
@@ -360,12 +367,12 @@
/*
- * Info for a conditional jump in a basic block
+ * Cost info for a side exits from a BB
*/
typedef struct _JmpData JmpData;
struct _JmpData {
ULong ecounter; /* number of times the BB was left at this exit */
- jCC* jcc_list; /* JCCs for Cond.Jumps from this exit */
+ jCC* jcc_list; /* JCCs used for this exit */
};
@@ -723,11 +730,6 @@
Int CLG_(get_dump_counter)(void);
void CLG_(fini)(Int exitcode);
-/* from command.c */
-void CLG_(init_command)(void);
-void CLG_(check_command)(void);
-void CLG_(finish_command)(void);
-
/* from bb.c */
void CLG_(init_bb_hash)(void);
bb_hash* CLG_(get_bb_hash)(void);
=======================================
--- /trunk/valgrind/callgrind/jumps.c Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/callgrind/jumps.c Mon Dec 12 00:02:05 2011
@@ -152,7 +152,7 @@
jcc->from = from;
jcc->jmp = jmp;
jcc->to = to;
- jcc->jmpkind = Ijk_Call;
+ jcc->jmpkind = jk_Call;
jcc->call_counter = 0;
jcc->cost = 0;
=======================================
--- /trunk/valgrind/callgrind/main.c Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/callgrind/main.c Mon Dec 12 00:02:05 2011
@@ -905,10 +905,9 @@
VexGuestExtents* vge,
IRType gWordTy, IRType hWordTy )
{
- Int i, isize;
+ Int i;
IRStmt* st;
Addr origAddr;
- Addr64 cia; /* address of current insn */
InstrInfo* curr_inode = NULL;
ClgState clgs;
UInt cJumps = 0;
@@ -944,10 +943,9 @@
st = sbIn->stmts[i];
CLG_ASSERT(Ist_IMark == st->tag);
- origAddr = (Addr)st->Ist.IMark.addr;
- cia = st->Ist.IMark.addr;
- isize = st->Ist.IMark.len;
- CLG_ASSERT(origAddr == st->Ist.IMark.addr); // XXX: check no overflow
+ origAddr = (Addr)st->Ist.IMark.addr + (Addr)st->Ist.IMark.delta;
+ CLG_ASSERT(origAddr == st->Ist.IMark.addr
+ + st->Ist.IMark.delta); // XXX: check no
overflow
/* Get BB struct (creating if necessary).
* JS: The hash table is keyed with orig_addr_noredir -- important!
@@ -977,8 +975,8 @@
break;
case Ist_IMark: {
- cia = st->Ist.IMark.addr;
- isize = st->Ist.IMark.len;
+ Addr64 cia = st->Ist.IMark.addr + st->Ist.IMark.delta;
+ Int isize = st->Ist.IMark.len;
CLG_ASSERT(clgs.instr_offset == (Addr)cia - origAddr);
// If Vex fails to decode an instruction, the size will be zero.
// Pretend otherwise.
@@ -1148,8 +1146,20 @@
CLG_ASSERT(clgs.ii_index>0);
if (!clgs.seen_before) {
- clgs.bb->jmp[cJumps].instr = clgs.ii_index-1;
- clgs.bb->jmp[cJumps].skip = False;
+ ClgJumpKind jk;
+
+ if (st->Ist.Exit.jk == Ijk_Call) jk = jk_Call;
+ else if (st->Ist.Exit.jk == Ijk_Ret) jk = jk_Return;
+ else {
+ if (IRConst2Addr(st->Ist.Exit.dst) ==
+ origAddr + curr_inode->instr_offset + curr_inode->instr_size)
+ jk = jk_None;
+ else
+ jk = jk_Jump;
+ }
+
+ clgs.bb->jmp[cJumps].instr = clgs.ii_index-1;
+ clgs.bb->jmp[cJumps].jmpkind = jk;
}
/* Update global variable jmps_passed before the jump
@@ -1214,18 +1224,45 @@
CLG_ASSERT(clgs.bb->cjmp_count == cJumps);
CLG_ASSERT(clgs.bb->instr_count = clgs.ii_index);
- /* This stores the instr of the call/ret at BB end */
- clgs.bb->jmp[cJumps].instr = clgs.ii_index-1;
+ /* Info for final exit from BB */
+ {
+ ClgJumpKind jk;
+
+ if (sbIn->jumpkind == Ijk_Call) jk = jk_Call;
+ else if (sbIn->jumpkind == Ijk_Ret) jk = jk_Return;
+ else {
+ jk = jk_Jump;
+ if ((sbIn->next->tag == Iex_Const) &&
+ (IRConst2Addr(sbIn->next->Iex.Const.con) ==
+ origAddr + clgs.instr_offset))
+ jk = jk_None;
+ }
+ clgs.bb->jmp[cJumps].jmpkind = jk;
+ /* Instruction index of the call/ret at BB end
+ * (it is wrong for fall-through, but does not matter) */
+ clgs.bb->jmp[cJumps].instr = clgs.ii_index-1;
+ }
+
+ /* swap information of last exit with final exit if inverted */
+ if (clgs.bb->cjmp_inverted) {
+ ClgJumpKind jk;
+ UInt instr;
+
+ jk = clgs.bb->jmp[cJumps].jmpkind;
+ clgs.bb->jmp[cJumps].jmpkind = clgs.bb->jmp[cJumps-1].jmpkind;
+ clgs.bb->jmp[cJumps-1].jmpkind = jk;
+ instr = clgs.bb->jmp[cJumps].instr;
+ clgs.bb->jmp[cJumps].instr = clgs.bb->jmp[cJumps-1].instr;
+ clgs.bb->jmp[cJumps-1].instr = instr;
+ }
if (clgs.seen_before) {
CLG_ASSERT(clgs.bb->cost_count == update_cost_offsets(&clgs));
CLG_ASSERT(clgs.bb->instr_len = clgs.instr_offset);
- CLG_ASSERT(clgs.bb->jmpkind == sbIn->jumpkind);
}
else {
clgs.bb->cost_count = update_cost_offsets(&clgs);
clgs.bb->instr_len = clgs.instr_offset;
- clgs.bb->jmpkind = sbIn->jumpkind;
}
CLG_DEBUG(3, "- instrument(BB %#lx): byteLen %u, CJumps %u,
CostLen %u\n",
@@ -1708,8 +1745,6 @@
CLG_(dump_profile)(0, False);
- CLG_(finish_command)();
-
if (VG_(clo_verbosity) == 0) return;
/* Hash table stats */
@@ -1861,7 +1896,6 @@
}
CLG_(init_dumps)();
- CLG_(init_command)();
(*CLG_(cachesim).post_clo_init)();
=======================================
--- /trunk/valgrind/callgrind/threads.c Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/callgrind/threads.c Mon Dec 12 00:02:05 2011
@@ -189,8 +189,6 @@
}
}
- CLG_(check_command)();
-
/* now check for thread switch */
CLG_(switch_thread)(tid);
}
=======================================
--- /trunk/valgrind/configure.in Fri Oct 28 05:29:34 2011
+++ /trunk/valgrind/configure.in Mon Dec 12 00:02:05 2011
@@ -98,19 +98,21 @@
# We don't want gcc < 3.0
AC_MSG_CHECKING([for a supported version of gcc])
-# Try to get the gcc version, sed-ing out some unexpected stuff
-# that appears with the default gcc on OSX 10.6 and 10.7 respectively.
-# Without this, the version number comes out as 686, 10 or 11 :-(
-#
-# i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
-# i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build
5658) (LLVM build 2335.15.00)
+# Obtain the compiler version.
+#
+# A few examples of how the ${CC} --version output looks like:
+#
+# Arch Linux: i686-pc-linux-gnu-gcc (GCC) 4.6.2
+# Debian Linux: gcc (Debian 4.3.2-1.1) 4.3.2
+# openSUSE: gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision
167585]
+# Exherbo Linux: x86_64-pc-linux-gnu-gcc (Exherbo gcc-4.6.2) 4.6.2
+# OS/X 10.6: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build
5666) (dot 3)
+# OS/X 10.7: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple
Inc. build 5658) (LLVM build 2335.15.00)
+# Clang: clang version 2.9 (tags/RELEASE_29/final)
#
[gcc_version=`${CC} --version \
- | head -n 1 \
- | $SED 's/i686-apple-darwin9//' \
- | $SED 's/i686-apple-darwin10//' \
- | $SED 's/i686-apple-darwin11//' \
- | $SED 's/^[^0-9]*\([0-9.]*\).*$/\1/'`]
+ | $SED -n -e 's/[^ ]*gcc[^ ]* ([^)]*) \([0-9.]*\).*$/\1/p' \
+ -e 's/[^ ]*clang version \([0-9.]*\).*$/\1/p'`]
is_clang="notclang"
if test "x`${CC} --version | head -n 1 | $SED 's/\(clang\)
version.*/\1/'`" = "xclang" ; then
@@ -1383,9 +1385,9 @@
AC_MSG_RESULT([-Wextra])
], [
CFLAGS="-W"
- AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ ]], [[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
return 0;
- ]]), [
+ ]])], [
AC_SUBST([FLAG_W_EXTRA], [-W])
AC_MSG_RESULT([-W])
], [
@@ -1509,6 +1511,8 @@
# automake-level symbol (BUILD_SSSE3_TESTS), used in test Makefile.am's
AC_MSG_CHECKING([if x86/amd64 assembler speaks SSSE3])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -msse"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
do { long long int x;
__asm__ __volatile__(
@@ -1521,6 +1525,7 @@
ac_have_as_ssse3=no
AC_MSG_RESULT([no])
])
+CFLAGS="$save_CFLAGS"
AM_CONDITIONAL(BUILD_SSSE3_TESTS, test x$ac_have_as_ssse3 = xyes)
=======================================
--- /trunk/valgrind/coregrind/Makefile.am Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/coregrind/Makefile.am Mon Dec 12 00:02:05 2011
@@ -52,6 +52,12 @@
if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
valgrind_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress
endif
+# On Android we must ask for non-executable stack, not sure why.
+if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
+if VGCONF_PLATVARIANT_IS_ANDROID
+valgrind_LDFLAGS += -Wl,-z,noexecstack
+endif
+endif
vgdb_SOURCES = vgdb.c
vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI)
=======================================
--- /trunk/valgrind/coregrind/m_debuginfo/debuginfo.c Tue Oct 25 09:11:36
2011
+++ /trunk/valgrind/coregrind/m_debuginfo/debuginfo.c Mon Dec 12 00:02:05
2011
@@ -1100,7 +1100,7 @@
*/
Int mashedSzB = VG_(strlen)(pdbname) + VG_(strlen)(wpfx) +
50/*misc*/;
HChar* mashed = ML_(dinfo_zalloc)("di.debuginfo.dnpdi.1",
mashedSzB);
- VG_(sprintf)(mashed, "%s/drive_%c%s",
+ VG_(snprintf)(mashed, mashedSzB, "%s/drive_%c%s",
wpfx, VG_(tolower)(pdbname[0]), &pdbname[2]);
vg_assert(mashed[mashedSzB-1] == 0);
ML_(dinfo_free)(pdbname);
@@ -1112,7 +1112,7 @@
*/
Int mashedSzB = VG_(strlen)(pdbname) + VG_(strlen)(home) +
50/*misc*/;
HChar* mashed = ML_(dinfo_zalloc)("di.debuginfo.dnpdi.2",
mashedSzB);
- VG_(sprintf)(mashed, "%s/.wine/drive_%c%s",
+ VG_(snprintf)(mashed, mashedSzB, "%s/.wine/drive_%c%s",
home, VG_(tolower)(pdbname[0]), &pdbname[2]);
vg_assert(mashed[mashedSzB-1] == 0);
ML_(dinfo_free)(pdbname);
=======================================
--- /trunk/valgrind/coregrind/m_debuginfo/readelf.c Mon Nov 21 06:42:29 2011
+++ /trunk/valgrind/coregrind/m_debuginfo/readelf.c Mon Dec 12 00:02:05 2011
@@ -385,7 +385,7 @@
*/
if (sym->st_size == 0) {
# if defined(VGPV_arm_linux_android)
- *sym_size_out = 1024;
+ *sym_size_out = 2048;
# else
TRACE_SYMTAB(" ignore -- size=0: %s\n", sym_name);
return False;
=======================================
--- /trunk/valgrind/coregrind/m_gdbserver/remote-utils.c Wed Oct 26
04:50:27 2011
+++ /trunk/valgrind/coregrind/m_gdbserver/remote-utils.c Mon Dec 12
00:02:05 2011
@@ -269,7 +269,7 @@
"don't want to do, unless you know exactly what you're
doing,\n"
"or are doing some strange experiment):\n"
" %s/../../bin/vgdb --pid=%d%s%s ...command...\n",
- VG_LIBDIR,
+ VG_(libdir),
pid, (name_default ? "" : " --vgdb-prefix="),
(name_default ? "" : name));
}
@@ -282,7 +282,7 @@
"and then give GDB the following command\n"
" target remote | %s/../../bin/vgdb --pid=%d%s%s\n",
VG_(args_the_exename),
- VG_LIBDIR,
+ VG_(libdir),
pid, (name_default ? "" : " --vgdb-prefix="),
(name_default ? "" : name)
);
=======================================
--- /trunk/valgrind/coregrind/m_machine.c Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/coregrind/m_machine.c Mon Dec 12 00:02:05 2011
@@ -587,7 +587,9 @@
}
VG_(free)( file_buf );
- VG_(debugLog)(1, "machine", "model = %s\n", model_map[model].name);
+ VG_(debugLog)(1, "machine", "model = %s\n",
+ model == VEX_S390X_MODEL_INVALID ? "UNKNOWN"
+ : model_map[model].name);
return model;
}
=======================================
--- /trunk/valgrind/coregrind/m_options.c Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/coregrind/m_options.c Mon Dec 12 00:02:05 2011
@@ -47,7 +47,11 @@
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;
=======================================
--- /trunk/valgrind/coregrind/m_sigframe/sigframe-arm-linux.c Tue Oct 25
09:11:36 2011
+++ /trunk/valgrind/coregrind/m_sigframe/sigframe-arm-linux.c Mon Dec 12
00:02:05 2011
@@ -259,7 +259,12 @@
tst->arch.vex.guest_R0 = sigNo;
if (flags & VKI_SA_RESTORER)
- tst->arch.vex.guest_R14 = (Addr) restorer;
+ tst->arch.vex.guest_R14 = (Addr)restorer;
+ else
+ tst->arch.vex.guest_R14
+ = (flags & VKI_SA_SIGINFO)
+ ? (Addr)&VG_(arm_linux_SUBST_FOR_rt_sigreturn)
+ : (Addr)&VG_(arm_linux_SUBST_FOR_sigreturn);
tst->arch.vex.guest_R15T = (Addr) handler; /* R15 == PC */
}
=======================================
--- /trunk/valgrind/coregrind/m_sparsewa.c Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/coregrind/m_sparsewa.c Mon Dec 12 00:02:05 2011
@@ -435,33 +435,21 @@
static UWord swa_sizeSWA_wrk ( void* nd )
{
Int i;
- UWord sum = 0;
if (*(UWord*)nd == LevelN_MAGIC) {
+ UWord sum = 0;
LevelN* levelN = (LevelN*)nd;
for (i = 0; i < 256; i++) {
if (levelN->child[i]) {
sum += swa_sizeSWA_wrk( levelN->child[i] );
}
- }
+ }
+ return sum;
} else {
Level0* level0;
vg_assert(*(UWord*)nd == Level0_MAGIC);
level0 = (Level0*)nd;
- for (i = 0; i < 256/8; i += 2) {
- UWord x = level0->inUse[i+0]; /* assume zero-extend */
- UWord y = level0->inUse[i+1]; /* assume zero-extend */
- /* do 'sum += popcount(x) + popcount(y)' for byte-sized x, y */
- /* unroll the loop twice so as to expose more ILP */
- x = (x & 0x55) + ((x >> 1) & 0x55);
- y = (y & 0x55) + ((y >> 1) & 0x55);
- x = (x & 0x33) + ((x >> 2) & 0x33);
- y = (y & 0x33) + ((y >> 2) & 0x33);
- x = (x & 0x0F) + ((x >> 4) & 0x0F);
- y = (y & 0x0F) + ((y >> 4) & 0x0F);
- sum += x + y;
- }
- }
- return sum;
+ return level0->nInUse;
+ }
}
UWord VG_(sizeSWA) ( SparseWA* swa )
{
=======================================
--- /trunk/valgrind/coregrind/m_syswrap/syswrap-linux.c Tue Oct 25 09:11:36
2011
+++ /trunk/valgrind/coregrind/m_syswrap/syswrap-linux.c Mon Dec 12 00:02:05
2011
@@ -5173,11 +5173,13 @@
*/
if (1) {
/* blunt-instrument approach */
- if (0) VG_(printf)("QQQQQQQQQQ c01c quick hack actioned
(%08lx, %08lx)\n", ARG2, ARG3);
+ if (0) VG_(printf)("QQQQQQQQQQ c01c quick hack actioned"
+ " (%08lx, %08lx)\n", ARG2, ARG3);
POST_MEM_WRITE(ARG3, 256);
} else {
/* be a bit more sophisticated */
- if (0) VG_(printf)("QQQQQQQQQQ c01c quick hack actioned
(%08lx, %08lx) (fancy)\n", ARG2, ARG3);
+ if (0) VG_(printf)("QQQQQQQQQQ c01c quick hack actioned"
+ " (%08lx, %08lx) (fancy)\n", ARG2, ARG3);
POST_MEM_WRITE(ARG3, 28);
UInt* word = (UInt*)ARG3;
if (word && word[2] && word[3] < 0x200/*stay sane*/)
@@ -5197,6 +5199,14 @@
}
/* END Nexus S specific ioctls */
+
+# elif defined(ANDROID_HARDWARE_pandaboard)
+
+ /* BEGIN Pandaboard specific ioctls */
+ /* currently none are known */
+ /* END Pandaboard specific ioctls */
+
+
# else /* no ANDROID_HARDWARE_anything defined */
# warning ""
@@ -5205,6 +5215,7 @@
# warning "building for. Currently known values are"
# warning ""
# warning " ANDROID_HARDWARE_nexus_s Samsung Nexus S"
+# warning " ANDROID_HARDWARE_pandaboard Pandaboard running Linaro
Android"
# warning ""
# warning "Make sure you exactly follow the steps in README.android."
# warning ""
=======================================
--- /trunk/valgrind/coregrind/m_trampoline.S Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/coregrind/m_trampoline.S Mon Dec 12 00:02:05 2011
@@ -517,6 +517,22 @@
.global VG_(trampoline_stuff_start)
VG_(trampoline_stuff_start):
+.global VG_(arm_linux_SUBST_FOR_sigreturn)
+.type VG_(arm_linux_SUBST_FOR_sigreturn),#function
+VG_(arm_linux_SUBST_FOR_sigreturn):
+ mov r7, # __NR_sigreturn
+ svc #0
+ .long 0xFFFFFFFF /*illegal insn*/
+.size
VG_(arm_linux_SUBST_FOR_sigreturn), .-VG_(arm_linux_SUBST_FOR_sigreturn)
+
+.global VG_(arm_linux_SUBST_FOR_rt_sigreturn)
+.type VG_(arm_linux_SUBST_FOR_rt_sigreturn),#function
+VG_(arm_linux_SUBST_FOR_rt_sigreturn):
+ mov r7, # __NR_rt_sigreturn
+ svc #0
+ .long 0xFFFFFFFF /*illegal insn*/
+.size
VG_(arm_linux_SUBST_FOR_rt_sigreturn), .-VG_(arm_linux_SUBST_FOR_rt_sigreturn)
+
.global VG_(arm_linux_REDIR_FOR_strlen)
VG_(arm_linux_REDIR_FOR_strlen):
mov r2, r0
=======================================
--- /trunk/valgrind/coregrind/pub_core_trampoline.h Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/coregrind/pub_core_trampoline.h Mon Dec 12 00:02:05 2011
@@ -93,6 +93,8 @@
#endif
#if defined(VGP_arm_linux)
+extern Addr VG_(arm_linux_SUBST_FOR_sigreturn);
+extern Addr VG_(arm_linux_SUBST_FOR_rt_sigreturn);
extern UInt VG_(arm_linux_REDIR_FOR_strlen)( void* );
//extern void* VG_(arm_linux_REDIR_FOR_index) ( void*, Int );
extern void* VG_(arm_linux_REDIR_FOR_memcpy)( void*, void*, Int );
=======================================
--- /trunk/valgrind/docs/xml/dist-docs.xml Mon Jun 7 07:06:05 2010
+++ /trunk/valgrind/docs/xml/dist-docs.xml Mon Dec 12 00:02:05 2011
@@ -74,4 +74,24 @@
xmlns:xi="http://www.w3.org/2001/XInclude" />
</literallayout>
</chapter>
+
+ <chapter id="dist.readme-s390"
+ xreflabel="Readme S390">
+ <title>README.S390</title>
+ <literallayout>
+ <xi:include href="../../README.s390"
+ parse="text"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </literallayout>
+ </chapter>
+
+ <chapter id="dist.readme-android"
+ xreflabel="Readme Android">
+ <title>README.android</title>
+ <literallayout>
+ <xi:include href="../../README.android"
+ parse="text"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </literallayout>
+ </chapter>
</book>
=======================================
--- /trunk/valgrind/docs/xml/manual-core-adv.xml Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/docs/xml/manual-core-adv.xml Mon Dec 12 00:02:05 2011
@@ -512,7 +512,7 @@
]]></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
+target system. Be sure 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
@@ -520,6 +520,44 @@
port numbers.
</para>
+<para>In the 3.7.0 release, the GDB server is not enabled by default
+for Android, due to problems in establishing a suitable directory in
+which Valgrind can create the necessary FIFOs (named pipes) for
+communication purposes. You can stil try to use the GDB server, but
+you will need to explicitly enable it using the flag
+<computeroutput>--vgdb=yes</computeroutput> or
+<computeroutput>--vgdb=full</computeroutput>.
+</para>
+
+<para>Additionally, you
+will need to select a temporary directory which is (a) writable
+by Valgrind, and (b) supports FIFOs. This is the main difficult
+point. Often, <computeroutput>/sdcard</computeroutput> satisfies
+requirement (a), but fails for (b) because it is a VFAT file system
+and VFAT does not support pipes. Possibilities you could try are
+<computeroutput>/data/local</computeroutput>,
+<computeroutput>/data/local/Inst</computeroutput> (if you
+installed Valgrind there), or
+<computeroutput>/data/data/name.of.my.app</computeroutput>, if you
+are running a specific application and it has its own directory of
+that form. This last possibility may have the highest probability
+of success.</para>
+
+<para>You can specify the temporary directory to use either via
+the <computeroutput>--with-tmpdir=</computeroutput> configure time
+flag, or by setting environment variable TMPDIR when running Valgrind
+(on the Android device, not on the Android NDK development host).
+Another alternative is to specify the directory for the FIFOs using
+the <computeroutput>--vgdb-prefix=</computeroutput> Valgrind command
+line option.
+</para>
+
+<para>We hope to have a better story for temporary directory handling
+on Android in the future. The difficulty is that, unlike in standard
+Unixes, there is no single temporary file directory that reliably
+works across all devices and scenarios.
+</para>
+
</sect2>
<sect2 id="manual-core-adv.gdbserver-commandhandling"
=======================================
--- /trunk/valgrind/docs/xml/manual-core.xml Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/docs/xml/manual-core.xml Mon Dec 12 00:02:05 2011
@@ -2021,8 +2021,8 @@
<listitem>
<para>On ARM, essentially the entire ARMv7-A instruction set
is supported, in both ARM and Thumb mode. ThumbEE and Jazelle are
- not supported. NEON and VFPv3 support is fairly complete. ARMv6
- media instruction support is mostly done but not yet complete.
+ not supported. NEON, VFPv3 and ARMv6 media support is fairly
+ complete.
</para>
</listitem>
=======================================
--- /trunk/valgrind/docs/xml/vg-entities.xml Fri Feb 4 01:29:13 2011
+++ /trunk/valgrind/docs/xml/vg-entities.xml Mon Dec 12 00:02:05 2011
@@ -2,12 +2,12 @@
<!ENTITY vg-jemail "jul...@valgrind.org">
<!ENTITY vg-vemail "valg...@valgrind.org">
<!ENTITY cl-email "Josef.Wei...@gmx.de">
-<!ENTITY vg-lifespan "2000-2010">
+<!ENTITY vg-lifespan "2000-2011">
<!-- valgrind release + version stuff -->
<!ENTITY rel-type "Release">
-<!ENTITY rel-version "3.6.0">
-<!ENTITY rel-date "21 October 2010">
+<!ENTITY rel-version "3.7.0">
+<!ENTITY rel-date "2 November 2011">
<!-- where the docs are installed -->
<!ENTITY vg-docs-path "$INSTALL/share/doc/valgrind/html/index.html">
=======================================
--- /trunk/valgrind/exp-sgcheck/tests/bad_percentify.vgtest Wed Oct 26
04:03:19 2011
+++ /trunk/valgrind/exp-sgcheck/tests/bad_percentify.vgtest Mon Dec 12
00:02:05 2011
@@ -1,2 +1,2 @@
-prereq: ./is_arch_supported
+prereq: ./is_arch_supported && ../../tests/os_test linux
prog: bad_percentify
=======================================
--- /trunk/valgrind/exp-sgcheck/tests/globalerr.vgtest Wed Oct 26 04:03:19
2011
+++ /trunk/valgrind/exp-sgcheck/tests/globalerr.vgtest Mon Dec 12 00:02:05
2011
@@ -1,2 +1,2 @@
-prereq: ./is_arch_supported
+prereq: ./is_arch_supported && ../../tests/os_test linux
prog: globalerr
=======================================
--- /trunk/valgrind/exp-sgcheck/tests/hackedbz2.vgtest Wed Oct 26 04:03:19
2011
+++ /trunk/valgrind/exp-sgcheck/tests/hackedbz2.vgtest Mon Dec 12 00:02:05
2011
@@ -1,2 +1,2 @@
-prereq: ./is_arch_supported
+prereq: ./is_arch_supported && ../../tests/os_test linux
prog: hackedbz2
=======================================
--- /trunk/valgrind/exp-sgcheck/tests/hsg.vgtest Wed Oct 26 04:03:19 2011
+++ /trunk/valgrind/exp-sgcheck/tests/hsg.vgtest Mon Dec 12 00:02:05 2011
@@ -1,4 +1,4 @@
-prereq: ./is_arch_supported
+prereq: ./is_arch_supported && ../../tests/os_test linux
prog: hsg
vgopts: --xml=yes --xml-fd=2 --log-file=/dev/null
stderr_filter: ../../memcheck/tests/filter_xml
=======================================
--- /trunk/valgrind/exp-sgcheck/tests/preen_invars.vgtest Wed Oct 26
04:03:19 2011
+++ /trunk/valgrind/exp-sgcheck/tests/preen_invars.vgtest Mon Dec 12
00:02:05 2011
@@ -1,2 +1,2 @@
-prereq: ./is_arch_supported
+prereq: ./is_arch_supported && ../../tests/os_test linux
prog: preen_invars
=======================================
--- /trunk/valgrind/exp-sgcheck/tests/stackerr.vgtest Wed Oct 26 04:03:19
2011
+++ /trunk/valgrind/exp-sgcheck/tests/stackerr.vgtest Mon Dec 12 00:02:05
2011
@@ -1,3 +1,3 @@
-prereq: ./is_arch_supported
+prereq: ./is_arch_supported && ../../tests/os_test linux
vgopts: --num-callers=3
prog: stackerr
=======================================
--- /trunk/valgrind/helgrind/tests/Makefile.am Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/helgrind/tests/Makefile.am Mon Dec 12 00:02:05 2011
@@ -185,8 +185,3 @@
else
annotate_hbefore_CFLAGS = $(AM_CFLAGS)
endif
-
-if VGCONF_OS_IS_LINUX
-cond_timedwait_invalid_LDADD = -lrt
-endif
-
=======================================
--- /trunk/valgrind/helgrind/tests/cond_timedwait_invalid.c Tue Oct 25
09:11:36 2011
+++ /trunk/valgrind/helgrind/tests/cond_timedwait_invalid.c Mon Dec 12
00:02:05 2011
@@ -1,4 +1,4 @@
-#include "config.h"
+
#include <time.h>
#include <pthread.h>
#include <assert.h>
@@ -10,12 +10,12 @@
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
-#ifdef HAVE_CLOCK_GETTIME
- assert(clock_gettime(CLOCK_REALTIME, &abstime)==0);
-#else
+
+
+
abstime.tv_sec = time(NULL) + 2;
abstime.tv_nsec = 0;
-#endif
+
abstime.tv_nsec += 1000000000;
assert(pthread_mutex_lock(&mutex)==0);
=======================================
--- /trunk/valgrind/memcheck/mc_replace_strmem.c Fri Nov 18 05:36:56 2011
+++ /trunk/valgrind/memcheck/mc_replace_strmem.c Mon Dec 12 00:02:05 2011
@@ -1495,7 +1495,9 @@
}
#if defined(VGO_linux)
- STRCASESTR(VG_Z_LIBC_SONAME, strcasestr)
+# if !defined(VGPV_arm_linux_android)
+ STRCASESTR(VG_Z_LIBC_SONAME, strcasestr)
+# endif
#elif defined(VGO_darwin)
=======================================
--- /trunk/valgrind/memcheck/tests/badjump2.c Tue Oct 25 09:11:36 2011
+++ /trunk/valgrind/memcheck/tests/badjump2.c Mon Dec 12 00:02:05 2011
@@ -13,7 +13,7 @@
static
void SIGSEGV_handler(int signum)
{
- __builtin_longjmp(myjmpbuf, 1);
+ longjmp(myjmpbuf, 1);
}
int main(void)
@@ -33,7 +33,7 @@
res = sigaction( SIGSEGV, &sigsegv_new, &sigsegv_saved );
assert(res == 0);
- if (__builtin_setjmp(myjmpbuf) == 0) {
+ if (setjmp(myjmpbuf) == 0) {
// Jump to zero; will cause seg fault
#if defined(__powerpc64__)
unsigned long int fn[3];
=======================================
--- /trunk/valgrind/memcheck/tests/origin5-bz2.c Mon Jun 7 07:06:05 2010
+++ /trunk/valgrind/memcheck/tests/origin5-bz2.c Mon Dec 12 00:02:05 2011
@@ -4651,7 +4651,7 @@
/*---------------------------------------------------*/
-static
+static __attribute__((noinline))
Bool copy_input_until_stop ( EState* s )
{
Bool progress_in = False;
=======================================
***Additional files exist in this changeset.***