yshui / picom

A lightweight compositor for X11 with animation support
https://picom.app/
Other
4.1k stars 585 forks source link

I fixed every single bug in `wm` #1334

Closed yshui closed 3 weeks ago

yshui commented 3 weeks ago

.... or at least the ones AFL++/libFuzzer can find. Some of these are very tricky, and my brain hurts.

This all came from @Monsterovich reporting an assertion failure in wm. And I thought, the wm code is nicely isolated now, maybe I can fuzz it, see if there are more bugs... and boy are there more :face_exhaling:

Unfortunately some of these changes are big, so I think this warrants an rc4.

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 88.44622% with 29 lines in your changes missing coverage. Please review.

Project coverage is 53.77%. Comparing base (c6fc045) to head (570381f). Report is 23 commits behind head on next.

Files with missing lines Patch % Lines
src/wm/wm.c 84.25% 17 Missing :warning:
src/x.c 94.84% 5 Missing :warning:
src/picom.c 63.63% 4 Missing :warning:
src/event.c 83.33% 3 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/yshui/picom/pull/1334/graphs/tree.svg?width=650&height=150&src=pr&token=NRSegi0Gze&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui)](https://app.codecov.io/gh/yshui/picom/pull/1334?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui) ```diff @@ Coverage Diff @@ ## next #1334 +/- ## ========================================== - Coverage 53.90% 53.77% -0.13% ========================================== Files 70 70 Lines 15165 15195 +30 ========================================== - Hits 8174 8171 -3 - Misses 6991 7024 +33 ``` | [Files with missing lines](https://app.codecov.io/gh/yshui/picom/pull/1334?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui) | Coverage Δ | | |---|---|---| | [src/atom.c](https://app.codecov.io/gh/yshui/picom/pull/1334?src=pr&el=tree&filepath=src%2Fatom.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL2F0b20uYw==) | `50.00% <ø> (ø)` | | | [src/region.h](https://app.codecov.io/gh/yshui/picom/pull/1334?src=pr&el=tree&filepath=src%2Fregion.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3JlZ2lvbi5o) | `56.25% <100.00%> (+1.04%)` | :arrow_up: | | [src/wm/tree.c](https://app.codecov.io/gh/yshui/picom/pull/1334?src=pr&el=tree&filepath=src%2Fwm%2Ftree.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3dtL3RyZWUuYw==) | `88.94% <100.00%> (-1.50%)` | :arrow_down: | | [src/wm/win.c](https://app.codecov.io/gh/yshui/picom/pull/1334?src=pr&el=tree&filepath=src%2Fwm%2Fwin.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3dtL3dpbi5j) | `75.12% <100.00%> (-0.23%)` | :arrow_down: | | [src/wm/win.h](https://app.codecov.io/gh/yshui/picom/pull/1334?src=pr&el=tree&filepath=src%2Fwm%2Fwin.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3dtL3dpbi5o) | `93.05% <ø> (ø)` | | | [src/wm/wm.h](https://app.codecov.io/gh/yshui/picom/pull/1334?src=pr&el=tree&filepath=src%2Fwm%2Fwm.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3dtL3dtLmg=) | `100.00% <ø> (ø)` | | | [src/wm/wm\_internal.h](https://app.codecov.io/gh/yshui/picom/pull/1334?src=pr&el=tree&filepath=src%2Fwm%2Fwm_internal.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3dtL3dtX2ludGVybmFsLmg=) | `100.00% <ø> (ø)` | | | [src/x.h](https://app.codecov.io/gh/yshui/picom/pull/1334?src=pr&el=tree&filepath=src%2Fx.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3guaA==) | `89.18% <100.00%> (+6.83%)` | :arrow_up: | | [src/event.c](https://app.codecov.io/gh/yshui/picom/pull/1334?src=pr&el=tree&filepath=src%2Fevent.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL2V2ZW50LmM=) | `66.82% <83.33%> (+1.82%)` | :arrow_up: | | [src/picom.c](https://app.codecov.io/gh/yshui/picom/pull/1334?src=pr&el=tree&filepath=src%2Fpicom.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3BpY29tLmM=) | `61.18% <63.63%> (-3.23%)` | :arrow_down: | | ... and [2 more](https://app.codecov.io/gh/yshui/picom/pull/1334?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui) | | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/yshui/picom/pull/1334/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui)