Julian Seward [Thu, 5 Feb 2015 12:59:46 +0000 (12:59 +0000)]
Allow the user to specify precise-exception behaviour for translations
made from file-backed mappings (AOT code, basically) that is different
from the default behaviour as specified by --vex-iropt-register-updates.
New flag is --px-file-backed=, with the same possible args as
--vex-iropt-register-updates has.
Add a new flag --px-default, which is a short alias for
--vex-iropt-register-updates.
Add one line of stats output when --stats=yes, showing counts of how
many translations have been made under each of the 4 different PX
optimisation settings.
No user-visible change if you don't use the new flags.
Julian Seward [Thu, 5 Feb 2015 10:05:43 +0000 (10:05 +0000)]
Fix some inconsistent uses of the VG_XACT_CLO macro, by putting an
empty then-body after the condition rather than merely ";", which is
confusing and is inconsistent with the rest of the arg handling code.
No functional change.
Florian Krohm [Sat, 31 Jan 2015 00:29:50 +0000 (00:29 +0000)]
Replace the SegName array with a simple string table.
The validity of this change follows from the following observations:
(1) There is a single source for allocating and storing segment names,
namely allocate_segname.
(2) For all invocations of allocate_segname the returned value (which
represents the segmant name) is assigned to NSegment::fnIdx.
(3) All but one assignments to NSegment::fnIdx assign allocate_segname.
The single exception assigns -1 in init_nsegment. That function is
called whenever a new segment (named or unnamed) is allocated.
For a segment name to become unused there must be an assignment to
NSegment::fnIdx which was previously assigned a return value from
allocate_segname. There is no such assignment.
It follows that all segment names are in use at all times, hence
SegName::inUse == True for all SegNames. So we can constant fold it
and don't need to represent it.
Pass 3 in preen_nsegments is obsolete as there are no segment names to
garbage collect.
Rhys Kidd [Mon, 26 Jan 2015 03:27:01 +0000 (03:27 +0000)]
Partial fix for bz339745. Mac OS: Further progress worker queue thread support. Additional magic constants have been checked against OS X 10.9 and 10.10
Florian Krohm [Sat, 24 Jan 2015 18:26:05 +0000 (18:26 +0000)]
Followup to r14886. So it turned out that in m_addrinfo we were already
strduping the filename which I failed to spot. Thanks to Philippe for
pointing that out.
Florian Krohm [Sat, 24 Jan 2015 00:02:19 +0000 (00:02 +0000)]
VG_(am_get_filename) returns a pointer to memory that belongs to the
address space manager. Callers should neither modify the string nor
free it (as the string resides is statically allocated memory). That
calls for a const HChar *
The type change exposed two bugs. One in m_addrinfo.c and one in
m_debuginfo.c. In both cases the returned string could possibly be freed later
on. So we need to strdup it first. Now fixed.
Florian Krohm [Tue, 13 Jan 2015 17:33:59 +0000 (17:33 +0000)]
Export VG_(discard_tranalsations_safely) to the tools. It is
only allowed to be called in certain contexts which is
enforced at runtime.
Change callgrind accordingly.
New header file pub_tool_transtab.h added.
Rhys Kidd [Mon, 12 Jan 2015 13:29:29 +0000 (13:29 +0000)]
Add to svn ignore auxprogs/getoff-*-darwin files created on OS X. The equivalent files are ignored from other architectures in this folder. Simple change, no-BZ.
Rhys Kidd [Sun, 11 Jan 2015 07:04:20 +0000 (07:04 +0000)]
Add to svn ignore gdbserver_tests/*.dSYM intermediate files created on OS X. These files are ignored in all other sub folders where created. Simple change, no-BZ.
Rhys Kidd [Fri, 9 Jan 2015 15:41:15 +0000 (15:41 +0000)]
Darwin13.supp should include suppression for known uninitialised read in pthread_rwlock_init() as required to pass the memcheck/tests/darwin/pth-supp test. Patch and discussion per BZ #339780.
When the info struct for a BB is created, we use the first guest
instruction address as key to insert the info into a hash table.
We should do the same when discarding.
This actually is not a real problem, as Callgrind obviously
is used very rarely with redirections. But we should be consistent
with cachegrind.
Florian Krohm [Wed, 7 Jan 2015 14:47:15 +0000 (14:47 +0000)]
When creating a log-file (xml or otherwise) give everybody
read permission. Previously, only user could read which was
incovenient for some typical workflows.
Suggested in BZ #339542.
Florian Krohm [Wed, 7 Jan 2015 14:42:11 +0000 (14:42 +0000)]
Add command line option --max-connect=INT to allow the user to provide
an upper bound for the number of connected processes.
Part of fixing BZ #337869.
Florian Krohm [Sun, 4 Jan 2015 11:30:11 +0000 (11:30 +0000)]
TyEnt::TyStOrUn::fieldRs is never NULL as VG_(newXA) always returns
something != NULL. Testing fieldRs for NULL-ness was confusing static
analysis. It usually takes such tests as evidence that the pointer
can in fact be NULL and may report false positives as a consequence.
Florian Krohm [Mon, 29 Dec 2014 22:07:35 +0000 (22:07 +0000)]
Add a command line option to allow the user to provide an upper bound
for the number of connected processes. This is still lame but better
than asking her to recompile.
Part of fixing BZ #337869.
Carl Love [Wed, 17 Dec 2014 21:41:58 +0000 (21:41 +0000)]
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.
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.
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.
Florian Krohm [Tue, 16 Dec 2014 20:55:58 +0000 (20:55 +0000)]
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.
Florian Krohm [Sat, 13 Dec 2014 18:35:00 +0000 (18:35 +0000)]
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.
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)
Florian Krohm [Fri, 12 Dec 2014 19:32:10 +0000 (19:32 +0000)]
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.
Florian Krohm [Tue, 9 Dec 2014 20:08:46 +0000 (20:08 +0000)]
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.