[llvm-bugs] [Bug 39531] New: KCOV broke when LTO enabled: inlinable function call in a function with debug info must have a !dbg location

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Nov 1 23:37:30 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=39531

            Bug ID: 39531
           Summary: KCOV broke when LTO enabled: inlinable function call
                    in a function with debug info must have a !dbg
                    location
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: dcoughlin at apple.com
          Reporter: joeyjiaojg at 163.com
                CC: dcoughlin at apple.com, llvm-bugs at lists.llvm.org

Created attachment 21069
  --> https://bugs.llvm.org/attachment.cgi?id=21069&action=edit
IR for kcov.c which contains __sanitizer_cov_trace_pc

When I'm building linux kernel with clang and LTO enabled for CONFIG_KOV=y, I'm
facing below error: (I added --verbose to ld in order to show where it stopped)

The make failed at ld stage inside kernel/script/link-vmlinux.sh:  ${LD}
--verbose ${LDFLAGS} -r -o ${1} $(modversions) ${objects}


==Build Log==
aarch64-linux-android-ld.gold: Closed descriptor 11 for
"net/ipc_router/ipc_router_socket.o"
aarch64-linux-android-ld.gold: Opened new descriptor 12 for
"net/ipc_router/ipc_router_security.o"
aarch64-linux-android-ld.gold: Attempt to open
net/ipc_router/ipc_router_security.o succeeded
aarch64-linux-android-ld.gold: Unlocking file
"net/ipc_router/ipc_router_security.o"
aarch64-linux-android-ld.gold: Released descriptor 12 for
"net/ipc_router/ipc_router_security.o"
inlinable function call in a function with debug info must have a !dbg location
  call void @__sanitizer_cov_trace_pc()
inlinable function call in a function with debug info must have a !dbg location
  call void @__sanitizer_cov_trace_pc()
inlinable function call in a function with debug info must have a !dbg location
  call void @__sanitizer_cov_trace_pc()
inlinable function call in a function with debug info must have a !dbg location
  call void @__sanitizer_cov_trace_pc()
inlinable function call in a function with debug info must have a !dbg location
  call void @__sanitizer_cov_trace_pc()
inlinable function call in a function with debug info must have a !dbg location
  call void @__sanitizer_cov_trace_pc()
LLVM ERROR: Broken module found, compilation aborted!
make[1]: *** [vmlinux] Error 1
make[1]: Leaving directory
`/local/mnt/workspace/jiangenj/la/asan/out/target/product/msm8953_64/obj/kernel/msm-4.9'
make: *** [sub-make] Error 2
make: Leaving directory `/local/mnt/workspace/jiangenj/la/asan/kernel/msm-4.9'
ninja: build stopped: subcommand failed.
16:18:10 ninja failed with: exit status 1


Can you help me understand what the issue is actually and how to fix?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181102/aac5bdc7/attachment-0001.html>


More information about the llvm-bugs mailing list