GCC 12 no longer understands -fsanitize-coverage=trace-pc,trace-cmp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



honggfuzz fails to build in Rawhide with:

  + hfuzz_cc/hfuzz-gcc hello.c -o hello
  gcc: error: unrecognized argument in option '-fsanitize-coverage=trace-pc,trace-cmp'
  gcc: note: valid arguments to '-fsanitize-coverage=' are: trace-cmp trace-pc

Note the flag is added by honggfuzz itself when it instruments a
binary:

  https://github.com/google/honggfuzz/blob/876ff411938b1ab911c213bf640e2696e7ebd695/hfuzz_cc/hfuzz-cc.c#L375

This worked with older GCC.  It also works if I patch honggfuzz like this:

diff --git a/hfuzz_cc/hfuzz-cc.c b/hfuzz_cc/hfuzz-cc.c
index 63322862..8372ca0e 100644
--- a/hfuzz_cc/hfuzz-cc.c
+++ b/hfuzz_cc/hfuzz-cc.c
@@ -372,7 +372,8 @@ static void commonPostOpts(int* j, char** args) {
             args[(*j)++] = "-fsanitize-coverage=trace-pc";
         } else {
             /* gcc-8+ offers trace-cmp as well, but it's not that widely used yet */
-            args[(*j)++] = "-fsanitize-coverage=trace-pc,trace-cmp";
+            args[(*j)++] = "-fsanitize-coverage=trace-cmp";
+            args[(*j)++] = "-fsanitize-coverage=trace-pc";
         }
     } else {
         if (usePCGuard) {

Is this a problem with GCC 12 and parameter parsing?  Or is using both
flags wrong in some way?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux