tarpaulin icon indicating copy to clipboard operation
tarpaulin copied to clipboard

Non-fatal signals treated as fatal

Open dfoxfranke opened this issue 11 months ago • 3 comments

I'm trying to use tarpaulin to get a coverage report for my crate hw-exception. This crate is designed for, among other things, handling and recovering from segfaults. Unsurprisingly, it has tests which segfault, and then recover. Tarpaulin, however, panics as soon as ptrace notifies it of the segfault, without seeing whether the program being traced is going to handle the signal. It is therefore unable to give me a useful coverage report.

dfoxfranke avatar Sep 21 '23 01:09 dfoxfranke

If you run with --engine=llvm you may circumvent a lot of complexity with handling signals. Provided this isn't another edge case llvm coverage fails to handle.

xd009642 avatar Sep 21 '23 06:09 xd009642

Thanks, that did the job. Feel free to close this issue or to leave it open if you care to address the ptrace engine.

dfoxfranke avatar Sep 21 '23 13:09 dfoxfranke

Good to hear :+1:

I'll keep it open for now to remind me to investigate, if it proves too tricky to do with ptrace I'll close it later on as a won't fix and just recommend people use --engine llvm

xd009642 avatar Sep 21 '23 13:09 xd009642