diff --git a/tests/kernel/mem_protect/userspace/src/main.c b/tests/kernel/mem_protect/userspace/src/main.c index 4f1912bd854..6b8786cbaee 100644 --- a/tests/kernel/mem_protect/userspace/src/main.c +++ b/tests/kernel/mem_protect/userspace/src/main.c @@ -271,7 +271,7 @@ static void write_kerntext(void) expect_fault = true; expected_reason = REASON_HW_EXCEPTION; BARRIER(); - memcpy(&_is_thread_essential, 0, 4); + memset(&_is_thread_essential, 0, 4); zassert_unreachable("Write to kernel text did not fault"); }