Commit d6092256 by Martin Liska Committed by Martin Liska

Guard memory block allocation.

2018-09-24  Martin Liska  <mliska@suse.cz>

	* memory-block.h (memory_block_pool::release): Annotate with
	valgrind that the memory is not accessible.

From-SVN: r264529
parent bf9f9292
2018-09-24 Martin Liska <mliska@suse.cz>
* memory-block.h (memory_block_pool::release): Annotate with
valgrind that the memory is not accessible.
2018-09-24 Martin Liska <mliska@suse.cz>
PR sanitizer/85774
* asan.c: Make asan_handled_variables extern.
* asan.h: Likewise.
......
......@@ -68,6 +68,11 @@ memory_block_pool::release (void *uncast_block)
block_list *block = new (uncast_block) block_list;
block->m_next = instance.m_blocks;
instance.m_blocks = block;
VALGRIND_DISCARD (VALGRIND_MAKE_MEM_NOACCESS ((char *)uncast_block
+ sizeof (block_list),
block_size
- sizeof (block_list)));
}
extern void *mempool_obstack_chunk_alloc (size_t) ATTRIBUTE_MALLOC;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment