Commit 73e8110
Move LIBC_CONF_STRING_UNSAFE_WIDE_READ to top-level libc-configuration (llvm#165046)
This options sets a compile option when building sources inside the
string directory, and this option affects string_utils.h. But
string_utils.h is #included from more places than just the string
directory (such as from __support/CPP/string.h), leading to both
narrow-reads in those cases, but more seriously, ODR violations when the
two different string_length implementations are included int he same
program.
Having this option at the top level avoids this problem.1 parent e2b420d commit 73e8110
File tree
2 files changed
+8
-11
lines changed- libc
- cmake/modules
- src/string
2 files changed
+8
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
84 | 92 | | |
85 | 93 | | |
86 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | 3 | | |
14 | 4 | | |
15 | 5 | | |
| |||
24 | 14 | | |
25 | 15 | | |
26 | 16 | | |
27 | | - | |
28 | 17 | | |
29 | 18 | | |
30 | 19 | | |
| |||
0 commit comments