Skip to content

tests/kernel/mem_protect/protection/: Reached unreachable code #15546

@cinlyooi-intel

Description

@cinlyooi-intel

** Description **
Executed asserted false because unreachable code blocks were accessed. It happens at various places

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build
  2. cmake -DBOARD=arduino_due
  3. make
  4. make run

Screenshots or console output
If applicable, add a screenshot (drag-and-drop an image), or console logs
(cut-and-paste text and put a code fence (```) before and after, to help
explain the issue.

***** delaying boot 1000ms (per build configuration) *****
***** Booting Zephyr OS zephyr-v1.14.0-70-g8905b0fe2193 (delayed boot 1000ms) *****
Running test suite protection
===================================================================
starting test - exec_data
trying to call code written to 0x20070009
returned from code at 0x20070009
Execute from target buffer succeeded!

    Assertion failed at ./tests/kernel/mem_protect/protection/src/main.c:151: exec_data: (Reached unreachable code)
Execute from data did not fault
FAIL - exec_data
===================================================================
starting test - exec_stack
trying to call code written to 0x200706b9
returned from code at 0x200706b9
Execute from target buffer succeeded!

    Assertion failed at ./tests/kernel/mem_protect/protection/src/main.c:164: exec_stack: (Reached unreachable code)
Execute from stack did not fault
FAIL - exec_stack
===================================================================
starting test - exec_heap
trying to call code written to 0x20070185
returned from code at 0x20070185
Execute from target buffer succeeded!

    Assertion failed at ./tests/kernel/mem_protect/protection/src/main.c:179: exec_heap: (Reached unreachable code)
Execute from heap did not fault
FAIL - exec_heap
===================================================================
starting test - write_ro
trying to write to rodata at 0x00083ca8
rodata modified!

    Assertion failed at ./tests/kernel/mem_protect/protection/src/main.c:109: write_ro: (Reached unreachable code)
Write to rodata did not fault
FAIL - write_ro
===================================================================
starting test - write_text
trying to write to text at 0x0008060c
text not modified
Did not get expected return value!

    Assertion failed at ./tests/kernel/mem_protect/protection/src/main.c:140: write_text: (Reached unreachable code)
Write to text did not fault
FAIL - write_text
===================================================================
Test suite protection failed.
===================================================================
RunID: :o9jw
PROJECT EXECUTION FAILED

Environment (please complete the following information):

  • OS: fedora29
  • Toolchain zephyr
  • Commit SHA or Version used: 8905b0f

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions