Add DRD suppression patterns for races triggered by std::ostream
[valgrind.git] / helgrind / hg_basics.c
bloba397a5cdb45fbe2a180f54c1b9c4a3964b9a8806
2 /*--------------------------------------------------------------------*/
3 /*--- Basic definitions for all of Helgrind. ---*/
4 /*--- hg_basics.c ---*/
5 /*--------------------------------------------------------------------*/
7 /*
8 This file is part of Helgrind, a Valgrind tool for detecting errors
9 in threaded programs.
11 Copyright (C) 2007-2017 OpenWorks Ltd
12 info@open-works.co.uk
14 This program is free software; you can redistribute it and/or
15 modify it under the terms of the GNU General Public License as
16 published by the Free Software Foundation; either version 2 of the
17 License, or (at your option) any later version.
19 This program is distributed in the hope that it will be useful, but
20 WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 General Public License for more details.
24 You should have received a copy of the GNU General Public License
25 along with this program; if not, write to the Free Software
26 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
27 02111-1307, USA.
29 The GNU General Public License is contained in the file COPYING.
32 #include "pub_tool_basics.h"
33 #include "pub_tool_libcbase.h"
34 #include "pub_tool_libcassert.h"
35 #include "pub_tool_mallocfree.h"
36 #include "pub_tool_threadstate.h"
38 #include "hg_basics.h" /* self */
41 /*----------------------------------------------------------------*/
42 /*--- Very basic stuff ---*/
43 /*----------------------------------------------------------------*/
45 void* HG_(zalloc) ( const HChar* cc, SizeT n )
47 void* p;
48 tl_assert(n > 0);
49 p = VG_(malloc)( cc, n );
50 VG_(memset)(p, 0, n);
51 return p;
54 void HG_(free) ( void* p )
56 tl_assert(p);
57 VG_(free)(p);
60 HChar* HG_(strdup) ( const HChar* cc, const HChar* s )
62 return VG_(strdup)( cc, s );
66 /*----------------------------------------------------------------*/
67 /*--- Command line options ---*/
68 /*----------------------------------------------------------------*/
70 /* Description of these flags is in hg_basics.h. */
72 Bool HG_(clo_track_lockorders) = True;
74 Bool HG_(clo_cmp_race_err_addrs) = False;
76 UWord HG_(clo_history_level) = 2;
78 #if (defined(VGA_x86) || defined(VGA_amd64)) && defined(VGO_linux)
79 // Set to true on setup where it was (reasonably) validated.
80 Bool HG_(clo_delta_stacktrace) = True;
81 #else
82 Bool HG_(clo_delta_stacktrace) = False;
83 #endif
85 UWord HG_(clo_conflict_cache_size) = 2000000;
87 UWord HG_(clo_sanity_flags) = 0;
89 Bool HG_(clo_free_is_write) = False;
91 UWord HG_(clo_vts_pruning) = 1;
93 Bool HG_(clo_check_stack_refs) = True;
95 /*--------------------------------------------------------------------*/
96 /*--- end hg_basics.c ---*/
97 /*--------------------------------------------------------------------*/