Skip to content

Fix valgrind false-positive warning in mem_heap_get_chunked_block_start #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion jerry-core/mem/mem-heap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,12 @@ mem_heap_get_chunked_block_start (void *ptr) /**< pointer into a block */
JERRY_ASSERT (uintptr > uintptr_chunk_aligned);

mem_block_header_t *block_p = (mem_block_header_t *) uintptr_chunk_aligned;
JERRY_ASSERT (block_p->length_type == mem_block_length_type_t::ONE_CHUNKED);

#ifndef JERRY_NDEBUG
VALGRIND_DEFINED_STRUCT (block_p);
JERRY_ASSERT (block_p->length_type == mem_block_length_type_t::ONE_CHUNKED);
VALGRIND_NOACCESS_STRUCT (block_p);

const mem_block_header_t *block_iter_p = mem_heap.first_block_p;
bool is_found = false;

Expand Down