Home
last modified time | relevance | path

Searched refs:strnlen (Results 1 – 25 of 115) sorted by relevance

12345

/external/clang/test/Analysis/
Dstring-fail.c41 #define strnlen BUILTIN(strnlen) macro
42 size_t strnlen(const char *s, size_t maxlen);
45 if (strnlen(x, 10) < 5) in strnlen_liveness()
47 clang_analyzer_eval(strnlen(x, 10) < 5); // expected-warning{{FALSE}} in strnlen_liveness()
57 size_t a = strnlen(z.a, 10); in strnlen_subregion()
59 size_t b = strnlen(z.a, 10); in strnlen_subregion()
65 size_t c = strnlen(z.a, 10); in strnlen_subregion()
72 size_t a = strnlen(x, 10); in strnlen_argument()
73 size_t b = strnlen(x, 10); in strnlen_argument()
79 size_t c = strnlen(x, 10); in strnlen_argument()
[all …]
Dstring.c161 size_t strnlen(const char *s, size_t maxlen);
164 clang_analyzer_eval(strnlen("123", 10) == 3); // expected-warning{{TRUE}} in strnlen_constant0()
169 clang_analyzer_eval(strnlen(a, 10) == 3); // expected-warning{{TRUE}} in strnlen_constant1()
174 clang_analyzer_eval(strnlen(a, 10) == 3); // expected-warning{{TRUE}} in strnlen_constant2()
176 clang_analyzer_eval(strnlen(a, 10) == 3); // expected-warning{{UNKNOWN}} in strnlen_constant2()
180 clang_analyzer_eval(strnlen("123456", 3) == 3); // expected-warning{{TRUE}} in strnlen_constant4()
185 clang_analyzer_eval(strnlen(a, 3) == 3); // expected-warning{{TRUE}} in strnlen_constant5()
190 clang_analyzer_eval(strnlen(a, 3) == 3); // expected-warning{{TRUE}} in strnlen_constant6()
192 clang_analyzer_eval(strnlen(a, 3) == 3); // expected-warning{{UNKNOWN}} in strnlen_constant6()
196 …return strnlen(0, 3); // expected-warning{{Null pointer argument in call to string length function… in strnlen_null()
[all …]
/external/clang/test/Sema/
Denable_if.c24 size_t strnlen(const char *s, size_t maxlen) // expected-note{{candidate function}}
29 inline size_t strnlen(const char *s, size_t maxlen) // expected-note{{candidate function}} in strnlen() function
37 size_t strnlen(const char *s, size_t maxlen) // expected-note{{candidate disabled: chosen when 'ma…
45 size_t strnlen(const char *s, size_t maxlen) // expected-note{{candidate function has been explici…
56 strnlen(s, i); in test2()
58 strnlen(s, 999); in test2()
60 strnlen(c, 1); in test2()
62 strnlen(c, i); in test2()
65strnlen(c, 999); // expected-error{{call to unavailable function 'strnlen': 'maxlen' is larger th… in test2()
/external/swiftshader/third_party/llvm-7.0/llvm/test/CodeGen/SystemZ/
Dstrlen-nobuiltin.ll1 ; Test that strlen/strnlen won't be converted to SRST if calls are
7 declare i64 @strnlen(i8 *%src, i64 %len)
17 ; Likewise for strnlen.
21 ; CHECK: brasl %r14, strnlen
23 %res = call i64 @strnlen(i8 *%src, i64 %len) nobuiltin
Dstrlen-01.ll6 declare i64 @strnlen(i8 *%src, i64 %len)
25 ; Test strnlen with its proper i64 prototype.
37 %res = call i64 @strnlen(i8 *%src, i64 %len)
/external/llvm/test/CodeGen/SystemZ/
Dstrlen-nobuiltin.ll1 ; Test that strlen/strnlen won't be converted to SRST if calls are
7 declare i64 @strnlen(i8 *%src, i64 %len)
17 ; Likewise for strnlen.
21 ; CHECK: brasl %r14, strnlen
23 %res = call i64 @strnlen(i8 *%src, i64 %len) nobuiltin
Dstrlen-02.ll6 declare i32 @strnlen(i8 *%src, i32 %len)
25 ; Test strnlen with an i32-based prototype.
37 %res = call i32 @strnlen(i8 *%src, i32 %len)
Dstrlen-01.ll6 declare i64 @strnlen(i8 *%src, i64 %len)
25 ; Test strnlen with its proper i64 prototype.
37 %res = call i64 @strnlen(i8 *%src, i64 %len)
/external/compiler-rt/test/sanitizer_common/TestCases/
Dstrnlen.c7 assert(strnlen(s, 0) == 0UL); in main()
8 assert(strnlen(s, 1) == 1UL); in main()
9 assert(strnlen(s, 6) == strlen(s)); in main()
10 assert(strnlen(s, 7) == strlen(s)); in main()
/external/swiftshader/third_party/llvm-7.0/llvm/test/CodeGen/AMDGPU/
Dmem-builtins.ll8 declare i32 @strnlen(i8* nocapture, i32) #1
63 …rror: <unknown>:0:0: in function test_strnlen void (i8*, i32): unsupported call to function strnlen
65 ; GCN: s_add_u32 s{{[0-9]+}}, s{{[0-9]+}}, strnlen@rel32@lo+4
66 ; GCN: s_addc_u32 s{{[0-9]+}}, s{{[0-9]+}}, strnlen@rel32@hi+4
68 %res = call i32 @strnlen(i8* %src, i32 %size)
/external/llvm/test/Instrumentation/AddressSanitizer/
Dstr-nobuiltin.ll13 declare i64 @strnlen(i8* %a, i64 %b)
21 ; CHECK: call{{.*}}@strnlen{{.*}} #[[ATTR]]
31 tail call i64 @strnlen(i8* %a, i64 12)
/external/swiftshader/third_party/llvm-7.0/llvm/test/Instrumentation/MemorySanitizer/
Dstr-nobuiltin.ll13 declare i64 @strnlen(i8* %a, i64 %b)
21 ; CHECK: call{{.*}}@strnlen{{.*}} #[[ATTR]]
31 tail call i64 @strnlen(i8* %a, i64 12)
/external/swiftshader/third_party/llvm-7.0/llvm/test/Instrumentation/ThreadSanitizer/
Dstr-nobuiltin.ll13 declare i64 @strnlen(i8* %a, i64 %b) nounwind
21 ; CHECK: call{{.*}}@strnlen{{.*}} #[[ATTR]]
31 tail call i64 @strnlen(i8* %a, i64 12)
/external/llvm/test/Instrumentation/MemorySanitizer/
Dstr-nobuiltin.ll13 declare i64 @strnlen(i8* %a, i64 %b)
21 ; CHECK: call{{.*}}@strnlen{{.*}} #[[ATTR]]
31 tail call i64 @strnlen(i8* %a, i64 12)
/external/llvm/test/Instrumentation/ThreadSanitizer/
Dstr-nobuiltin.ll13 declare i64 @strnlen(i8* %a, i64 %b)
21 ; CHECK: call{{.*}}@strnlen{{.*}} #[[ATTR]]
31 tail call i64 @strnlen(i8* %a, i64 12)
/external/llvm/test/Instrumentation/EfficiencySanitizer/
Dstr-nobuiltin.ll13 declare i64 @strnlen(i8* %a, i64 %b)
21 ; CHECK: call{{.*}}@strnlen{{.*}} #[[ATTR]]
31 tail call i64 @strnlen(i8* %a, i64 12)
/external/swiftshader/third_party/llvm-7.0/llvm/test/Instrumentation/AddressSanitizer/
Dstr-nobuiltin.ll13 declare i64 @strnlen(i8* %a, i64 %b)
21 ; CHECK: call{{.*}}@strnlen{{.*}} #[[ATTR]]
31 tail call i64 @strnlen(i8* %a, i64 12)
/external/swiftshader/third_party/llvm-7.0/llvm/test/Instrumentation/EfficiencySanitizer/
Dstr-nobuiltin.ll13 declare i64 @strnlen(i8* %a, i64 %b)
21 ; CHECK: call{{.*}}@strnlen{{.*}} #[[ATTR]]
31 tail call i64 @strnlen(i8* %a, i64 12)
/external/e2fsprogs/misc/
De4defrag.c1066 !memcmp(file, lost_found_dir, strnlen(lost_found_dir, PATH_MAX))) { in file_statistic()
1245 strnlen(frag_rank[j - 1].msg_buffer, in file_statistic()
1259 strnlen(file, PATH_MAX)); in file_statistic()
1429 !memcmp(file, lost_found_dir, strnlen(lost_found_dir, PATH_MAX))) { in file_defrag()
1532 (int)strnlen(file, PATH_MAX), file); in file_defrag()
1756 strncpy(dev_name, argv[i], strnlen(argv[i], PATH_MAX)); in main()
1775 strncpy(dir_name, argv[i], strnlen(argv[i], PATH_MAX)); in main()
1828 mount_dir_len = strnlen(lost_found_dir, PATH_MAX); in main()
1831 PATH_MAX - strnlen(lost_found_dir, PATH_MAX)); in main()
1840 strnlen(lost_found_dir, in main()
[all …]
/external/compiler-rt/lib/asan/tests/
Dasan_str_test.cc115 Ident(strnlen(str - 1, 0)); in TEST()
116 Ident(strnlen(str, size)); in TEST()
117 Ident(strnlen(str + size - 1, 1)); in TEST()
119 Ident(strnlen(str, 2 * size)); in TEST()
121 EXPECT_DEATH(Ident(strnlen(str - 1, 1)), LeftOOBReadMessage(1)); in TEST()
122 EXPECT_DEATH(Ident(strnlen(str + size, 1)), RightOOBReadMessage(0)); in TEST()
125 EXPECT_DEATH(Ident(strnlen(str, size + 1)), RightOOBReadMessage(0)); in TEST()
/external/strace/tests/
Dprint_quoted_string.c27 const size_t len = strnlen(instr, size); in print_quoted_cstring()
39 const size_t len = strnlen(instr, size); in print_quoted_stringn()
/external/strace/tests-m32/
Dprint_quoted_string.c27 const size_t len = strnlen(instr, size); in print_quoted_cstring()
39 const size_t len = strnlen(instr, size); in print_quoted_stringn()
/external/strace/tests-mx32/
Dprint_quoted_string.c27 const size_t len = strnlen(instr, size); in print_quoted_cstring()
39 const size_t len = strnlen(instr, size); in print_quoted_stringn()
/external/e2fsprogs/lib/ext2fs/
Dsymlink.c44 #define strnlen(str, x) my_strnlen((str),(x)) macro
64 target_len = strnlen(target, fs->blocksize + 1); in ext2fs_symlink()
/external/Microsoft-GSL/tests/
Dstring_span_tests.cpp58 auto strnlen(const CharT* s, std::size_t n) in strnlen() function
986 CHECK(generic::strnlen(zspan.assume_z(), 1) == 0);
1007 CHECK(generic::strnlen(str, 10) == 3);
1042 CHECK(generic::strnlen(zspan.assume_z(), 1) == 0);
1063 CHECK(generic::strnlen(str, 10) == 3);
1098 CHECK(generic::strnlen(zspan.assume_z(), 1) == 0);
1119 CHECK(generic::strnlen(str, 10) == 3);

12345