New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add frontend for fuzzing #610

Merged
merged 3 commits into from Jan 12, 2017

Conversation

Projects
None yet
3 participants
@josephbisch
Member

josephbisch commented Jan 8, 2017

Use the following configure command:

$ ./configure --with-fuzzer --with-fuzzer-lib=/path/to/libFuzzer.a
CC=clang CXX=clang++

Places an irssi-fuzz in src/fe-fuzz/ after build.

Also can specify SANFLAGS to override the chosen sanitizer flags
(defaults to "-g -fsanitize=address -fsanitize-coverage=trace-pc-guard").

Add frontend for fuzzing
Use the following configure command:

$ ./configure --with-fuzzer --with-fuzzer-lib=/path/to/libFuzzer.a \
      CC=clang CXX=clang++

Places an irssi-fuzz in src/fe-fuzz/ after build.

Also can specify SANFLAGS to override the chosen sanitizer flags
(defaults to "-g -fsanitize=address -fsanitize-coverage=trace-pc-guard").
Show outdated Hide outdated src/fe-fuzz/module-formats.c
@@ -0,0 +1,82 @@
/*

This comment has been minimized.

@ailin-nemui

ailin-nemui Jan 9, 2017

Contributor

I wonder if we could #include the other formats instead of having top copy*paste?

@ailin-nemui

ailin-nemui Jan 9, 2017

Contributor

I wonder if we could #include the other formats instead of having top copy*paste?

@ahf

Awesome work - some small nits, then I think we should get it in for iteration!

Show outdated Hide outdated configure.ac
@@ -611,6 +650,7 @@ echo
echo "Building text frontend ........... : $want_textui"
echo "Building irssi bot ............... : $want_irssibot"
echo "Building irssi fuzzer ............ : $want_irssifuzzer"

This comment has been minimized.

@ahf

ahf Jan 12, 2017

Member

I think this is a slightly internal thing, so I don't think we should "confuse" the average user by making them wonder what "irssi fuzzer" is if they give compiling irssi for themselves a try.

@ahf

ahf Jan 12, 2017

Member

I think this is a slightly internal thing, so I don't think we should "confuse" the average user by making them wonder what "irssi fuzzer" is if they give compiling irssi for themselves a try.

bin_PROGRAMS = irssi-fuzz
# Force link with clang++ for libfuzzer support
CCLD=clang++ $(CXXFLAGS)

This comment has been minimized.

@ahf

ahf Jan 12, 2017

Member

Probably do a check if clang++ is available if fuzzing is enabled in configure.ac?

@ahf

ahf Jan 12, 2017

Member

Probably do a check if clang++ is available if fuzzing is enabled in configure.ac?

Show outdated Hide outdated src/fe-fuzz/irssi.c
#include "args.h"
#include "printtext.h"
#include <stdbool.h>

This comment has been minimized.

@ahf

ahf Jan 12, 2017

Member

Is this needed? It's a C99 feature and I don't think we build irssi as a C99 application right now - we might, but I'm not sure.

@ahf

ahf Jan 12, 2017

Member

Is this needed? It's a C99 feature and I don't think we build irssi as a C99 application right now - we might, but I'm not sure.

@josephbisch

This comment has been minimized.

Show comment
Hide comment
@josephbisch

josephbisch Jan 12, 2017

Member

Okay, fixed nits other than clang++ check.

Let me know if I should squash commits.

Member

josephbisch commented Jan 12, 2017

Okay, fixed nits other than clang++ check.

Let me know if I should squash commits.

@ahf

This comment has been minimized.

Show comment
Hide comment
@ahf

ahf Jan 12, 2017

Member

LGTM.

Member

ahf commented Jan 12, 2017

LGTM.

@ahf ahf merged commit 7732bbe into irssi:master Jan 12, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment