aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/testdata/errors2.txt
Commit message (Collapse)AuthorAgeFilesLines
* pkg/compiler: check range is consistent with base typePaul Chaignon2019-10-251-0/+13
| | | | | | For any intN, values in the range [-MAX_INTN:MAX_INTN] are accepted. Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
* prog, pkg/compiler: alignment for integer rangesPaul Chaignon2019-10-251-0/+7
| | | | | | | | | Enables the syntax intN[start:end, alignment] for integer ranges. For instance, int32[0:10, 2] represents even 32-bit numbers between 0 and 10 included. With this change, two NEED tags in syscall descriptions can be addressed. Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
* pkg/compiler: add offsetof typeDmitry Vyukov2019-05-161-0/+2
| | | | | | Similar to C offsetof gives offset of a field from the beginning of the parent struct. We have several TODOs in descriptions asking for this.
* pkg/compiler: allow to refer to syscall arguments in len pathsDmitry Vyukov2019-05-141-0/+2
| | | | This allows to use len[syscall:arg] expressions.
* pkg/compiler: support complex len targetsDmitry Vyukov2019-05-141-3/+31
| | | | | | | | | | This change adds compiler support for complex path expressions in len targets. E.g. it allows to refer to a sibling field as len[parent_struct:field:another_field]. See the docs change for details. This is just a compiler change. The feature is not yet supported by the prog package.
* pkg/compiler: support negative integersDmitry Vyukov2018-07-091-0/+5
| | | | | | Currently we have to use 0xffffffffffffffff to represent -1, and we can't express e.g. -20:20 int range. Support negative consts to fix both problems.
* pkg/compiler: check for unused declarationsDmitry Vyukov2018-06-301-0/+35
| | | | | Error on unused structs/unions/resources/flags. Finds tons of bugs.
* pkg/ast: support char constantsDmitry Vyukov2018-04-291-0/+1
| | | | | | | Frequently it's useful to do something like: int8['a':'z'] punctuation = ',', '-', ':'
* pkg/compiler: support size attribute for unionsDmitry Vyukov2018-03-051-0/+8
|
* pkg/compiler: add size attribute for structsDmitry Vyukov2018-03-051-0/+13
| | | | The size attribute allows to pad a struct up to the specified size.
* pkg/compiler: prohibit len of other union optionsDmitry Vyukov2018-02-231-0/+6
|
* pkg/compiler: allow len of var-len arraysDmitry Vyukov2018-02-171-2/+0
| | | | | All netfilter subsystems use this unfortunately, so demote this to a warning.
* pkg/compiler: support type templatesDmitry Vyukov2018-01-131-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Netlink descriptions contain tons of code duplication, and need much more for proper descriptions. Introduce type templates to simplify writing such descriptions and remove code duplication. Note: type templates are experimental, have poor error handling and are subject to change. Type templates can be declared as follows: ``` type buffer[DIR] ptr[DIR, array[int8]] type fileoff[BASE] BASE type nlattr[TYPE, PAYLOAD] { nla_len len[parent, int16] nla_type const[TYPE, int16] payload PAYLOAD } [align_4] ``` and later used as follows: ``` syscall(a buffer[in], b fileoff[int64], c ptr[in, nlattr[FOO, int32]]) ```
* pkg/compiler: add check that len does not refer to array with varlen elementsDmitry Vyukov2017-11-281-0/+2
| | | | | This [almost] always means a bug in descriptions. Fix all bugs identified by the check.
* pkg/compiler: don't genererate missing syscallsDmitry Vyukov2017-09-151-1/+2
| | | | | | | | We used to generate them only because manager had no idea what arch it is testing. So syscalls numbers had to match between all arches. This is not needed anymore. Also don't generate unreferenced structs/resources.
* sys, pkg/compiler: move padding computation to compilerDmitry Vyukov2017-09-041-0/+46
| | | | This makes types constant during execution, everything is precomputed.
* pkg/compiler: detect resources without ctorsDmitry Vyukov2017-09-041-0/+87
Fixes #217