61 Commits

Author SHA1 Message Date
Bart Van Assche
01f01fd910 drd: Update copyright notices 2020-10-10 18:11:31 -07: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
246bb0e25f Remove TileGX/Linux port.
Fixes BZ#379504.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16340
2017-05-08 17:21:59 +00:00
Ivo Raisr
d8f648486e Fix some spelling mistakes.
Fixes BZ#374719
Patch by: klemens <ka7@la-evento.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16336
2017-05-05 22:13:20 +00: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
Philippe Waroquiers
f2e1687cb8 Fix misplaced closing parenthesis in various VG_(....) calls
At many places, we have:
   VG_(fun(a,b,c))
instead of
   VG_(fun)(a,b,c)
So, fix these cases, found using:
grep -n -i -e 'VG_([a-z][a-z0-9_]*[^a-z0-9_)]' *.c */*.c */*/*.c



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15776
2016-01-27 22:35:14 +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
Julian Seward
ac60633d65 Bug 345248 - add support for Solaris OS in valgrind
Authors of this port:
    Petr Pavlu         setup@dagobah.cz
    Ivo Raisr          ivosh@ivosh.net
    Theo Schlossnagle  theo@omniti.com
            


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15426
2015-07-21 14:44:28 +00:00
Julian Seward
082f9298a1 Add a port to Linux/TileGx. Zhi-Gang Liu (zliu@tilera.com)
Valgrind aspects, to match vex r3124.

See bug 339778 - Linux/TileGx platform support to Valgrind



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15080
2015-04-10 12:30:09 +00:00
Florian Krohm
cd357d71b4 Merge six easy pieces from the BUF_REMOVAL branch:
r14271  Audit a few buffer sizes, increase one.
r14280  Audit buffer size.
r14296  Remove a few unneeded header files.
r14310  Replace fixed size buffers with a large enough buffers.
r14338  Remove a dead assignment in print_bbcs and make global variable
        print_fd a local variable.
r14359  Remove a benign macro redefinition in cachegrind.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14595
2014-09-30 22:15:05 +00:00
Bart Van Assche
6d68e47b19 drd: Ignore ordering introduced by a mutex used in the thread creation wrapper
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14015
2014-06-09 09:19:26 +00:00
Bart Van Assche
f879a52027 drd: Add semaphore annotations (#333072)
This is a slightly modified version of a patch from Ivo Raisr <ivosh@ivosh.net>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13984
2014-05-18 19:32:26 +00:00
Bart Van Assche
0c4bf8499e drd: Add post-rwlock_init and pre-rwlock_destroy client requests (#332265)
From: Ivo Raisr <ivosh@ivosh.net>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13882
2014-03-19 18:48:01 +00:00
Philippe Waroquiers
af36bdd9af Fix drd assert failure for monitor cmd execution when all threads blocked in syscall
When all threads are blocked in a syscall, DRD_(thread_get_running_tid)()
returns (or can return?) a "valid" DrdThreadId (probably the last one
that was running ?).
However, in such a situation, VG_(get_running_tid)() returns 0 (as effectively
there is no thread running).

This discrepancy (drd_tid "valid" and "vg_tid" invalid) can (probably) only
happen with gdb monitor commands, as a thread can (normally) execute a
client request only when it is running.

However, vgdb can "force" the invocation of the gdb monitor client request,
even if no thread is running.
In such a case, the assert should not verify that drd_tid and vg_tid are
consistent.

To reproduce the problem:
  ./vg-in-place --tool=drd sleep 60
and in another window:
  ./coregrind/vgdb help
which then gives
  ...
  drd: drd_clientreq.c:84 (handle_client_request): Assertion 'DRD_(VgThreadIdToDrdThreadId)(vg_tid) == drd_tid' failed.
  ==4208==    at 0x3801DE1D: report_and_quit (m_libcassert.c:260)
  ==4208==    by 0x3801E034: vgPlain_assert_fail (m_libcassert.c:340)
  ==4208==    by 0x380026CC: handle_client_request (drd_clientreq.c:84)
  ==4208==    by 0x3806EE8F: handle_gdb_monitor_command (server.c:490)
  ==4208==    by 0x3806F07A: handle_query (server.c:580)
  ==4208==    by 0x3806FDB2: server_main (server.c:915)
  ==4208==    by 0x3806B01C: call_gdbserver (m_gdbserver.c:706)
  ==4208==    by 0x3806B8F2: vgPlain_invoke_gdbserver (m_gdbserver.c:892)
  ...




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13765
2013-12-21 16:57:26 +00:00
Bart Van Assche
0dabd6dfd3 drd: Update copyright notice
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13613
2013-10-04 05:55:30 +00:00
Petar Jovanovic
5dd4c02e39 mips: adding MIPS64LE support to Valgrind
Necessary changes to Valgrind to support MIPS64LE on Linux.
Minor cleanup/style changes embedded in the patch as well.
The change corresponds to r2687 in VEX.
Patch written by Dejan Jevtic and Petar Jovanovic.

More information about this issue:
https://bugs.kde.org/show_bug.cgi?id=313267


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13292
2013-02-27 23:17:33 +00:00
Bart Van Assche
7b1a5978c9 drd: Handle pthread_cond_destroy() failure properly
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13198
2012-12-24 10:22:14 +00:00
Florian Krohm
d0aa69c331 Fix more Char/HChar mixups. Closing in...
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13119
2012-11-10 22:29:54 +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
3e344c57f6 Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mips-valgrind@rt-rk.com, Bug 270777.

Valgrind: changes to existing files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12616
2012-06-07 09:13:21 +00:00
Bart Van Assche
509b7a03ab drd: Add command-line option --ptrace-addr.
This command-line option has been used to track down the recently fixed race in
drd/drd_pthread_intercepts.c.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12354
2012-01-24 18:39:29 +00:00
Bart Van Assche
12ec9d298a Remove emacs modeline and/or local variables from DRD source files
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12279
2011-12-04 15:54:19 +00:00
Bart Van Assche
9df672f236 Add VALGRIND_RESIZEINPLACE_BLOCK() and hence close #267819.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11666
2011-03-25 20:07:25 +00:00
Bart Van Assche
e53eb1ec0c Updated modeline and copyright statement in DRD source files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11642
2011-03-13 12:02:44 +00:00
Bart Van Assche
40ece8a806 DRD: Report an error if --free-is-write=yes is used on a program invoking custom memory allocator client requests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11640
2011-03-13 09:08:10 +00:00
Bart Van Assche
3ced345153 DRD: Always invoke VG_(cli_free)() before the stop_using_mem callback.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11633
2011-03-12 12:43:39 +00:00
Bart Van Assche
8c2ede1182 DRD: Report an error if an invalid argument is passed to pthread_detach(). Do not assume that pthread_detach() returns an error code if its argument is invalid. Should fix #267968.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11614
2011-03-09 17:53:28 +00:00
Bart Van Assche
ad86d78a6c E-mail address update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11420
2010-10-10 18:07:31 +00:00
Bart Van Assche
89a212b4e4 DRD does now recognize Helgrind's start/stop tracking client requests too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11306
2010-08-29 16:20:54 +00:00
Bart Van Assche
ebc0c2cb88 Handle statically initialized condition variables properly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11139
2010-05-29 18:43:21 +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
Bart Van Assche
d14798e66e Resynchronized client requests with the latest version of TSan's header file
<dynamic_annotations.h>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11096
2010-03-21 17:28:10 +00:00
Bart Van Assche
ab4f4b241f Removed ANNOTATE_HAPPENS_DONE() again.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11085
2010-03-08 18:41:38 +00:00
Bart Van Assche
e5f5573f88 Changes:
- Generalized the behavior of happens-before / happens-after annotations such
  that not only 1:1 but also n:m patterns are supported.
- Dropped support for invoking happens-before / happens-after annotations on
  POSIX condition variables (pthread_cond_t).
- Report the details about the offending synchronization object in generic
  errors.
- Converted a few tl_assert() statements into error messages.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11073
2010-03-07 10:54:21 +00:00
Bart Van Assche
d0bb010178 Removed trailing whitespace in C source and header files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11052
2010-02-21 14:52:59 +00:00
Bart Van Assche
80fdc5a9e9 - Made the ANNOTATE_RWLOCK_*() macros binary compatible with Helgrind.
- Added two additional regression tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10819
2009-08-15 10:50:35 +00:00
Bart Van Assche
fd574c0b25 Report an error message instead of triggering an assertion failure when a non-existing thread ID is passed to pthread_join() or pthread_cancel().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10674
2009-07-31 08:26:17 +00:00
Bart Van Assche
a0f1a0b56f Removed code that has been commented out recently.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10606
2009-07-26 08:48:49 +00:00
Bart Van Assche
6529f12189 Replaced code for suppressing the stack memory in use at the time a
thread is being created by code for suppressing the memory allocated
from inside the pthread_create() call. The new implementation should be
a more portable solution for suppressing data races triggered by the
thread-local-storage implementation of a Pthreads library.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10584
2009-07-24 08:20:10 +00:00
Bart Van Assche
e2f8abc15d Added support for sem_open() and sem_close().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10560
2009-07-23 16:31:39 +00:00
Bart Van Assche
c49fd480a1 Made debugging output for the code that computes the highest used stack address more detailed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10506
2009-07-21 15:13:03 +00:00
Bart Van Assche
511096144e DRD no longer prints the thread ID's assigned by the Valgrind core but only those assigned by DRD itself.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10488
2009-07-19 17:53:56 +00:00
Bart Van Assche
85a0aea8c7 Updated ANNOTATE_*() macro's as discussed on the valgrind-developers mailing list. Merged drt/unittest r1007:1014. Updated to do list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10220
2009-06-03 08:11:02 +00:00
Bart Van Assche
e73284e37f - Added support for most of the ANNOTATE_...() macro's supported by
ThreadSanitizer.                                                              
- Modified DRD's error reporting code such that it does no longer let           
  the Valgrind core print the Valgrind thread ID but that it now prints         
  the DRD thread ID and name. Updated expected output files where               
  necessary.                                                                    
- Modified drd/test/Makefile.am such that the tests using gcc's built-in        
  functions for atomic memory access such that these are only compiled when     
  the gcc version in use supports these built-in functions.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10186
2009-05-31 18:53:54 +00:00
Bart Van Assche
aa99c54309 Simplified client request handling.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9713
2009-05-02 08:06:53 +00:00
Bart Van Assche
77ab93d6f2 Added support for the VG_USERREQ__MALLOCLIKE_BLOCK and VG_USERREQ__FREELIKE_BLOCK client requests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9712
2009-05-01 12:23:47 +00:00
Bart Van Assche
219e77b9bc - Reindented code such that it uses three spaces for indentation instead
of two. The indentation of the DRD source code is now consistent with
  the other Valgrind source files.
- Added emacs mode line with indentation settings.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9496
2009-03-26 19:07:15 +00:00
Bart Van Assche
35dcaa5dbd Removed cross-tool dependency on helgrind/helgrind.h.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9361
2009-03-11 18:51:22 +00:00
Bart Van Assche
d9d43c3032 Added support for the VG_USERREQ__HG_CLEAN_MEMORY client request.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9340
2009-03-10 09:26:07 +00:00
Bart Van Assche
aaef6d016e Changes:
- pthread_barrier_wait() intercept now passes the information to the DRD
  tool whether or not this function returned
  PTHREAD_BARRIER_SERIAL_THREAD. This information is now displayed when
  the command-line option --trace-barrier=yes has been specified.
- Changed the cleanup functions for client objects that are called just
  before a thread stops into callback functions.
- Added DRD_(clientobj_delete_thread)().
- Removed DRD_(clientobj_resetiter)(void) and DRD_(clientobj_next)().
- Added test for race conditions between pthread_barrier_wait() and
  pthread_barrier_destroy() calls. An error message is now printed if
  this condition has been detected.
- Bug fix: pthread_barrier_delete() calls on barriers being waited upon
  are now reported.
- Removed DRD_() wrapper from around the name of some static variables and
  functions.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9211
2009-02-21 15:27:04 +00:00