diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-01-29 13:58:08 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-01-31 11:35:53 +0100 |
| commit | 1068e211727a1adc9c4ae881e665058e9b7ce86a (patch) | |
| tree | 70aacb2ba105ae8dca2099314221681fdf878f64 /pkg/compiler/testdata | |
| parent | 8e579f27d6d48260d8d52d56da3e08b1ed81bdd4 (diff) | |
pkg/compiler: don't warn about the same len twice
Also add tests for warnings while we are here.
Diffstat (limited to 'pkg/compiler/testdata')
| -rw-r--r-- | pkg/compiler/testdata/warnings.txt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pkg/compiler/testdata/warnings.txt b/pkg/compiler/testdata/warnings.txt new file mode 100644 index 000000000..c85fa686d --- /dev/null +++ b/pkg/compiler/testdata/warnings.txt @@ -0,0 +1,21 @@ +# Copyright 2019 syzkaller project authors. All rights reserved. +# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +foo$suspicious_len(a len[b], b ptr[in, array[string]]) ### len target b refer to an array with variable-size elements (do you mean bytesize?) +foo$suspicious_len2(a ptr[in, suspicious_len_struct], b ptr[in, suspicious_len_struct]) +foo$suspicious_len3(a ptr[in, suspicious_len_template[string]], b ptr[in, suspicious_len_template[stringnoz]]) + +suspicious_len_struct { + a len[b, int32] ### len target b refer to an array with variable-size elements (do you mean bytesize?) + b ptr[in, array[string]] +} + +type suspicious_len_template[T] { + a len[b, int32] ### len target b refer to an array with variable-size elements (do you mean bytesize?) + b ptr[in, array[T]] +} + +bar() ### unsupported syscall: bar due to missing const SYS_bar +bar$1() +foo(a const[NO_SUCH_CONST], b r0) ### unsupported syscall: foo due to missing const NO_SUCH_CONST +resource r0[int32]: NO_EITHER ### unsupported resource: r0 due to missing const NO_EITHER |
