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

Create an out-directory per sanitizer #1521

Closed
wants to merge 2 commits into from

Conversation

alex
Copy link
Contributor

@alex alex commented Jun 15, 2018

This makes it easier to work on multiple things concurrently (most notably running a fuzzer and profiling/coverage)

This makes it easier to work on multiple things concurrently (most notably running a fuzzer and profiling/coverage)
@alex
Copy link
Contributor Author

alex commented Jun 15, 2018

I tested a handful of commands by hand, but there's no automated tests so there exists the possibility of a regression

infra/helper.py Outdated
@@ -223,9 +226,9 @@ def _get_corpus_dir(project_name=''):
return os.path.join(BUILD_DIR, 'corpus', project_name)


def _get_output_dir(project_name=''):
def _get_output_dir(project_name='', sanitizer=''):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need engine as well.

/out/libpng/libfuzzer-msan
/out/libpng/afl-asan

@alex
Copy link
Contributor Author

alex commented Jun 15, 2018

Good point

@inferno-chromium
Copy link
Collaborator

ah! there is atleast one isssue, we would need to repeat --sanitizer and --engine in run_* commands in documentation. Will let @oliverchang evaluate this pull request if this makes sense or keeping just /out is better.

@alex
Copy link
Contributor Author

alex commented Jun 15, 2018

Yes, you need to pass the --sanitizer (and --engine) to anything that runs the binary, not just the build.

@oliverchang
Copy link
Collaborator

I think helper.py needs a refactor in general -- it has grown a lot than initially envisioned.

I'm thinking a more general fix to this would be to support custom working directorys. e.g. something that looks like this (inspired by chromium's GN):

# generates some metadata files and a symlink to helper.py
$ python infra/helper.py create_config --sanitizer=blah --engine=blah /path/to/build/dir

# /path/to/build/dir remembers the sanitizer and engine config. calling helper.py frmo
# that directory automatically sets them.
$ cd /path/to/build/dir
$ python helper.py build_image # and all other commands etc
$ python helper.py build_fuzzers # stores builds in /path/to/build/dir

@Dor1s
Copy link
Contributor

Dor1s commented Jun 21, 2019

This didn't have any updates in a year, closing.

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

Successfully merging this pull request may close these issues.

4 participants