This flag causes the compiler to emit bit set entries for functions as well
as runtime bitset checks at indirect call sites. Depends on the new function
bitset mechanism.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
This seems to have a lot of overlap with the function sanitizer. The documentation would probably benefit from some advice about when to use each and how they compare.
lib/AST/ItaniumMangle.cpp | ||
---|---|---|
4119–4126 ↗ | (On Diff #31568) | :( Making up a name here seems like it should not be necessary. Could you use a named metadata node with no name as the key for your bitset? (Weird as it is, that seems to be our representation for "internal linkage" metadata.) |
Comment Actions
- Create distinct MDNodes for types with internal linkage; replace custom bit set mangling with mangleTypeName throughout
- Add documentation explaining the difference between this and -fsanitize=function
Comment Actions
The documentation would probably benefit from some advice about when to use each and how they compare.
Added.
lib/AST/ItaniumMangle.cpp | ||
---|---|---|
4119–4126 ↗ | (On Diff #31568) | Done. This also required some improvements to the bitset lowering pass (D11857) to permit non-string bitset identifiers. |
docs/ControlFlowIntegrity.rst | ||
---|---|---|
149 ↗ | (On Diff #32179) | mention that LTO is require explicitly? |
Comment Actions
LGTM with a nit
test/CodeGen/cfi-icall.c | ||
---|---|---|
1 ↗ | (On Diff #33175) | Add a comment explaining what we are testing here. |
test/CodeGen/cfi-icall.c | ||
---|---|---|
1 ↗ | (On Diff #33175) | Done |