35 Commits

Author SHA1 Message Date
Paul Floyd
7774acbc9c FreeBSD support, patch 3
include directory
New FreeBSD specific headers
SONAMES for FreeBSD libraries
2021-10-06 21:24:17 +02:00
Mark Wielaard
461cc5c003 Cleanup GPL header address notices by using http://www.gnu.org/licenses/
Sync VEX/LICENSE.GPL with top-level COPYING file. We used 3 different
addresses for writing to the FSF to receive a copy of the GPL. Replace
all different variants with an URL <http://www.gnu.org/licenses/>.

The following files might still have some slightly different (L)GPL
copyright notice because they were derived from other programs:

- files under coregrind/m_demangle which come from libiberty:
  cplus-dem.c, d-demangle.c, demangle.h, rust-demangle.c,
  safe-ctype.c and safe-ctype.h
- coregrind/m_demangle/dyn-string.[hc] derived from GCC.
- coregrind/m_demangle/ansidecl.h derived from glibc.
- VEX files for FMA detived from glibc:
  host_generic_maddf.h and host_generic_maddf.c
- files under coregrin/m_debuginfo derived from LZO:
  lzoconf.h, lzodefs.h, minilzo-inl.c and minilzo.h
- files under coregrind/m_gdbserver detived from GDB:
  gdb/signals.h, inferiors.c, regcache.c, regcache.h,
  regdef.h, remote-utils.c, server.c, server.h, signals.c,
  target.c, target.h and utils.c

Plus the following test files:

- none/tests/ppc32/testVMX.c derived from testVMX.
- ppc tests derived from QEMU: jm-insns.c, ppc64_helpers.h
  and test_isa_3_0.c
- tests derived from bzip2 (with embedded GPL text in code):
  hackedbz2.c, origin5-bz2.c, varinfo6.c
- tests detived from glibc: str_tester.c, pth_atfork1.c
- test detived from GCC libgomp: tc17_sembar.c
- performance tests derived from bzip2 or tinycc (with embedded GPL
  text in code): bz2.c, test_input_for_tinycc.c and tinycc.c
2019-05-26 20:07:51 +02:00
Ivo Raisr
38edd50c0e Update copyright end year to 2017 in preparation for 3.13 release.
n-i-bz



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16333
2017-05-04 15:09:39 +00:00
Julian Seward
adc2dafee9 Update copyright dates, to include 2015. No functional change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15577
2015-08-21 11:32:26 +00:00
Florian Krohm
b804dd161f Fix a comment. Do not enumerate segment kinds as all segments
have an extent ... including SkShmC segments.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15278
2015-05-22 15:14:04 +00:00
Florian Krohm
00ffec50e5 Pass in a mask of segment kinds to VG_(get_segment_starts)
and VG_(am_get_segment_starts) to indicate which segments
should be collected. That should solve the following problem:
in m_main.c we used to:

      seg_starts = VG_(get_segment_starts)( &n_seg_starts );

      for (i = 0; i < n_seg_starts; i++) {
         Word j, n;
         NSegment const* seg 
            = VG_(am_find_nsegment)( seg_starts[i] );
         vg_assert(seg);
         if (seg->kind == SkFileC || seg->kind == SkAnonC) {

         ...
         // ... dynamic memory allocation for valgrind
         ...
      }

This caused the vassert(seg) to fire because the dynamic memory
allocation further down the loop changed segments such that a 
valgrind segment which used to be non-SkFree suddenly became 
SkFree and hence VG_(am_find_nsegment) returned NULL. Whoom.

With this revision we only collect the segments we're really
interested in. For the example above that is all client segments.
So if V allocates memory -- fine. That will not change the layout
of client segments.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14949
2015-02-20 14:00:23 +00:00
Florian Krohm
798e5a7707 Translations are allowed from all client segments. Update comments
and rename VG_(am_set_segment_hasT_if_SkFileC_or_SkAnonC) to 
VG_(am_set_segment_hasT_if_client_segment). Change it so it handles
all client segments.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14936
2015-02-16 22:58:30 +00:00
Florian Krohm
7f6f4f0a01 Update a few comments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14935
2015-02-16 22:29:03 +00:00
Florian Krohm
aa74d46212 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.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14898
2015-01-31 00:29:50 +00:00
Florian Krohm
cb3b3b58b1 Remove unused field from NSegment structure.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14891
2015-01-27 20:46:19 +00:00
Florian Krohm
e70cb7b851 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.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14886
2015-01-24 00:02:19 +00:00
Florian Krohm
cc4ea69830 Move comments next to the function prototypes they describe.
No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14885
2015-01-23 19:55:31 +00:00
Julian Seward
dbf9b63605 Update copyright dates (20XY-2012 ==> 20XY-2013)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658
2013-10-18 14:27:36 +00:00
Florian Krohm
a6c7a2893c Fix coregrind header files such that they can be included without
having to worry what other header files may have to be included
beforehand.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13549
2013-09-15 13:54:34 +00:00
Julian Seward
4a3633e266 Update copyright dates to include 2012.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843
2012-08-05 15:46:46 +00:00
Julian Seward
c96096ab24 Update all copyright dates, from 20xy-2010 to 20xy-2011.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206
2011-10-23 07:32:08 +00:00
Julian Seward
9b0574dff8 Update copyright dates to 2010.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121
2010-05-03 21:37:12 +00:00
Nicholas Nethercote
2001629c3f Updated copyright years.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344
2009-03-10 22:02:09 +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
Julian Seward
811f102388 The address space manager, and in particular the NSegment type,
hardwire the assumption that an inode number is a UWord, that is, a
host word.  There's no reason for that assumption to be valid; an
inode number could be a 64-bit int even on a 32 bit platform (eg w.r.t
sys_stat64).  This commit changes inode numbers and, for good measure,
dev numbers, to be 64-bit regardless.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8521
2008-08-18 21:47:11 +00:00
Julian Seward
5679a22410 Update copyright dates ("200X-2007" --> "200X-2008").
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398
2008-02-11 11:34:59 +00:00
Tom Hughes
4ad22500c0 Made the argument to VG_(am_get_filename) const as it doesn't need
to be modified and the routine to find the segment for an address now
returns a const pointer.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7325
2008-01-08 16:48:30 +00:00
Julian Seward
172505c978 Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488
2007-01-08 06:01:59 +00:00
Julian Seward
8883c3c066 Merge r6119:
Changes to this interface to facilitate actions needed by AIX5.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6258
2006-10-17 01:30:07 +00:00
Julian Seward
ad67fd79fe Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954
2006-06-05 23:21:15 +00:00
Nicholas Nethercote
991367c922 Merge in the COMPVBITS branch to the trunk. This is a big change to
Memcheck, replacing the 9-bits-per-byte shadow memory representation to a
2-bits-per-byte representation (with possibly a little more on the side) by
taking advantage of the fact that extremely few memory bytes are partially
defined.

For the SPEC2k benchmarks with "test" inputs, this speeds up Memcheck by a
(geometric mean) factor of 1.20, and reduces the size of shadow memory by a
(geometric mean) factor of 4.26.

At the same time, Addrcheck is removed.  It hadn't worked for quite some
time, and with these improvements in Memcheck its raisons-d'etre have
shrivelled so much that it's not worth the effort to keep around.  Hooray!

Nb: this code hasn't been tested on PPC.  If things go wrong, look first in
the fast stack-handling functions (eg. mc_new_mem_stack_160,
MC_(helperc_MAKE_STACK_UNINIT)).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5791
2006-03-27 11:37:07 +00:00
Tom Hughes
e9b07e443e Move VG_(am_get_filename) to the tool accessible aspacemgr header file.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5141
2005-11-16 00:11:14 +00:00
Tom Hughes
48f8c22e44 Get core dumping working again - the architecture specific code that
was in the sigframe module has been moved into the coredump module 
where it belongs and things fixed up to compiler again.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4970
2005-10-31 17:05:21 +00:00
Tom Hughes
65bd3eb367 Create a new SkShmC segment type for shared memory segments so that we
can ensure they are never merged with adjacent segments. This makes
sure that we can find the right piece of memory to release when the
shmdt system call occurs.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4854
2005-10-04 15:59:54 +00:00
Julian Seward
cc8ccbbfb4 This commit merges in changes from branches/ASPACEM (specifically,
changes from r4341 through r4787 inclusive).  That branch is now dead.
Please do not commit anything else to it.

For the most part the merge was not troublesome.  The main areas of
uncertainty are:

- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
  and include it in a couple of places.  Building etc seems to still
  work, but I haven't tried building the documentation.

- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
  stuff was moved from -generic to -linux after the branch was created.
  I think that is satisfactorily glued back together now.

- Regtests: although this appears to work, no .out files appear, which
  is strange, and makes it hard to diagnose regtest failures.  In
  particular memcheck/tests/x86/scalar.stderr.exp remains in a 
  conflicted state.

- amd64 is broken (slightly), and ppc32 will be unbuildable.  I'll
  attend to the former shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789
2005-09-27 19:20:21 +00:00
Nicholas Nethercote
63bf761416 Moved the mman VG_(*_native)() functions into m_aspacemgr, and removed
the unused init_shadow_page() function.  As a result, m_aspacemgr no longer
depends on m_libcmman, breaking a circular module dependency, good!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4015
2005-06-24 22:17:38 +00:00
Nicholas Nethercote
8220768b9f Tweaked m_tooliface to reduce its dependencies on other things:
- VG_(sanity_check_needs)() now returns a message to m_main if it fails, 
  for m_main to print and abort, rather than printing an error message and
  aborting itself.  This removes the dependency on m_libcprint and
  m_libcassert.

- Passing in an extra param to VG_(sanity_check_needs)() that says if
  shadow memory has been allocated, rather than using
  VG_(get_shadow_size)().  This removes the dependency on m_aspacemgr.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3978
2005-06-21 01:54:38 +00:00
Nicholas Nethercote
0a3457c592 Add some missing "_H" suffixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3942
2005-06-18 18:49:40 +00:00
Nicholas Nethercote
fbf54ace13 Renamed VG_(mark_from_registers) to the more general
VG_(apply_to_GP_regs).  Moved it into m_machine.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3919
2005-06-17 03:06:27 +00:00
Nicholas Nethercote
3ae647fa4e Move some decls out of tool.h into the new file pub_tool_aspacemgr.h.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3885
2005-06-11 04:58:29 +00:00