Skip to content

test issue src/tests/vm/mmap-unmap.c #6

Description

@Jazzhsu

The test does not enforce a page-in before unmap, making the memory access check after unmap a no-op if page was load lazily.
That is, if lazy load is implemented correctly, the mmap call itself does NOT cause the PTE creation. Therefore, an immediately unmap call and checks afterward does NOT really check if the mapped region is inaccessible after unmap (because the PTE is never created, mapped region is never paged-in).

possible fix:
add

volatile int tmp UNUSED = *(int *) ACTUAL;

before unmap

This way, a page-in is enforced. Now, the unmap followed by a memory access check will actually check if proper clean up is performed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions