@@ -521,6 +521,7 @@ region_model::impl_call_memcpy (const call_details &cd)
= m_mgr->get_sized_region (dest_reg, NULL_TREE, num_bytes_sval);
const svalue *src_contents_sval
= get_store_value (sized_src_reg, cd.get_ctxt ());
+ check_for_poison (src_contents_sval, cd.get_arg_tree (1), cd.get_ctxt ());
set_value (sized_dest_reg, src_contents_sval, cd.get_ctxt ());
}
@@ -1421,6 +1421,10 @@ region_model::on_call_pre (const gcall *call, region_model_context *ctxt,
case BUILT_IN_MALLOC:
impl_call_malloc (cd);
return false;
+ case BUILT_IN_MEMMOVE:
+ case BUILT_IN_MEMMOVE_CHK:
+ /* We can use impl_call_memcpy until overlap checking is
+ added to it. */
case BUILT_IN_MEMCPY:
case BUILT_IN_MEMCPY_CHK:
impl_call_memcpy (cd);
@@ -6,7 +6,7 @@
int test_memmove_within_uninit (void)
{
- char s[5]; /* { dg-message "region created on stack here" } */
+ char s[5]; /* { dg-message "region created on stack here" "" { xfail riscv*-*-* } } */
memmove(s, s + 1, 2); /* { dg-warning "use of uninitialized value" } */
return 0;
}