kcov icon indicating copy to clipboard operation
kcov copied to clipboard

Segfault on a haskell binary with DWARF and linked with --gc-sections

Open jberryman opened this issue 3 years ago • 2 comments

See https://github.com/google/bloaty/issues/329 which has an example.

This seems likely a problem with the binary, but thought I would open a ticket, as maybe you'd want a conditional check like bloaty is doing.

kcov /tmp/kcov3 /tmp/pandoc/dist-newstyle/build/x86_64-linux/ghc-9.2.5/pandoc-3.0/t/test-pandoc/build/test-pandoc/test-pandoc
kcov: Process exited with signal 11 (SIGSEGV) at 0xffffffffffffffff

jberryman avatar Nov 27 '22 00:11 jberryman

I'm investigating this a bit now, but have trouble reproducing it in a good way. I'm on a Mac, so reliant on a Docker image with Linux right now, which can't run this binary with or without kcov.

Does kcov --verify [...] help with this binary? I tried listing the breakpoint it sets, but doesn't see any obvious strange addresses (although there are lots of them, so might have missed something!)

SimonKagstrom avatar Dec 03 '22 13:12 SimonKagstrom

Hi, appreciate you looking into it!

I see:

❯ kcov --verify /tmp/kcov3 /tmp/pandoc/dist-newstyle/build/x86_64-linux/ghc-9.2.5/pandoc-3.0/t/test-pandoc/build/test-pandoc/test-pandoc
kcov: 411783 invalid breakpoints skipped in /tmp/pandoc/dist-newstyle/build/x86_64-linux/ghc-9.2.5/pandoc-3.0/t/test-pandoc/build/test-pandoc/test-pandoc
kcov: 1 invalid breakpoints skipped in /lib/x86_64-linux-gnu/libm.so.6
kcov: Process exited with signal 11 (SIGSEGV) at 0xffffffffffffffff

Let me know if thiere's something else I can help with

jberryman avatar Dec 03 '22 16:12 jberryman