Closed Bug 1769593 Opened 2 years ago Closed 2 years ago

Fail when serializing, rather than deserializing, file handles in excess of `MAX_DESCRIPTORS_PER_MESSAGE`

Categories

(Core :: IPC, task)

task

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: nika, Assigned: nika)

References

Details

Attachments

(2 files)

Currently the code for serializing simply logs an error to the console when serializing handles in excess of MAX_DESCRIPTORS_PER_MESSAGE, which ends up leading to the receiving side crashing when deserialization fails, potentially producing confusing errors which don't mention handles at all (such as bug 1769504). We should fail earlier on the sending side in this case, like we do for too-large messages, rather than failing when trying to read a message which we sent despite knowing it'll fail to deserialize.

We should also report the actual cause of the error better when both serializing and deserializing.

Pushed by nlayzell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/16811ba73030
Part 1: Fail when serializing file handles in excess of MAX_DESCRIPTORS_PER_MESSAGE, r=jld
https://hg.mozilla.org/integration/autoland/rev/353b922a3293
Part 2: Improve reporting of fatal DataPipe (de)serialization errors, r=jld
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: