Fix non-signal-safe calls in BrokerClient
The current BrokerClient is not signal-safe because of its use of base::Pickle which uses new and delete, and also its use of std::vector, which is not technically signal safe either. These are used in messaging IPCs with the BrokerHost when a syscall is trapped, thus BrokerClient must be made signal safe. This is discussed in https://crbug.com/255063. This CL creates a new BrokerSimpleMessage class to handle simple IPC messaging with strings and ints only. It uses fixed sized messages to simplify logic and allow it to allocate all its memory on the stack. It creates send, receive, and a synchronous send-and-receive method. It also adds a basic set of unit tests to sanity check behavior. Bug: 255063 Change-Id: I8077a515921b62969a1b8b173d903f2a118ed186 Reviewed-on: https://chromium-review.googlesource.com/553400 Commit-Queue: Greg Kerr <kerrnel@chromium.org> Reviewed-by:Robert Sesek <rsesek@chromium.org> Reviewed-by:
Tom Sepez <tsepez@chromium.org> Cr-Commit-Position: refs/heads/master@{#558415}
Showing
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment