Commit 5405d02
fix: Spurious compiler error due to deep inlining (facebookincubator#16002)
Summary:
Ubuntu release build gives the following error due to GCC's spurious deep inlining optimization when inlining creation of StringViews :
```
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:33: error: ‘void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)’ writing 13 or more bytes into a region of size 12 overflows the destination [-Werror=stringop-overflow=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
```
This fixes it by letting the compiler know that its not possible to have length > 12 in the inlining case.
Fixes facebookincubator#15245
Differential Revision: D906208601 parent d11f8e4 commit 5405d02
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
95 | 104 | | |
| 105 | + | |
96 | 106 | | |
97 | 107 | | |
98 | 108 | | |
| |||
0 commit comments