If a race error is detected, check to see whether the raced-on address
is inside a heap block, and if so, print the allocation point of the
heap block.  It's stupid not to do this considering that the
implementation already keeps track of all mallocs and frees.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11089 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/helgrind/hg_errors.h b/helgrind/hg_errors.h
index ee49491..3594825 100644
--- a/helgrind/hg_errors.h
+++ b/helgrind/hg_errors.h
@@ -67,6 +67,14 @@
 extern ULong HG_(stats__string_table_queries);
 extern ULong HG_(stats__string_table_get_map_size) ( void );
 
+/* For error creation: map 'data_addr' to a malloc'd chunk, if any.
+   Slow linear search.  This is an abuse of the normal file structure
+   since this is exported by hg_main.c, not hg_errors.c.  Oh Well. */
+void HG_(mm_find_containing_block)( /*OUT*/ExeContext** where,
+                                    /*OUT*/Addr*        payload,
+                                    /*OUT*/SizeT*       szB,
+                                    Addr                data_addr );
+
 #endif /* ! __HG_ERRORS_H */
 
 /*--------------------------------------------------------------------*/