[llvm-dev] bpf compilation using clang (original) (raw)
Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 24 05:53:16 PDT 2018
- Previous message: [llvm-dev] bpf compilation using clang
- Next message: [llvm-dev] bpf compilation using clang
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 13 Sep 2018 at 10:58, Sameeh Jubran via llvm-dev <llvm-dev at lists.llvm.org> wrote:
I am not sure how to debug this error since the instructions are in binary and the precompiled source code doesn't seem to contain any weird loops or goto instructions...
Is there a way to identify which line of source code is causing these errors?
First step would be to look at the assembly and try to work out what instructions 363 and 364 are. If you add "-S" to the clang command-line it should get you some assembly. With luck the problem will be around line "363 + header rubbish" and there will be an obvious pair of instructions where the earlier one refers to the result of a later one; with even more luck it'll be easy to map those instructions back to your source (though it's probably an LLVM bug to produce them in the first place).
If you send files reproducing the issue here people will have more information to give you advice.
and then were translated to bpf instructions using the BPFCparser tool
You seem to be the only person on the internet to have mentioned this tool. If it's mangling the instruction stream it's also a candidate for introducing bugs.
Cheers.
Tim.
- Previous message: [llvm-dev] bpf compilation using clang
- Next message: [llvm-dev] bpf compilation using clang
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]