[Lldb-commits] [PATCH] D51566: Add a relocation to ObjectFileELF::ApplyRelocations and a test
Davide Italiano via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 6 09:16:42 PST 2018
davide added a comment.
In https://reviews.llvm.org/D51566#1288792, @davide wrote:
> @lanza Hey Nathan, it looks like your test exposed an UB in `ELFObjectFileReader`. May I ask you to take a look?
>
> - TEST 'lldb-Unit :: ObjectFile/ELF/./ObjectFileELFTests/ObjectFileELFTest.TestAARCH64Relocations' FAILED ******************** Note: Google Test filter = ObjectFileELFTest.TestAARCH64Relocations [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from ObjectFileELFTest [ RUN ] ObjectFileELFTest.TestAARCH64Relocations /Users/buildslave/jenkins/workspace/lldb-sanitized/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:2741:11: runtime error: store to misaligned address 0x61f000001526 for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment 0x61f000001526: note: pointer points here 00 00 04 00 00 00 00 00 08 01 00 00 00 00 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/buildslave/jenkins/workspace/lldb-sanitized/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:2741:11 in
In https://reviews.llvm.org/D51566#1288792, @davide wrote:
> @lanza Hey Nathan, it looks like your test exposed an UB in `ELFObjectFileReader`. May I ask you to take a look?
>
> ******************** TEST 'lldb-Unit :: ObjectFile/ELF/./ObjectFileELFTests/ObjectFileELFTest.TestAARCH64Relocations' FAILED ********************
> Note: Google Test filter = ObjectFileELFTest.TestAARCH64Relocations
> [==========] Running 1 test from 1 test case.
> [----------] Global test environment set-up.
> [----------] 1 test from ObjectFileELFTest
> [ RUN ] ObjectFileELFTest.TestAARCH64Relocations
> /Users/buildslave/jenkins/workspace/lldb-sanitized/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:2741:11: runtime error: store to misaligned address 0x61f000001526 for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment
> 0x61f000001526: note: pointer points here
> 00 00 04 00 00 00 00 00 08 01 00 00 00 00 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> ^
> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/buildslave/jenkins/workspace/lldb-sanitized/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:2741:11 in
>
>
Went ahead and fixed this in r346244. A post commit review would be appreciated.
-
Davide
Repository:
rLLDB LLDB
https://reviews.llvm.org/D51566
More information about the lldb-commits
mailing list