-
Notifications
You must be signed in to change notification settings - Fork 122
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
experimental: refactor to simplify and compartmentalise #454
Conversation
This fixes bugs happening when the relative path is used Signed-off-by: David Korczynski <[email protected]>
Signed-off-by: David Korczynski <[email protected]>
Signed-off-by: David Korczynski <[email protected]>
Signed-off-by: David Korczynski <[email protected]>
Signed-off-by: David Korczynski <[email protected]>
Signed-off-by: David Korczynski <[email protected]>
Signed-off-by: David Korczynski <[email protected]>
Signed-off-by: David Korczynski <[email protected]>
Signed-off-by: David Korczynski <[email protected]>
Signed-off-by: David Korczynski <[email protected]>
/gcbrun skip |
Signed-off-by: David Korczynski <[email protected]>
Signed-off-by: David Korczynski <[email protected]>
/gcbrun skip |
Signed-off-by: David Korczynski <[email protected]>
self.build_suggestion: AutoBuildContainer = build_suggestion | ||
self.build_script: str = '' | ||
self.build_directory: str = '' | ||
self.executable_files_build: Dict[str, List[str]] = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: dict[str, list[str]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't -- this code runs in the oss-fuzz base images which relies on Python 3.8 and the typing is a Python3.9+ thing (see initial PR comment)
all_build_scripts: List[Tuple[str, str, AutoBuildContainer]], | ||
initial_executable_files: Dict[str, List[str]]) -> Dict[str, Any]: | ||
all_build_scripts: List[Tuple[str, str, AutoBuildContainer]] | ||
) -> Dict[str, BuildWorker]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: list[tuple[str, str, AutoBuildContainer]]
, dict[str, BuildWorker]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't -- this code runs in the oss-fuzz base images which relies on Python 3.8 and the typing is a Python3.9+ thing (see initial PR comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I see. thanks!
experimental/c-cpp/manager.py
Outdated
|
||
The harness should be in libFuzzer style, with the code wrapped in `int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)`. | ||
|
||
Please wrap all code in <code> tags and you should include nothing else but the code in your reply. Do not include any other text. | ||
|
||
Make sure the ensure strings passed to the target are null-terminated. | ||
|
||
There is one rule that your harness must satisfy: all of the header files in this library is %s. Make sure to not include any header files not in this list. | ||
There is one rule that your harness must satisfy: all of the header files in this library is {str(headers_to_include)}. Make sure to not include any header files not in this list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same above
Do we need to cast headers_to_include explicitly with str()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, could this be in a template file in the final version?
Also, could we define repeated lines once and reuse them to avoid repetitions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same above Do we need to cast headers_to_include explicitly with str()?
We don't! thanks, fixed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, could this be in a template file in the final version? Also, could we define repeated lines once and reuse them to avoid repetitions?
Yep, I'll look at doing this when merging the two #450 -- for the moment it's nice to have this in a single module as it makes for easy copying in/out of the containers as some development of this module happens within base-builder container environments. I will address this later though.
Signed-off-by: David Korczynski <[email protected]>
/gcbrun skip |
Refactors the from-scratch logic by:
Note, in the
manager
andbuild_generator
we can't remove the use ofList
andDict
since it relies on the Python from OSS-Fuzz, which hasn't migrated tolist
anddict
yet.This is working towards #450