bcc: Fix segmentation fault for LLVM 15
authorHengqi Chen <chenhengqi@outlook.com>
Sun, 24 Apr 2022 12:47:28 +0000 (12:47 +0000)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 22 Feb 2024 14:17:55 +0000 (15:17 +0100)
commit95bde0ceaca4485c4437183818ba59a524ce199f
tree2d150c1b5031b351edf4464100a89db950390696
parent7519dc83e35f731859ca1818cd4d764fa45ae06a
bcc: Fix segmentation fault for LLVM 15

When BCC is compiled with LLVM 15, running BCC tools will cause segfault.
The core dump reveals that the segfault is triggered by the calls to
`getPointerElementType()`. This is because LLVM is moving towards
`Opaque Pointer` ([0]). This commit follows the migration guide to fix
the issue.

  [0]: https://llvm.org/docs/OpaquePointers.html

Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
src/cc/bpf_module_rw_engine.cc