Skip to content
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

Fighting with ini configuration #25

Open
dsmic opened this issue Feb 16, 2020 · 2 comments
Open

Fighting with ini configuration #25

dsmic opened this issue Feb 16, 2020 · 2 comments

Comments

@dsmic
Copy link

dsmic commented Feb 16, 2020

I do have a fuzzer=fuzzinator.fuzzer.RandomContent working, and I also were able to run half of a fuzzer with grammar:

grammarinator is called, but my SUT not. Help would be great :)

[sut.jerry]
call=fuzzinator.call.SubprocessCall
#call.decorate(0)=fuzzinator.call.ExitCodeFilter
#call.decorate(11)=fuzzinator.call.FileReaderDecorator

[sut.jerry.call]
command=/media/detlef/Fast/KALI/fuzzer/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js
#command=/media/detlef/Fast/KALI/fuzzer/ASTFuzz/a.out

cwd=.

# Parameter section for ExitCodeFilter.
[sut.jerry.call.decorate(0)]
exit_codes=[3]

[fuzz.jerryscript-grammarinator]
sut=sut.jerry
fuzzer=fuzzinator.fuzzer.SubprocessRunner

[fuzz.jerryscript-grammarinator.fuzzer.init]
outdir=./jerryscript/grammarinator/{uid}/
command=grammarinator-generate
        --unlexer=./ecma_unparser/ECMAScriptUnlexer.py
        --unparser=./ecma_unparser/ECMAScriptUnparser.py
        --max-depth=20
        --out=./fuzzgrammar/%d.js
        -n=100
        --population=./pop
        --tree-transformers=grammarinator.runtime.simple_space_transformer
contents=False

# Test cases are defined here as file paths but they should be saved as content.
[sut.jerryscript]
call.decorate(11)=fuzzinator.call.FileReaderDecorator
@renatahodovan
Copy link
Owner

At the first sight it seems that the config of jerryscript-grammarinator references the sut in the old format (sut.jerry). Now, it's enough (actually mandatory) to reference it as jerry.

[fuzz.jerryscript-grammarinator]
sut=jerry
fuzzer=fuzzinator.fuzzer.SubprocessRunner

One more note: since you use relative references in the grammarinator command, you should define the working directory as well (cwd=... in the [fuzz.jerryscript-grammarinator.fuzzer.init] section).

Please let me know if it solved the generation.

@dsmic
Copy link
Author

dsmic commented Feb 16, 2020

Thanks: I come closer.
I did not install from github but with pip: in the pip version sut.jerry was necessary.
Installing both from github results in different versions of
antlerinator==4.7.1-1 needed.

Now I have fuzzinator from github (supports jerry without sut) and gramminator from pip :)

[sut.jerry]
call=fuzzinator.call.StdinSubprocessCall
#call.decorate(0)=fuzzinator.call.ExitCodeFilter
#call.decorate(11)=fuzzinator.call.FileReaderDecorator
call.decorate(1)=fuzzinator.call.UniqueIdDecorator

[sut.jerry.call]
command=/media/detlef/Fast/KALI/fuzzer/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js -
#command=/media/detlef/Fast/KALI/fuzzer/ASTFuzz/a.out

cwd=/media/detlef/Fast/KALI/fuzzer/grammar/

# Parameter section for ExitCodeFilter.
[sut.jerry.call.decorate(0)]
exit_codes=[3]

[fuzz.jerryscript-gg]
sut=jerry
fuzzer=fuzzinator.fuzzer.SubprocessRunner
batch=100

[fuzz.jerryscript-gg.fuzzer.init]
sut=jerry
cwd=/media/detlef/Fast/KALI/fuzzer/grammar/
outdir=./fuzzgrammar/{uid}/
command=grammarinator-generate --unlexer=./ecma_unparser/ECMAScriptUnlexer.py --unparser=./ecma_unparser/ECMAScriptUnparser.py --max-depth=20 --out=./fuzzgrammar/{uid}/%d.js -n=100 --tree-transformers=grammarinator.runtime.simple_space_transformer 
#--population=./pop 
#contents=False

# UniqueIdDecorator
[sut.jerry.call.decorate(1)]
properties=["type", "condition", "path"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants