njn | 3e88418 | 2003-04-15 13:03:23 +0000 | [diff] [blame] | 1 | |
| 2 | /*--------------------------------------------------------------------*/ |
| 3 | /*--- Replacements for strcpy(), memcpy() et al, which run on the ---*/ |
| 4 | /*--- simulated CPU. ---*/ |
njn | 1d0825f | 2006-03-27 11:37:07 +0000 | [diff] [blame] | 5 | /*--- mc_replace_strmem.c ---*/ |
njn | 3e88418 | 2003-04-15 13:03:23 +0000 | [diff] [blame] | 6 | /*--------------------------------------------------------------------*/ |
| 7 | |
| 8 | /* |
nethercote | 137bc55 | 2003-11-14 17:47:54 +0000 | [diff] [blame] | 9 | This file is part of MemCheck, a heavyweight Valgrind tool for |
njn | 0e1b514 | 2003-04-15 14:58:06 +0000 | [diff] [blame] | 10 | detecting memory errors. |
njn | 3e88418 | 2003-04-15 13:03:23 +0000 | [diff] [blame] | 11 | |
Elliott Hughes | ed39800 | 2017-06-21 14:41:24 -0700 | [diff] [blame] | 12 | Copyright (C) 2000-2017 Julian Seward |
njn | 3e88418 | 2003-04-15 13:03:23 +0000 | [diff] [blame] | 13 | jseward@acm.org |
| 14 | |
| 15 | This program is free software; you can redistribute it and/or |
| 16 | modify it under the terms of the GNU General Public License as |
| 17 | published by the Free Software Foundation; either version 2 of the |
| 18 | License, or (at your option) any later version. |
| 19 | |
| 20 | This program is distributed in the hope that it will be useful, but |
| 21 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 23 | General Public License for more details. |
| 24 | |
| 25 | You should have received a copy of the GNU General Public License |
| 26 | along with this program; if not, write to the Free Software |
| 27 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
| 28 | 02111-1307, USA. |
| 29 | |
| 30 | The GNU General Public License is contained in the file COPYING. |
| 31 | */ |
| 32 | |
njn | c7561b9 | 2005-06-19 01:24:32 +0000 | [diff] [blame] | 33 | #include "pub_tool_basics.h" |
philippe | 6643e96 | 2012-01-17 21:16:30 +0000 | [diff] [blame] | 34 | #include "pub_tool_poolalloc.h" |
njn | c7561b9 | 2005-06-19 01:24:32 +0000 | [diff] [blame] | 35 | #include "pub_tool_hashtable.h" |
njn | c7561b9 | 2005-06-19 01:24:32 +0000 | [diff] [blame] | 36 | #include "pub_tool_redir.h" |
| 37 | #include "pub_tool_tooliface.h" |
florian | 1a046d5 | 2013-09-16 20:56:35 +0000 | [diff] [blame] | 38 | #include "pub_tool_clreq.h" |
njn | c7561b9 | 2005-06-19 01:24:32 +0000 | [diff] [blame] | 39 | |
njn | 34419c1 | 2003-05-02 17:24:29 +0000 | [diff] [blame] | 40 | #include "mc_include.h" |
fitzhardinge | 98abfc7 | 2003-12-16 02:05:15 +0000 | [diff] [blame] | 41 | #include "memcheck.h" |
njn | 3e88418 | 2003-04-15 13:03:23 +0000 | [diff] [blame] | 42 | |
bart | 575ce8e | 2011-05-15 07:04:03 +0000 | [diff] [blame] | 43 | #define RECORD_OVERLAP_ERROR(s, src, dst, len) \ |
sewardj | 4b3a742 | 2011-10-24 13:21:57 +0000 | [diff] [blame] | 44 | VALGRIND_DO_CLIENT_REQUEST_STMT( \ |
bart | 575ce8e | 2011-05-15 07:04:03 +0000 | [diff] [blame] | 45 | _VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERROR, \ |
| 46 | s, src, dst, len, 0) |
njn | 3e88418 | 2003-04-15 13:03:23 +0000 | [diff] [blame] | 47 | |
bart | 9c7779b | 2013-11-24 17:48:13 +0000 | [diff] [blame] | 48 | #include "../shared/vg_replace_strmem.c" |