aboutsummaryrefslogtreecommitdiffstats
path: root/executor/style_test.go
Commit message (Collapse)AuthorAgeFilesLines
* executor: add Glob testDmitry Vyukov2024-11-261-1/+1
|
* executor: more precise detection of exit/_exit in the linterAlexander Potapenko2024-07-291-1/+1
| | | | Do not report errors when a function name contains '[_]exit' as a substring.
* executor: prohibit malloc/calloc via linterDmitry Vyukov2024-06-251-1/+36
| | | | | | We include a number of C++ headers in the runnner. On FreeBSD some of them mention malloc, and our defines break the build. Use the style test to check only our files for these things.
* executor: add runner modeDmitry Vyukov2024-06-241-2/+3
| | | | | | | Move all syz-fuzzer logic into syz-executor and remove syz-fuzzer. Also restore syz-runtest functionality in the manager. Update #4917 (sets most signal handlers to SIG_IGN)
* tools/syz-linter: check t.Logf/Errorf/Fatalf messagesDmitry Vyukov2024-04-171-1/+1
| | | | | Fix checking of Logf, it has string in 0-th arg. Add checking of t.Errorf/Fatalf.
* all: ioutil is deprecated in go1.19 (#3718)Taras Madan2023-02-231-2/+2
|
* executor: add `zlib` decompression header fileHrutvik Kanabar2022-11-211-1/+1
| | | | | | | | | | | | | | Create a header file to provide a clean entrypoint `puff_zlib_to_file()`, which decompresses `zlib` data from an array to a file. This will be used for pseudo-syscalls which accept compressed data, e.g. `syz_mount_image`. The implementation uses a slightly-modified version of `puff.{c,h}`, found in the `zlib` repository. We have to be careful to ensure the copyright information from `puff.{c,h}` gets included in generated C code and C reproducers. Therefore, introduce the `//%` pattern to indicate comments which should not be removed by code generation, and use this pattern for the copyright notice.
* sys/syz-sysgen: generate possibly missing __NR/SYS definesAleksandr Nogikh2022-01-131-0/+1
| | | | | | | | | As the comiling machine may have a kernel version different from the tested one, not all definitions might be present. Generate sequences of ifndef in defs.h to avoid potential issues. Restrict __NR-related style checking rules to only checking common*.h files.
* executor: add an ifdef SYZ_* style checkAleksandr Nogikh2021-11-301-0/+8
| | | | | | SYZ_* constants are always defined and one must not check them via ifdef. Add a check to prevent such problems during development (inspired by the discussion in #2882).
* executor: check for single-line compound statementsDmitry Vyukov2021-10-011-2/+24
| | | | | | Historically the code base does not use single-line compound statements ({} around single-line blocks). But there are few precedents creeped into already. Add a check to keep the code base consistent.
* pkg/report: detect executor failuresDmitry Vyukov2021-02-211-1/+9
| | | | | | | | | | | | Currently all executor fail errors go into "lost connection" bucket. This is not very useful. First, there are different executor failures. Second, it's not possible to understand what failures happen how frequently. Third, there are not authentic lost connection. Create separate SYZFAIL: bugs for them. Update #573 Update #502 Update #318
* executor: check for \n in fail/exitf messagesDmitry Vyukov2020-09-281-0/+7
|
* executor: fix definition of __NR_io_uring_setupDmitry Vyukov2020-09-151-0/+18
| | | | | | | | | | Sone syzbot instances broke with: <stdin>: In function ‘syz_io_uring_setup’: <stdin>:476:33: error: ‘__NR_io_uring_setup’ undeclared (first use in this function) <stdin>:476:33: note: each undeclared identifier is reported only once for each function it appears in pkg/csource resolves #ifdef's at generation time.
* executor: warn about C89-style var declarationsDmitry Vyukov2020-08-141-5/+48
| | | | | | | | | | | | | | | | | We generally use the newer C99 var declarations combined with initialization because: - declarations are more local, reduced scope - fewer lines of code - less potential for using uninit vars and other bugs However, we have some relic code from times when we did not understand if we need to stick with C89 or not. Also some external contributions that don't follow style around. Add a static check for C89-style declarations and fix existing precedents. Akaros toolchain uses -std=gnu89 (or something) and does not allow variable declarations inside of for init statement. And we can't switch it to -std=c99 because Akaros headers are C89 themselves. So in common.h we need to declare loop counters outside of for.
* executor: fix style checking testDmitry Vyukov2020-08-131-3/+3
| | | | | The regexp for empty suppressions matches _everything_... Don't match suppression if it's empty.
* executor: add some code style checksDmitry Vyukov2020-08-061-0/+107
Move the test from pkg/csource to executor/ in order to be able to (1) run it on *.cc files, (2) run on unprocessed *.h files, (3) produce line numbers. Add a check for missed space after //.