[PATCH] D149058: [BPF][DebugInfo] Use .BPF.ext for line info when DWARF is not available
Eduard Zingerman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 14:58:45 PDT 2023
eddyz87 added a comment.
Hi @MaskRay,
Sorry, I was away from the PC. Thank you for committing the fix, I will update the unit test to execute in both big and little endian.
However, it looks like there is one more issue, as reported here <https://lab.llvm.org/buildbot/#/builders/5/builds/35040> for address sanitizer:
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from BTFParserTest
[ RUN ] BTFParserTest.simpleCorrectInput
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/unittests/DebugInfo/BTF/BTFParserTest.cpp:141:33: runtime error: upcast of misaligned address 0x7facce60411f for type 'llvm::SmallString<0>', which requires 8 byte alignment
0x7facce60411f: note: pointer points here
64 00 00 00 37 41 60 ce ac 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/unittests/DebugInfo/BTF/BTFParserTest.cpp:141:33 in
Probably because of the attribute "packed" used for too many things:
c++
#pragma pack(push, 1)
struct MockData1 {
struct B {
...
} BTF;
struct E {
...
} Ext;
int BTFSectionLen = sizeof(BTF);
int ExtSectionLen = sizeof(Ext);
SmallString<0> Storage;
std::unique_ptr<ObjectFile> Obj;
}
#pragma pack(pop)
Look like access to unaligned pointers in Storage/Obj causes error on S390.
If so, #pragma directives should be pushed invards to apply only to `B` and ``E.
I'm not sure what is the best course of action here:
- revert commit and try to test locally (not sure if I can reproduce in on x86, might try QEMU)
- push another fix and hope for the best
Do you have any suggestions?
By the way, I have committer rights, so I can handle this cleanup.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149058/new/
https://reviews.llvm.org/D149058
More information about the llvm-commits
mailing list