aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-declextract/testdata/scopes.c
Commit message (Collapse)AuthorAgeFilesLines
* all: reformat C/C++ filesDmitry Vyukov2026-01-191-4/+6
|
* tools/syz-declextract: handle ints more carefullyDmitry Vyukov2025-04-101-0/+6
| | | | | | It seems that new clang is more picky about asserts for large ints. It not assert-fails when converting large ints to int64. Be more careful when converting these to ints.
* tools/syz-declextract: extend test dataDmitry Vyukov2025-04-091-0/+15
| | | | | | Add few interesting cases for scope analysis. Move functions related to resource to the header file, they must be visible in every file to work.
* tools/syz-declextract: support function scopesDmitry Vyukov2025-01-221-0/+30
Extract info about function scopes formed by switch'es on function arguments. For example if we have: void foo(..., int cmd, ...) { ... switch (cmd) { case FOO: ... block 1 ... case BAR: ... block 2 ... } ... } We record that any data flow within block 1 is only relevant when foo's arg cmd has value FOO, similarly for block 2 and BAR. This allows to do 3 things: 1. Locate ioctl commands that are switched on within transitively called functions. 2. Infer return value for each ioctl command. 3. Infer argument type when it's not specified in _IO macro. This will also allow to infer other multiplexed syscalls. Descriptions generated on Linux commit c4b9570cfb63501.