https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90865

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to sshannin from comment #2)
> Thanks for such a quick reply.  I just wanted to make sure I'm understanding
> you correctly about what you mean when you say this is expected.
> 
> Are you indicating that it's desirable that the ubsan instrumentation is
> visible to gcov and thus shows up as coverage gaps?

No, it's not desirable, but the current gcov can't distinguish between read
code and the instrumented one.

> That seems to be what
> you're indicating, but seems surprising to me, as it roughly makes the gcov
> output useless.
> 
> Certainly I'm not trying to get coverage about code that the compiler
> inserted as an implementation detail of checking division. Is there way to
> mark the ubsan-generated code as such so that gcov ignores it instead of
> marking every division operation as having an uncovered branch?

No, please do not combine UBSAN and GCOV. Use the separately.

Reply via email to