aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2024-07-29 16:28:49 +0200
committerAlexander Potapenko <glider@google.com>2024-07-29 15:29:47 +0000
commita22b1135716d02277936c6f48acb1086b3f9a362 (patch)
tree6705cc5ffbbc264dd0eab5c4156e2e449e872a8f /executor
parentd44a00853f501db00c2c9e47b8c770b892d57721 (diff)
executor: more precise detection of exit/_exit in the linter
Do not report errors when a function name contains '[_]exit' as a substring.
Diffstat (limited to 'executor')
-rw-r--r--executor/style_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/executor/style_test.go b/executor/style_test.go
index 42f99c412..7c32d4d10 100644
--- a/executor/style_test.go
+++ b/executor/style_test.go
@@ -174,7 +174,7 @@ if (foo) {
{
// Exit/_exit do not necessary work (e.g. if fuzzer sets seccomp
// filter that prohibits exit_group). Use doexit instead.
- pattern: `exit\(`,
+ pattern: `\b[_]?exit\(`,
suppression: `doexit\(|syz_exit`,
message: "Don't use [_]exit, use doexit/exitf/fail instead",
tests: []string{