This updates the elf-invalid-versioning.test test case:
makes a cleanup, adds llvm-readobj calls and fixes 2
crash/assert issues I've found (test cases are provided).
Details
Diff Detail
Event Timeline
llvm/test/tools/llvm-readobj/elf-invalid-versioning.test | ||
---|---|---|
154 ↗ | (On Diff #226627) | I found it slightly hard to parse this last sentence. Perhaps change != 0 to non-zero. |
llvm/tools/llvm-readobj/ELFDumper.cpp | ||
671 ↗ | (On Diff #226627) | This and the other errors here shouldn't use report_fatal_error. They should use reportError or similar. I'm okay with that being a separate change, but perhaps it should be first to avoid adding another bad usage. The message could include more context, for example giving the offset or similar, so that a user might be able to identify the bad entry. |
3927–3928 ↗ | (On Diff #226627) | You probably need a test case for vn_file > StringTable.size() (but the string table exists) and vn_file == StringTable.size(). |
3941–3943 ↗ | (On Diff #226627) | You probably need a test case for vna_name == StringTable.size(). |
5720–5723 ↗ | (On Diff #226627) | Same comment as GNU style. |
5735–5738 ↗ | (On Diff #226627) | Same comment as GNU style. |
- Addressed review comments.
llvm/tools/llvm-readobj/ELFDumper.cpp | ||
---|---|---|
671 ↗ | (On Diff #226627) | I've used reportError here instead of report_fatal_error and updated the test case accordingly. |
3927–3928 ↗ | (On Diff #226627) | It had an issue when vn_file == StringTable.size(). I've fixed the condition. |
Looks good to me, aside from some minor comments.
llvm/test/tools/llvm-readobj/elf-invalid-versioning.test | ||
---|---|---|
195 ↗ | (On Diff #227095) | "with the .gnu.version_r section." |