-
Notifications
You must be signed in to change notification settings - Fork 137
Propagate deserialization errors for IpcSharedMemory #392
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
Conversation
Signed-off-by: Simon Wülker <[email protected]>
thread::Builder::new() | ||
.name("router-proxy".to_string()) | ||
.spawn(move || Router::new(msg_receiver, wakeup_receiver).run()) | ||
.expect("Failed to spawn router proxy thread"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave the router proxy thread a name to make it easier to identify when it panics.
This makes debugging easier when panics occur inside the thread. Signed-off-by: Simon Wülker <[email protected]>
ae47d03
to
7a3fa34
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the version to 0.20.0 as well? We haven't published a version with #374 yet.
This makes
IpcSharedMemory::deserialize
return an error if the deserialized data references an shared memory region region that does not exist.Part of servo/servo#36792. This doesn't fix the actual issue, but gives users of
ipc-channel
the opportunity to handle the error gracefully. Servo is technically at fault for panicking now, because serialized data being corrupted is not unrealistic.