Fix use of valgrind API
authorMikhail Maltsev <maltsevm@gmail.com>
Wed, 23 Sep 2015 02:31:14 +0000 (02:31 +0000)
committerMikhail Maltsev <miyuki@gcc.gnu.org>
Wed, 23 Sep 2015 02:31:14 +0000 (02:31 +0000)
gcc/
PR middle-end/67649
* memory-block.h (memory_block_pool::allocate): Use valgrind API to
mark the block as accessible.

From-SVN: r228033

gcc/ChangeLog
gcc/memory-block.h

index 162725548807a02e9f13aa28d338f98484bef768..3c79492f22bcb72ac50dc8498d014b9f7a86a31b 100644 (file)
@@ -1,3 +1,9 @@
+2015-09-23  Mikhail Maltsev  <maltsevm@gmail.com>
+
+       PR middle-end/67649
+       * memory-block.h (memory_block_pool::allocate): Use valgrind API to
+       mark the block as accessible.
+
 2015-09-22  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * function.c (thread_prologue_and_epilogue_insns): Delete
index 1a495eaea0eefd14bbd6d5da329bf43a3bdde7f1..8b1202ba44eda4db97470827257d8648053e3506 100644 (file)
@@ -57,6 +57,7 @@ memory_block_pool::allocate ()
 
   void *result = instance.m_blocks;
   instance.m_blocks = instance.m_blocks->m_next;
+  VALGRIND_DISCARD (VALGRIND_MAKE_MEM_UNDEFINED (result, block_size));
   return result;
 }