6640 Commits

Author SHA1 Message Date
Nicholas Nethercote
4372b47de8 Merge some minor regtest updates from the DARWIN branch:
- avoid using <malloc.h> where it's not necessary, because on DARWIN it's
  called <malloc/malloc.h>
- filter the output of brk2 more, which allows the .stderr.exp2 file to be
  removed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9037
2009-01-23 00:02:07 +00:00
Julian Seward
da8e9c1236 Move the test for __sync_bool_compare_and_swap almost to the bottom,
so it can use $mflag_primary.  This makes the word size for which the
test is done (-m32 or -m64) be the same as for which it is actually
needed, and in some situations unbreaks building of the regtests in
32-bit mode on a 64-bit machine.

For the same reason, apply $mflag_primary to the test for OpenMP.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9034
2009-01-22 22:44:30 +00:00
Nicholas Nethercote
ed322feb84 Rename all the arch/OS/platform-related variables in configure.in to make it
clearer what they mean:
- They all have VGCONF_ prefixes now, to indicate they come out of
  configure.in (and are clearly distinguished from the VGA_/VGO_/VGP_
  #defines passed in to C files).
- The ones that refer to the primary *or* secondary platform have _INCLUDES_
  in them.
- The ones that are in all-caps have a _CAPS suffix.

So, for example, what was VGP_X86_LINUX is now
VGCONF_PLATFORMS_INCLUDE_X86_LINUX, which is more verbose but also a lot
clearer.  The names of the #defines used in the C files (VGA_x86, VGO_linux,
etc) are unchanged.

cputest.c: changed to reflect the Valgrind installation's capabilities,
rather than the machine's capabilities.  In particular, if
--enable-only32bit is used on a 64-bit machine, then this program will claim
to only support 32-bits.  Also use the VGA/VGO/VGP macros which are clearer
than the __i386__ ones.  (This is partially merged from the DARWIN branch.)

configure.in: clean up the comments, distinguish different sections more
clearly, and generally make it more readable.

valgrind.pc.in: try to make this more accurate.  I doubt anyone's using it.
It doesn't appear to be set up to handle dual-architecture builds.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9031
2009-01-22 21:56:32 +00:00
Julian Seward
7e1fd774cc Minor tidyings:
search_all_symtabs: look for data symbols also in .sbss and .rodata
sections.

VG_(seginfo_sect_kind): identify addresses in .sbss sections.

VG_(pp_SectKind): handle missing case Vg_SectGOTPLT

search_all_loctabs, VG_(get_objname), VG_(find_seginfo): augment tests
"di->text_present" with "&& di->text_size > 0" (probably not
necessary, but is clearer, and more consistent in that most places
that look at DebugInfo.text_{size,avma} first perform both of those
tests).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9029
2009-01-22 21:18:15 +00:00
Julian Seward
5904bbd9fd Suppress any error at all that occurs in libpthread, without any
regard for any calling frames.  Needed to hide the fact that we can't
see stdio locking stuff and hence end up reporting a lot of errors in
multithreaded stdio working.
MERGE TO 3_4_BRANCH.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9028
2009-01-22 20:46:51 +00:00
Julian Seward
711894fdb3 More aggressive suppression of error reports from ld.so.
MERGE TO 3_4_BRANCH.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9027
2009-01-22 20:42:03 +00:00
Tom Hughes
986c69ccf8 Don't worry about an unmapped, zero sized, bss segment. Bug #181594.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9026
2009-01-22 16:53:25 +00:00
Tom Hughes
d298be2664 Accept zero size text segments. Bug #181594.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9025
2009-01-22 15:08:53 +00:00
Tom Hughes
8f774ff30b Handle the rodata and sbss sections and cope with variables that
are in those sections.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9024
2009-01-22 14:14:13 +00:00
Tom Hughes
20abad2fad Bias values should be PtrdiffT now.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9023
2009-01-22 14:02:26 +00:00
Tom Hughes
33a768dabc Removed unused round_Addr_upwards function.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9022
2009-01-22 13:44:03 +00:00
Tom Hughes
4ca0c5f735 Don't assume that all global variables are in the data section - we
now cope with variables in the text, data, sdata and bss sections.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9021
2009-01-22 13:40:12 +00:00
Tom Hughes
0e02b9ee5b Improve detection of where ELF sections have been mapped by taking
the ELF segment table into account when deciding on the mapping
between SVMA and AVMA for a section.

This also allows the BSS kludge to be dropped, as the BSS address is
now correctly determined.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9020
2009-01-22 13:24:06 +00:00
Julian Seward
f3523a4a0e Some minor format string fixes for gcc-3.3.3 (SuSE 9.1). Not sure why
later gccs don't complain about these.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9019
2009-01-22 12:24:26 +00:00
Julian Seward
d5b38a2b94 Don't hardwire @FLAG_M32@ in here, since this directory isn't arch
specific (and so the build fails eg on a 64 bit machine that does
not have a 32-bit toolchain installed).  Use $(AM_FLAG_M3264_PRI)
instead.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9018
2009-01-22 01:36:51 +00:00
Nicholas Nethercote
cace8b55cd - No longer using VG_ARCH_ALL to determine the DIST_SUBDIRS used for
arch/OS/platform-specific tool test dirs, instead writing it by hand.
  This is important because up until now if we had any arch-specific test
  dirs, we needed such dirs for all archs.  Now that we also have
  OS-specific and platform-specific test dirs, we don't want to have
  (mostly) empty dirs for every arch/OS/platform.

- Correspondingly, removed several empty directories under memcheck/tests/
  and cachegrind/tests that are no longer needed.

- Also removed VG_ARCH_ALL from configure.in.

- Also used an arch-specific guard rather than a platform-specific one where
  appropriate in cachegrind/tests/Makefile.am.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9017
2009-01-22 01:13:16 +00:00
Nicholas Nethercote
5cf0a9d64d Merge part of r8943 from the Darwin branch -- use VGA_* instead of VGP_* for
selecting the arch-specific tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9015
2009-01-21 22:52:39 +00:00
Nicholas Nethercote
5b6f9ec2d5 In AC_TRY_COMPILE, only include the function body, not the surrounding "int
main { ... }".



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9010
2009-01-21 22:25:50 +00:00
Nicholas Nethercote
3592735add Replace some 4-space indents with 3-space indents. Merged from DARWIN.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9009
2009-01-21 22:19:26 +00:00
Nicholas Nethercote
c5b04113b5 This should have been part of r9004.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9008
2009-01-21 04:11:13 +00:00
Nicholas Nethercote
c07262448b - Split up m_ume.c into m_ume/{main,elf,script}.c. This will make merging
the DARWIN branch easier later.
- Remove the disabled vgtest_ume test, it's very unlikely it'll ever work
  again.
- Move VG_(find_auxv) to initimg-linux.c, the only place it's used, and make
  it static.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9004
2009-01-21 02:26:56 +00:00
Nicholas Nethercote
74e8c02cea A couple more changes to fix the conditional building of DRD tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9002
2009-01-20 22:54:50 +00:00
Bart Van Assche
b10b90dd0d Added yet another output variant.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9001
2009-01-20 14:29:52 +00:00
Bart Van Assche
ce5fd5bf82 Added yet another output variant.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9000
2009-01-20 14:25:22 +00:00
Bart Van Assche
4e7dcd66bc Elaborated prereq clauses.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8999
2009-01-20 14:18:29 +00:00
Bart Van Assche
c50d8622b9 Made compilation of multiple tests conditional.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8998
2009-01-20 14:02:22 +00:00
Bart Van Assche
58f27818cb Added automake conditional HAVE_PTHREAD_MUTEX_TIMEDLOCK.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8997
2009-01-20 14:01:16 +00:00
Bart Van Assche
a20274fcb3 Only call pthread_rwlock_timedwrlock() or pthread_rwlock_timedrdlock() if supported.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8996
2009-01-20 13:57:50 +00:00
Bart Van Assche
df449fd0aa Added configure tests for optional POSIX threads functionality.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8995
2009-01-20 13:45:38 +00:00
Nicholas Nethercote
ffbb6cb7b0 Generate default.supp at compile-time, not configure-time.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8994
2009-01-20 06:56:26 +00:00
Nicholas Nethercote
47586fdeac The load addresses depend on the platform, not the architecture.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8992
2009-01-20 06:06:52 +00:00
Nicholas Nethercote
1822d48ebb VG_ARCH doesn't exist any more, use VG_ARCH_PRI in valgrind.pc.in.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8991
2009-01-20 06:06:20 +00:00
Nicholas Nethercote
a2fb3f5363 Make this file compile without warnings when the PERF_FAST_* macros are
disabled.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8987
2009-01-19 23:42:45 +00:00
Nicholas Nethercote
2047484bc5 Add a comment explaining this test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8984
2009-01-19 21:33:25 +00:00
Bart Van Assche
8ba5aa108b Removed superfluous dependency.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8983
2009-01-19 19:58:32 +00:00
Nicholas Nethercote
0051efda41 Create memcheck/tests/linux/ and move some Linux-specific tests
into it.  Partial merge from DARWIN branch, r8943.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8975
2009-01-19 03:44:19 +00:00
Nicholas Nethercote
53b147dfb8 Create memcheck/tests/x86-linux/ and move some platform-specific tests (the
scalar* ones) into it.  Partial merge from DARWIN branch, r8943.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8974
2009-01-19 03:16:59 +00:00
Nicholas Nethercote
4f4de457aa Merged r8966 (show scanning output during leak checking with -v) from DARWIN
branch. 



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8972
2009-01-19 00:43:34 +00:00
Bart Van Assche
78c4a2893b Make sure that sigalrm.c compiles correctly on systems that do not have the header file <asm/unistd.h>.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8969
2009-01-16 12:07:52 +00:00
Bart Van Assche
379b2040f9 Added configure test for the header file <asm/unistd.h>.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8968
2009-01-16 12:06:54 +00:00
Bart Van Assche
2dd0d7d87f Obtain current time through time() instead of through clock_gettime(CLOCK_REALTIME), such that this test compiles on systems that do not support CLOCK_REALTIME.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8967
2009-01-16 11:57:50 +00:00
Nicholas Nethercote
23accaf007 Remove an unnecessary #include that breaks the test on Darwin, and update
the expected output line numbers accordingly.  MERGED FROM DARWIN BRANCH.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8965
2009-01-16 07:04:26 +00:00
Nicholas Nethercote
5ad1dd61f9 Introduce a new type, PtrdiffT. Replace lots of uses of OffT (all those
that are memory offsets) with PtrdiffT;  OffT should only be used for file
sizes and offsets.

Change Off64T from a ULong to a Long, as it should be.  Replace some uses
of ULong in the address space manager with Off64T to match.

Also add a comment explaining the meanings of the basic types like Addr,
OffT, SizeT, etc.

Also fix the prototype for VG_(pread) -- the last arg is an OffT, not an
Int.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8959
2009-01-15 21:29:24 +00:00
Tom Hughes
7e17bfc956 The SG_GET_TIMEOUT ioctl doesn't write to memory - it returns the
timeout via it's return value.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8958
2009-01-15 08:49:09 +00:00
Tom Hughes
9b5365f10d The SG_GET_VERSION_NUM ioctl writes to memory rather than reading it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8957
2009-01-15 08:48:14 +00:00
Bart Van Assche
cb24e80c3d Compress the file passed as the third argument before attaching it to the outgoing e-mail.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8948
2009-01-13 09:22:19 +00:00
Bart Van Assche
06ee727a0e Added an additional expected output file.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8947
2009-01-13 08:22:05 +00:00
Bart Van Assche
9b07e92592 Runs now fine on systems for which PTHREAD_STACK_MIN > 32768.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8946
2009-01-13 08:18:59 +00:00
Bart Van Assche
db3b033855 Do not only intercept SIGILL during detection of the supported instruction set
on ppc but also SIGFPE. This patch should make instruction set detection work
on the PowerPC 440EPx.
Fixes bug #176926.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8945
2009-01-13 07:49:14 +00:00
Tom Hughes
6917b2e4e4 SSE3 and SSSE3 are two different things, so add a proper SSSE3 feature
test and use that to guard the SSSE3 tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8942
2009-01-12 15:26:59 +00:00