Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Lichtso
Copy link
Collaborator

@Lichtso Lichtso commented May 13, 2025

Currently the MemoryCowCallback is only invoked when an access is completely contained within a region marked as CoW. Furthermore, it automatically removes the CoW marking and the region will become a normal writable region, meaning the next access will not invoke the MemoryCowCallback anymore.

This PR switches to a model which is closer to SIGSEGV in other operating systems: It is invoked on every failed access and the handler the access type, location and length passed in and is also responsible for adjusting the memory regions. The memory region which has the next lowest starting virtual address, as well as the virtual address space available to that region, is also supplied as that is typically of interest and has been found already.

@Lichtso Lichtso force-pushed the refactor/access_violation_handler branch 6 times, most recently from b8f4a7d to 3cd5b10 Compare May 14, 2025 14:58
LucasSte
LucasSte previously approved these changes May 14, 2025
@LucasSte LucasSte dismissed their stale review May 14, 2025 19:59

I didn't mean to approve it. It was supposed to be a comment only.

@Lichtso Lichtso force-pushed the refactor/access_violation_handler branch 2 times, most recently from 09698f7 to 67065d3 Compare May 15, 2025 15:59
@Lichtso Lichtso requested a review from LucasSte May 15, 2025 16:05
@Lichtso Lichtso force-pushed the refactor/access_violation_handler branch from 67065d3 to 85ce712 Compare May 16, 2025 08:11
@Lichtso Lichtso requested a review from LucasSte May 16, 2025 16:44
@Lichtso Lichtso force-pushed the refactor/access_violation_handler branch from c74ef53 to f26d6c8 Compare May 30, 2025 19:11
@Lichtso Lichtso force-pushed the refactor/access_violation_handler branch 2 times, most recently from 8e597c0 to 601541c Compare June 1, 2025 20:58
@Lichtso Lichtso force-pushed the refactor/access_violation_handler branch from 601541c to 1c70214 Compare June 10, 2025 21:49
@Lichtso Lichtso force-pushed the refactor/access_violation_handler branch from 1b62378 to 7290638 Compare July 10, 2025 16:14
@Lichtso Lichtso requested a review from LucasSte July 10, 2025 16:26
@Lichtso Lichtso merged commit c4b980a into main Jul 10, 2025
11 checks passed
@Lichtso Lichtso deleted the refactor/access_violation_handler branch July 10, 2025 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants