| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Any is the preferred over interface{} now in Go.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently if const values in 2 .const files have different value,
the compiler produces an error.
This is problematic for auto-extacted consts since we extract
them for only 1 arch now. So if a const has different values
for different arches, auto-extacted consts may not reflect that,
and we can get a mismatch with manual descriptions that has
correct values for all arches.
So if both manual and auto-extacted consts have different values,
silently prefer the manual ones.
I've tried to do some whitelisting of consts during auto-extaction,
but the list is large and changing over time.
This solution is not perfect since the manual descriptions may
have a bug, and the mismatch is actually pointing to that bug.
Maybe in future we could extract for all arches separately,
or do something else. But let's do this for now.
|
| |
|
|
|
|
| |
The new method checks whether the value is defined for at least one of
the known arches.
Refactor ConstFile tests.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While adding new syscall descriptions to OpenBSD I ran into the following problem:
$ gmake extract SOURCEDIR=/home/src && ./bin/syz-sysgen
fs.txt.const:15: failed to parse int: strconv.ParseUint: parsing "": invalid syntax
$ tail -n +15 sys/openbsd/fs.txt.const | head -1
O_RDONLY =
Note that `O_RDONLY` lacks a value and the same directive is defined as
0 on OpenBSD.
In `ConstFile.Serialize()`, if val is equal to the default value is has
only already been serialized if `max != 0`.
|
|
|
We now have 8 arches for Linux and .const files
produce lots of noise in PRs and lots of diffs.
If 3 .txt files are touched, the PR will have 24 .const files,
which will be intermixed with .txt files.
Frequently const values are equal across arches,
and even if they don't spreading a single value
across 8 files is inconvinient.
Merge all 8 *_arch.const files into a single .const file.
See the test for details of the new format.
The old format is still parsed for now,
we can't update all OSes at once.
For Linux this reduces number of const files/lines
from 1288/96599 to 158/11603.
Fixes #1983
|