Skip to content

Commit

Permalink
ozone/wayland: unpoison output_transform
Browse files Browse the repository at this point in the history
Unpoison the output_transform. See the comment for more details.

Bug: 1358123
Change-Id: I7a1971e93c7e7084223dc2221f237f0936f7d7c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3873014
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1047420}
  • Loading branch information
msisov authored and Chromium LUCI CQ committed Sep 15, 2022
1 parent 159ba42 commit b441bdf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ui/ozone/platform/wayland/host/wayland_output.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ void WaylandOutput::OutputHandleGeometry(void* data,
int32_t output_transform) {
WaylandOutput* wayland_output = static_cast<WaylandOutput*>(data);
if (wayland_output) {
// It looks like there is a bug in libffi - only the 8th arg is affected.
// Possibly it is not following the calling convention of the ABI? Eg. the
// lib has some off-by-1-error where it's supposed to pass 8 args in regs
// and the rest on the stack but instead it's passing 7 in regs. This is
// out of our control. Given the output_transform is always correct,
// unpoison the value to make MSAN happy.
MSAN_UNPOISON(&output_transform, sizeof(int32_t));
wayland_output->origin_ = gfx::Point(x, y);
wayland_output->panel_transform_ = output_transform;
}
Expand Down

0 comments on commit b441bdf

Please sign in to comment.