]> sourceware.org Git - annobin.git/commitdiff
annocheck: Also fail if -D_FORTIFY_SOURCE is present by -D_GLIBCXX_ASSERTIONS is...
authorNick Clifton <nickc@redhat.com>
Tue, 30 Apr 2019 14:35:28 +0000 (15:35 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 30 Apr 2019 14:35:28 +0000 (15:35 +0100)
annocheck/hardened.c

index e2d16b4d5c00e6c7fc4cc87ae7f819f21186acf7..b8b990361e43493889eb8c7c2e93a2f605c27c7c 100644 (file)
@@ -2588,6 +2588,12 @@ show_GLIBCXX_ASSERTIONS (annocheck_data * data, test * results)
          else
            maybe (data, "Some parts of the binary do not record whether -D_GLIBCXX_ASSERTIONS was used");
        }
+      /* If we know that we have seen -D_FORTIFY_SOURCE then we should also
+        have seen -D_GLIBCXX_ASSERTIONS.  Hence its absence is a failure.  */
+      else if (tests[TEST_FORTIFY].num_pass > 0)
+       {
+         fail (data, "The binary was compiled without -D_GLIBCXX_ASSERTIONS");
+       }
       else
        maybe (data, "The -D_GLIBCXX_ASSERTIONS option was not seen");
     }
This page took 0.028773 seconds and 5 git commands to generate.