-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce system call page table entry locking
mmap() and munmap() will now block if asked to unmap a page that's being used by a system call. This way there's no fear that calling free() will cause a read() in another thread to segfault, particularly if strace was enabled. Eliminating that weakness took some revamping and revealed many other issues that have also been addressed by this change. One particularly nasty longstanding issue, is rt_sigreturn would clobber 128 bytes of struct Machine memory. Overusing intptr_t was a mistake due to how it would sign extend unsigned addresses on 32-bit platforms. This solves the memstat invariant mystery we encountered last week, which was due to not using atomic integers. The page fault handler is now completely lockless, since we're using CAS operations now when modifying page table entries. A bug in IsValidMemory has been fixed, where it wasn't clearing the 12 bottom bits of the page. Crash reports are now more durable to edge runtime states, e.g g_machine being null, crashes that happen outside sigsetjmp() or page tables gone.
- Loading branch information
Showing
40 changed files
with
737 additions
and
387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.