Avoid crashing when printing diagnostics for vtable-related CFI
errors. In diagnostic mode, the frontend does an additional check of
the vtable pointer against the set of all known vtable addresses and
lets the runtime handler know if it is safe to inspect the vtable.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This regresses the case where the target vtable is uninstrumented. Please add a test case showing that we at least print the name of the module in that case.
test/cfi/cross-dso/target_out_of_bounds.cpp | ||
---|---|---|
42 | Okay, I see. Please give the variables better names to make this code less confusing. Same for the other block. Please also change the loops to just an assignment of the vtable pointer. |
LGTM with nit
test/cfi/target_uninstrumented.cpp | ||
---|---|---|
35 | Shouldn't you check specifically that the name matches the DSO name? Maybe have your test output to %T/target-uninstrumented.so and have this match against that? |
test/cfi/target_uninstrumented.cpp | ||
---|---|---|
35 | %T gives you a directory name so you can just have your test output to a subpath of that like in my example and you won't have any of the tmp stuff in your path name. |
Why not just memset(p, 0, sizeof(A));?