all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hilton Chain via Guix-patches via <guix-patches@gnu.org>
To: 62666@debbugs.gnu.org
Cc: Hilton Chain <hako@ultrarare.space>,
	Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>,
	Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>,
	Hilton Chain <hako@ultrarare.space>
Subject: [bug#62666] [PATCH v3] gnu: Add aflplusplus.
Date: Mon,  8 Jan 2024 16:19:00 +0800	[thread overview]
Message-ID: <c6acc69244a24083c12c2fdaec5dd2448fd07b63.1704701633.git.hako@ultrarare.space> (raw)
In-Reply-To: <20230404174449.5297-1-GNUtoo@cyberdimension.org>

From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>

* gnu/packages/debug.scm (aflplusplus): New variable.

Change-Id: Ibda36187e839d5f533d461444db25a7ba5567f0f
Modified-by: Hilton Chain <hako@ultrarare.space>
---

Hi Denis,

Aplogies for the long delay...

I have adjusted the phases for proper cross-compilation support and updated the
package to the latest version.

I'm sending out v3 mainly for QA purpose, I'll push it if there's no further
issue.

Thanks

gnu/packages/debug.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 5a528c7a28..6d4567acc4 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -50,6 +50,7 @@ (define-module (gnu packages debug)
   #:use-module (gnu packages code)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages gdb)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
@@ -59,6 +60,7 @@ (define-module (gnu packages debug)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
+  #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages ninja)
   #:use-module (gnu packages perl)
@@ -459,6 +461,59 @@ (define-public qemu-for-american-fuzzy-lop
     ;; Several tests fail on MIPS.
     (supported-systems (delete "mips64el-linux" %supported-systems))))))

+(define-public aflplusplus
+  (package
+    (inherit american-fuzzy-lop)
+    (name "aflplusplus")
+    (version "4.09c")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/AFLplusplus/AFLplusplus")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "12bplpd8cifla6m9l130fd22ggzkhd1w5s1aifw1idpy3njhj129"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments american-fuzzy-lop)
+       ((#:make-flags _ ''())
+        #~(list (string-append "PREFIX=" #$output)
+                (string-append "DOC_PATH=" #$output "/share/doc/"
+                               #$(package-name this-package) "-"
+                               #$(package-version this-package))
+                (string-append "CC=" #$(cc-for-target))))
+       ((#:phases phases '%standard-phases)
+        #~(modify-phases #$phases
+            ;; For GCC plugins.
+            (add-after 'unpack 'patch-gcc-path
+              (lambda* (#:key inputs #:allow-other-keys)
+                (substitute* "src/afl-cc.c"
+                  (("alt_cc = \"gcc\";")
+                   (format #f "alt_cc = \"~a\";"
+                           (search-input-file inputs "bin/gcc")))
+                  (("alt_cxx = \"g\\+\\+\";")
+                   (format #f "alt_cxx = \"~a\";"
+                           (search-input-file inputs "bin/g++"))))))))))
+    ;; According to the Dockerfile, GCC 12 is producing compile errors for some
+    ;; targets, so explicitly use GCC 11 here.
+    (inputs (list gcc-11 gmp python qemu))
+    (native-inputs (list gcc-11))
+    (home-page "https://aflplus.plus/")
+    (description
+     "AFLplusplus is a security-oriented fuzzer that employs a novel type of
+compile-time instrumentation and genetic algorithms to automatically discover
+clean, interesting test cases that trigger new internal states in the targeted
+binary.  This substantially improves the functional coverage for the fuzzed
+code.  The compact synthesized corpora produced by the tool are also useful for
+seeding other, more labor- or resource-intensive testing regimes down the road.
+It is a fork of American Fuzzy Lop fuzzer and features:
+@itemize
+@item A more recent qemu version.
+@item More algorithms like collision-free coverage, enhanced laf-intel &
+redqueen, AFLfast++ power schedules, MOpt mutators, unicorn_mode, etc.
+@end itemize")))
+
 (define-public stress-make
   (let ((commit "97815bed8060de33952475b3498767c91f59ffd9")
         (revision "2"))                 ;No official source distribution

base-commit: 3de361d9c9d320aefbd43710124d7b07af891de1
--
2.41.0




  parent reply	other threads:[~2024-01-08  8:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04 17:44 [bug#62666] [PATCH 0/2] Add aflplusplus Denis 'GNUtoo' Carikli
2023-04-05  1:29 ` [bug#62666] [PATCH 1/2] gnu: " Denis 'GNUtoo' Carikli
2023-04-05  1:29   ` [bug#62666] [PATCH 2/2] gnu: aflplusplus: Add python support Denis 'GNUtoo' Carikli
2023-08-23  2:34 ` [bug#62666] [PATCH 0/2] Add aflplusplus Hilton Chain via Guix-patches via
2023-09-15  3:25   ` Denis 'GNUtoo' Carikli
2023-11-23 16:56 ` [bug#62666] (no subject) Denis 'GNUtoo' Carikli
2024-01-08  8:19 ` Hilton Chain via Guix-patches via [this message]
2024-01-24  0:09   ` [bug#62666] [PATCH v3] gnu: Add aflplusplus Denis 'GNUtoo' Carikli
2024-01-25 16:35     ` bug#62666: " Hilton Chain via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c6acc69244a24083c12c2fdaec5dd2448fd07b63.1704701633.git.hako@ultrarare.space \
    --to=guix-patches@gnu.org \
    --cc=62666@debbugs.gnu.org \
    --cc=GNUtoo@cyberdimension.org \
    --cc=hako@ultrarare.space \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.