File: unsafe_buffers.txt

package info (click to toggle)
chromium 139.0.7258.127-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,122,156 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (68 lines) | stat: -rw-r--r-- 4,158 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
In file included from unsafe_buffers.cpp:16:
./unsafe_buffers_clean.h:9:10: warning: unsafe buffer access [-Wunsafe-buffer-usage]
  return i[s];  // This is in a "clean" file, so it should make a warning.
         ^
./unsafe_buffers_clean.h:9:10: note: See //docs/unsafe_buffers.md for help.
./unsafe_buffers_clean.h:19:3: warning: function introduces unsafe buffer manipulation [-Wunsafe-buffer-usage]
  unsafe_fn();  // Unannotated call causes error.
  ^~~~~~~~~~~
./unsafe_buffers_clean.h:19:3: note: See //docs/unsafe_buffers.md for help.
./unsafe_buffers_clean.h:20:3: warning: function introduces unsafe buffer manipulation [-Wunsafe-buffer-usage]
  unsafe_fn();  // Second one uses caching and still makes an error.
  ^~~~~~~~~~~
./unsafe_buffers_clean.h:20:3: note: See //docs/unsafe_buffers.md for help.
In file included from unsafe_buffers.cpp:17:
./unsafe_buffers_not_clean.h:9:10: warning: unsafe buffer access [-Wunsafe-buffer-usage]
  return i[s];  // This header is checked and makes an error.
         ^
./unsafe_buffers_not_clean.h:9:10: note: See //docs/unsafe_buffers.md for help.
In file included from unsafe_buffers.cpp:18:
./unsafe_buffers_not_clean_dir/clean_dir_1/not_clean_header.h:11:10: warning: unsafe buffer access [-Wunsafe-buffer-usage]
  return i[s];
         ^
./unsafe_buffers_not_clean_dir/clean_dir_1/not_clean_header.h:11:10: note: See //docs/unsafe_buffers.md for help.
In file included from unsafe_buffers.cpp:20:
./unsafe_buffers_not_clean_dir/clean_header.h:11:10: warning: unsafe buffer access [-Wunsafe-buffer-usage]
  return i[s];  // This is in a "clean" file, so it should make a warning.
         ^
./unsafe_buffers_not_clean_dir/clean_header.h:11:10: note: See //docs/unsafe_buffers.md for help.
./unsafe_buffers_not_clean_dir/clean_header.h:21:3: warning: function introduces unsafe buffer manipulation [-Wunsafe-buffer-usage]
  in_a_dir_unsafe_fn();  // Unannotated call causes error.
  ^~~~~~~~~~~~~~~~~~~~
./unsafe_buffers_not_clean_dir/clean_header.h:21:3: note: See //docs/unsafe_buffers.md for help.
./unsafe_buffers_not_clean_dir/clean_header.h:22:3: warning: function introduces unsafe buffer manipulation [-Wunsafe-buffer-usage]
  in_a_dir_unsafe_fn();  // Second one uses caching and still makes an error.
  ^~~~~~~~~~~~~~~~~~~~
./unsafe_buffers_not_clean_dir/clean_header.h:22:3: note: See //docs/unsafe_buffers.md for help.
./unsafe_buffers_not_clean_dir/clean_header.h:42:1: warning: unsafe pointer arithmetic [-Wunsafe-buffer-usage]
INSIDE_MACRO_CHECKED(FooChecked, ptr, int*);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./unsafe_buffers_not_clean_dir/clean_header.h:33:12: note: expanded from macro 'INSIDE_MACRO_CHECKED'
    return FIELD##s_ + index;                    /
           ^~~~~~~~~
<scratch space>:20:1: note: expanded from here
ptrs_
^~~~~
./unsafe_buffers_not_clean_dir/clean_header.h:42:1: note: See //docs/unsafe_buffers.md for help.
./unsafe_buffers_not_clean_dir/clean_header.h:33:12: note: expanded from macro 'INSIDE_MACRO_CHECKED'
    return FIELD##s_ + index;                    /
           ^
<scratch space>:20:1: note: expanded from here
ptrs_
^
In file included from unsafe_buffers.cpp:24:
./unsafe_libc_calls_clean.h:11:10: warning: function 'memcpy' is unsafe [-Wunsafe-buffer-usage-in-libc-call]
  return memcpy(i, &s, sizeof(s));  // Should generate a warning.
         ^~~~~~~~~~~~~~~~~~~~~~~~
./unsafe_libc_calls_clean.h:11:10: note: See //docs/unsafe_buffers.md for help.
In file included from unsafe_buffers.cpp:25:
./unsafe_libc_calls_not_clean.h:11:10: warning: function 'memcpy' is unsafe [-Wunsafe-buffer-usage-in-libc-call]
  return memcpy(i, &s, sizeof(s));  // Should generate a warning.
         ^~~~~~~~~~~~~~~~~~~~~~~~
./unsafe_libc_calls_not_clean.h:11:10: note: See //docs/unsafe_buffers.md for help.
In file included from unsafe_buffers.cpp:26:
./unsafe_libc_calls_opt_out.h:18:10: warning: unsafe buffer access [-Wunsafe-buffer-usage]
  return i[s];  // Gives warning, allow_unafe_libc_calls does not imply allow_unsafe_buffers.
         ^
./unsafe_libc_calls_opt_out.h:18:10: note: See //docs/unsafe_buffers.md for help.
12 warnings generated.