-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/compiler: fix incorrect alignment calculation for padding
We assumed that for ConstType alignment is equal to size, which is perfectly reasonable for normal int8/16/32/64/ptr. However, padding is also represented by ConstType of arbitrary size, so if we added 157 bytes of padding that becomes alignment of the padding field and as the result of the whole struct. This affects very few structs, but quite radically and quite important structs. Discovered thanks to syz-check. Update #590
- Loading branch information
Showing
16 changed files
with
275 additions
and
546 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
struct address_netrom_dev: no corresponding struct in kernel | ||
struct nr_route_struct: bad size: syz=120 kernel=112 | ||
field nr_route_struct.device: bad offset: syz=12 kernel=11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
struct rose_address: bad number of fields: syz=2 kernel=1 | ||
struct rose_address_remote: no corresponding struct in kernel | ||
struct rose_address_dev: no corresponding struct in kernel | ||
struct rose_route_struct: bad size: syz=108 kernel=88 | ||
field rose_route_struct.device: bad offset: syz=24 kernel=15 | ||
field rose_route_struct.ndigis: bad offset: syz=40 kernel=31 | ||
field rose_route_struct.digipeaters: bad offset: syz=41 kernel=32 |