-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drracket crash #3032
Comments
Looks like this is a result of our self-modifying code messing with page permissions. The application then loads some code in to that mapped range, it then executes some code in that range. At which point FEX's SMC tracking changes the pages from RWX to Readonly. Later the application tries relocating its executable in the same space by using syscall reads directly in to that mapped space. At some point it hits the page that FEX mapped as Readonly, this causes the read syscall to return EFAULT, and then the whole thing goes down. FEX might be able to retry reads when EFAULT occurs and mess with with the code invalidation, but right now it's a bug that we can't work around. |
Why does "FEX's SMC tracking" mark the page as Read-only? |
It's currently only way to detect when writes occur to a page that has code in it to signal to our self-modifying-code handling that the code has changed. |
Ah, makes sense. So why can't you just catch EFAULT (I'm assuming because EFAULT could mean a variety of reasons, not necessarily a write to a Read-only page)? |
Trying to open drracket (Racket IDE) fails with
The text was updated successfully, but these errors were encountered: