Skip to content

Commit 7d4569a

Browse files
Fix valgrind false-positive warning in mem_heap_get_chunked_block_start.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
1 parent a4e54e7 commit 7d4569a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jerry-core/mem/mem-heap.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,9 +902,12 @@ mem_heap_get_chunked_block_start (void *ptr) /**< pointer into a block */
902902
JERRY_ASSERT (uintptr > uintptr_chunk_aligned);
903903

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

907906
#ifndef JERRY_NDEBUG
907+
VALGRIND_DEFINED_STRUCT (block_p);
908+
JERRY_ASSERT (block_p->length_type == mem_block_length_type_t::ONE_CHUNKED);
909+
VALGRIND_NOACCESS_STRUCT (block_p);
910+
908911
const mem_block_header_t *block_iter_p = mem_heap.first_block_p;
909912
bool is_found = false;
910913

0 commit comments

Comments
 (0)