Commit Graph

11351 Commits

Author SHA1 Message Date
Philippe Waroquiers
015923fcef Fix 342221 - socket connect produce false positive saying access to uninitialized memory area
As we check what follows af_family, the length to check must be decreased
by sizeof(af_maily)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14835
2014-12-29 18:24:37 +00:00
Florian Krohm
5af4195103 Remove the type AddrH. The code assumes in many places that the host
and guest architecture are the same. So the type is really pointless
nowadays.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14834
2014-12-29 17:04:46 +00:00
Philippe Waroquiers
d1b502efef Fix 341539 VG_(describe_addr) should not describe address as belonging to client
segment if it is past the heap end

Describes specifically an address that is in the brk data segment
or in the 'reduced' (after brk reduction) section of the brk data segment.

Based on a patch from Ivo Raisr.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14833
2014-12-28 17:30:22 +00:00
Florian Krohm
1aa9a52c1c Avoid spurious warnings about white space following a backslash
in a line splice.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14832
2014-12-28 16:46:14 +00:00
Florian Krohm
cacbc41c45 Fix a few casts. A void * cannot be used to initialise a function pointer.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14831
2014-12-24 11:11:42 +00:00
Florian Krohm
8a6dc4665e Elimnate two magic constants.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14830
2014-12-23 11:05:21 +00:00
Philippe Waroquiers
993795602b Fix a typo, introduced when fixing a typo.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14829
2014-12-21 17:53:42 +00:00
Philippe Waroquiers
47014c3128 Fix typo
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14828
2014-12-21 17:46:11 +00:00
Philippe Waroquiers
b25c5ed14c Follow up to rev 14823: make errors when reporting command line non critical
(as e.g. cmdline reporting is not available on MacOS)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14827
2014-12-21 17:31:54 +00:00
Philippe Waroquiers
b08bb282f8 342063 wrong format specifier for test mcblocklistsearch in gdbserver_tests
Patch from Ivo Raisr.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14826
2014-12-21 17:02:38 +00:00
Florian Krohm
87dbf329ed Buffer audit. Resize some.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14825
2014-12-20 16:52:08 +00:00
Florian Krohm
ae89e282cc Buffer audit. Resize a few.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14824
2014-12-19 20:29:22 +00:00
Florian Krohm
1faad1a40c Fix a buffer overflow (in case read had returned 1000).
Write out the whole command line.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14823
2014-12-19 20:25:46 +00:00
Carl Love
6640cdc8e5 This commit fixes a redundant #if defined line. The define
VG_PLAT_USES_PPCTOC is only true for PPC64 big endian, do not
need to quailify the #if statement condition of VG_PLAT_USES_PPCTOC
with !VGP_ppc64le_linux.

There is no associated bugzilla.  The fix is in response to an
email message.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14822
2014-12-17 21:41:58 +00:00
Philippe Waroquiers
9bb6c68c09 Fix 341789 - aarch64: shmat fails with valgrind on ARMv8
arm64, like amd64, must not use VKI_IPC_64, even
if this symbol is defined.
This makes the shmctl fail, which results in a zero size returned,
which means that the succesful shmat is not reported to the aspacemgr.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14821
2014-12-17 20:39:55 +00:00
Florian Krohm
601ef384bb Remove two fixed-size buffers in the dwarf readers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14820
2014-12-17 19:52:25 +00:00
Florian Krohm
5734a854d5 Join two #ifdefs, eliminating one.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14819
2014-12-17 13:18:51 +00:00
Florian Krohm
9212b9dd6c For s390 use symbolic register names.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14818
2014-12-17 11:52:39 +00:00
Florian Krohm
569012f885 Avoid compiler warnings on s390x.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14817
2014-12-17 11:35:10 +00:00
Florian Krohm
7baf26617a Comment change. Function vg_panic does not exist.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14816
2014-12-17 11:01:40 +00:00
Philippe Waroquiers
70a8ef051c Fix 197259 Unsupported arch_prtctl PR_SET_GS option
(valgrind side).
In summary: we were counting somewhat on the luck for FS,
we now similarly count on luch for GS
See VEX commit log r3043 for more details.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14815
2014-12-17 00:00:11 +00:00
Florian Krohm
115f5cd399 Simplify the VG_(get_filename_linenum) interface by removing
the dirname_available parameter. It's redundant. The value
of the returned directory name can be tested instead.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14814
2014-12-16 20:55:58 +00:00
Florian Krohm
71443eff49 Add a clarifying comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14813
2014-12-16 12:04:03 +00:00
Florian Krohm
070cd92b3b Remove duplicate command line option.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14812
2014-12-16 08:12:02 +00:00
Florian Krohm
464b3b318c Update tracking the file removal in VEX r3042.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14811
2014-12-15 21:56:00 +00:00
Florian Krohm
73c5378615 Remove callgrind's percentify and commify functions as well as the
assorted buffers that go with them.
Part of fixing BZ #337869.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14810
2014-12-14 15:39:57 +00:00
Florian Krohm
d0118f7bb9 Enhance the "Author" section of the manpage as suggested
in BZ #226609.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14809
2014-12-13 18:55:35 +00:00
Florian Krohm
48c0ff5c76 Fix BZ #116002.
Left justification of strings in myvprintf_str was mixed up.
Now fixed and %s formats changed accordingly.
In function myvprintf_int64: the local buffer was not large
enough to hold ULONG_MAX in binary notation. Numbers were
truncated at 39 digits. 
Testcases added.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14808
2014-12-13 18:35:00 +00:00
Philippe Waroquiers
fa26e45f97 reach_thread_register cannot be compiled on Mac OS as Mac OS
had no pthread barrier.
(the Makefile.am protects this with a if HAVE_PTHREAD_BARRIER)
But the test should then be protected with a prereq that the
executable exists.
(analysis and fix suggestion by rhyskidd, part of fixing 341613)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14807
2014-12-13 16:36:12 +00:00
Florian Krohm
f7c5c06c5d Add limited support for printing floating point numbers to
VG_(debugLog_vprintf). 
Remove function VG_(percentify) and fix up its call sites (part of
fixing BZ #337869.
Allow the width in a format specification to be '*', i.e. the width is
given as an additional function argument.

The limitations for printing floating point numbers are:
(1) %f is the only supported format. Width and precision can be
    specified.
(2) Funny numbers (NaN and such) are not supported.
(3) Floating point numbers need to be benign in the sense that their
    integral part fits into an ULong.
This is good enough for our purposes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14806
2014-12-12 19:32:10 +00:00
Florian Krohm
5ea4e32525 Update detection of tool-chain support for MPX insns
to better work for older assemblers.
Pertains to BZ #339542.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14805
2014-12-12 17:44:36 +00:00
Julian Seward
b0ab552f48 Update expected output for none/tests/darwin/access_extended.
Fixes #341615.  (Rhys Kidd, rhyskidd@gmail.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14804
2014-12-09 22:25:47 +00:00
Florian Krohm
64498c9e9b Detect presence of sse3 instructions on x86.
Set VEX_HWCAPS_X86_SSE3 accordingly.
This came about by grepping the source for VEX_HWCAPS_X86_SSE3
and observing that the flag was tested for (in VEX) but not set.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14803
2014-12-09 20:08:46 +00:00
Florian Krohm
d2039281b3 Announce, that the long displacement facility is noq required for s390x.
Update minimum machine model. See also VEX r3034.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14802
2014-12-08 14:03:00 +00:00
Florian Krohm
d80a701916 Remove fixed size arrays in the dwarf-3 parser.
Use proper initialisation functions for the type and variable parser.
Add functions to release the dynamically allocated functions.
No longer maintain content of popped-off stack entries as that is
essentially freed memory and complicates matters unnecessarily.
Part of fixing BZ #337869.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14801
2014-12-07 18:58:59 +00:00
Florian Krohm
572a96384c Eliminate fixed size buffer 'the_CIEs' and allocate it dynamically.
Part of fixing BZ #337869.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14800
2014-12-06 21:58:50 +00:00
Florian Krohm
c57a92dda4 Update test result following VEX r3029.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14799
2014-12-05 18:29:38 +00:00
Florian Krohm
f38d96dd61 Add -Wformat -Wformat-security to the list of compile flags.
This was not as straight forward as expected. Specifically, adding the
new flag to CFLAGS in configure.ac did not work and was causing
compiler warnings. For instance, compiling memcheck/tests/execve2.c will
generate a -Wnonnull warning even though the testcase is explicitly
compiled with -Wno-nonnull. The reason is that (a) -Wformat is implied by
-Wnonnull and (b) the list of compiler flags gets assembled in the wrong
order. The culprit appears to be that we modify CFLAGS in configure.ac and
that really is not the right place. Conceptually, configure should determine
tool-chain capabilities and not assemble compiler flags. That should be done
in Makefiles. This patch entangles all this.

So, whatever was added to CFLAGS in configure.ac has now been moved to
Makefile.all.am and Makefile.tool-tests.am. Those are:
-Wno-long-long
-Wwrite-strings
-Wcast-qual
-fno-stack-protector
Note, that this change allows us to simplify Makefile.tool-tests.am which
in the past was disabling some of those flags (e.g. by adding -Wno-cast-qual
again).
In case of the clang compiler, extra command line options are needed. I've
moved those into a separate 'if COMPILER_IS_CLANG' section and not merge
them into baseline flags.

Related to BZ 334727.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14798
2014-12-03 22:53:00 +00:00
Florian Krohm
d7811e3de7 Add script. Comes in handy when messing with the build system
to make sure no compiler flags get lost (as they did at some
point in the past).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14797
2014-12-03 22:48:29 +00:00
Florian Krohm
f1fde81e7d Fix a few VG_(message) invocations. The function does not add a
newline character under the covers.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14796
2014-11-29 17:50:10 +00:00
Florian Krohm
69d42e3d4b Fix BZ 334802. Patch by Mark Wielaard with a few mods to make it apply.
r14794 is related as well.
Also: remove -Wno-format-zero-length from compile options.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14795
2014-11-29 14:41:32 +00:00
Florian Krohm
2ad0d731f9 Fix up the error processing in VG_(expand_file_name). E.g. giving
--log-file=  on the command line results in the following error:

valgrind: --log-file: filename is emptyBad option: --log-file=
...

Relatedly, fix the 1st argument to VG_(expand_file_name) in coredump-elf.c.
This should not contain additional verbiage as it is assumed to be an option
name which us used to construct an error message containing
option_name=file_name

As an aside, this logic in coredump-elf.c seems odd:
If VG_(clo_log_fname_expanded) is not NULL, then it has already been
expanded in main_process_cmd_line_options. Expanding it again would only
make a difference, if the original logfile name contained an environment 
variable whose value contained %q{whatever} thereby referring to a yet
another environment variable. That seems strange.
But I'm not touching it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14794
2014-11-29 13:31:18 +00:00
Florian Krohm
dda3f0adf9 Add an early-clobber constraint. Otherwise, it will segfault when compiled
with gcc 4.9.2


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14793
2014-11-28 12:42:39 +00:00
Petar Jovanovic
65c74e8e8a mips64: add test cases for Cavium BBIT032 and BBIT132
This is a follow up to VEX r3028. This change adds two test cases
for Cavium instructions BBIT032 and BBIT132.

Issue tracked in BZ #339288.

Patch by Maran Pakkirisamy.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14792
2014-11-26 23:50:31 +00:00
Mark Wielaard
3129007b9a Bug 341238. Recognize GCC5/DWARFv5 DW_LANG constants Go, C11, C++11, C++14.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14791
2014-11-26 15:43:14 +00:00
Bart Van Assche
99a8d401fc drd: Add a consistency check
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14790
2014-11-26 12:47:19 +00:00
Julian Seward
1b244c0a22 Add a file tracking the 3.10.x merge status.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14789
2014-11-25 23:19:24 +00:00
Julian Seward
1c2adfab29 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14788
2014-11-25 23:18:54 +00:00
Julian Seward
05ac9a07b9 Add test cases for RORV x_x_x, w_w_w.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14784
2014-11-25 17:27:50 +00:00
Julian Seward
dd0e38662c Add test cases for CLS x_x, w_w.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14783
2014-11-25 15:51:31 +00:00