region-rs icon indicating copy to clipboard operation
region-rs copied to clipboard

How to handle PAGE_GUARD on Windows?

Open darfink opened this issue 5 years ago • 0 comments

Currently guarded regions on Windows are represented as a Region, where protection is equal to the guarded region's underlying protection, and guarded set to true.

This might be confusing, since library users may only check for protection & Protection::READ or is_readable(), and thereafter assume the memory region is accessible.

Is it more ergonomic to discard the underlying protection of guarded pages, and merely set protection to Protection::NONE whilst also retaining the guarded boolean flag?

This would mean that information is lost, but would most likely result in fewer surprises for the user.

darfink avatar Jun 02 '20 17:06 darfink