This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/69624] sanitize-coverage=trace-pc miscompiles kernel
- From: "jirislaby at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 02 Feb 2016 15:04:07 +0000
- Subject: [Bug c/69624] sanitize-coverage=trace-pc miscompiles kernel
- Auto-submitted: auto-generated
- References: <bug-69624-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69624
--- Comment #11 from Jiri Slaby <jirislaby at gmail dot com> ---
(In reply to Jakub Jelinek from comment #10)
> If you are calling a function (__sw_hweight32) without letting gcc know you
> do that, are you sure that function call does not modify any registers other
> than "flags" and "rax"?
Not at all, I suppose. See attachment #37552. __sw_hweight32 changes only
retval (rax) and parameter (rdi).
But __sw_hweight32 proper is as well instrumented by the coverage hook. And it
changes whatever...
In any way, what is the proper way of annotating asm() directive when there is
a call inside?