-
Notifications
You must be signed in to change notification settings - Fork 133
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
Call to VirtAddr::new() causes panic when CR2 does not contain a canonical address. #332
Comments
Good catch we should definitely not panic in that situation. We could change Changing |
Should this stay open to track the (breaking) change to |
Whoops I just saw #335 I guess that PR (when merged) should close this issue. |
I think this issue can be closed. |
https://docs.rs/x86_64/latest/src/x86_64/registers/control.rs.html#267
When CR2 contains a malformed address, this panic occurs:
"panicked at 'address passed to VirtAddr::new must not contain any data in bits 48 to 64"
CR2 can obviously contain a non-canonical address after a page fault. This panic should not occur. I'm not sure what the best fix would be, but I ran into this because I tried to print CR2 in my panic handler and it just starts looping when you do that.
The text was updated successfully, but these errors were encountered: