-
Notifications
You must be signed in to change notification settings - Fork 138
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
Use error messages from jcc err.log in experiments #230
Draft
cjx10
wants to merge
34
commits into
main
Choose a base branch
from
get_err_from_errlog
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
c6f9ef7
extract target error block from err.log
cjx10 c5b9e41
check err.log in exp
cjx10 a79c973
skip DWARF error
cjx10 6b1567b
consider-using-enumerate
cjx10 2822643
skip clang diag last line
cjx10 a951227
fix err.log path
cjx10 9c2a01d
fix binary name
cjx10 b6a133e
add in all ld error lines
cjx10 8c72362
fix jcc error message extraction logic
cjx10 6442609
check end line as start line
cjx10 24ce372
use err.log errors
cjx10 3ddd9b8
give detail err.log path
cjx10 02d08d0
remove color code from lines
cjx10 f907c6d
extract lld errors
cjx10 3a32c0d
refine err.log parsing logic
cjx10 7d748b0
use build log errors when extracting from err.log failed
cjx10 89e8c67
correspond to changes made in jcc
cjx10 fb83573
linker pattern updated for clang-18
cjx10 4b92773
add clang output flag pattern
cjx10 dcab0e2
add target names to look for in command args
cjx10 d42f94d
extend clang error pattern to match with all compiler errors
cjx10 2092fa2
only parse output when needed
cjx10 cbc7ce9
consider only the last block produced by target but is unexpected error
cjx10 20d8a62
clang error pattern in grouping too
cjx10 cb4bee8
include end line for consistency
cjx10 fca048c
strip color code before checking lines
cjx10 e028792
linker error
cjx10 05af518
comment for extracting linker error from build log
cjx10 c02d7e9
update references to jcc.go
cjx10 df1091b
comments
cjx10 1656b4b
move linker error parsing to new branch
cjx10 be2ce1e
rename
cjx10 fd5868c
nits and refactor
cjx10 8f4e841
more restructure
cjx10 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is there a better solution than this?
I guess this intends to make parsing easier, but it may confuse us to think JCC created an empty file. We will have to search in gcloud logs to distinguish these two cases.
Could we check
os.path.isfile()
at the beginningextract_error_message()
instead?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.
Maybe add a magic string in err.log when err.log does not exist?
This solution is for local experiment, creating an empty file is currently consistent with the behaviour of getting the build log and run log. Might help prevent increasing the complexity of build_and_run() workflow?
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.
This can work but not preferred.
Intuitively, if
err.log
is not generated, then it should not exist.Where do we create empty build log and run logs when they do not exist?
Not sure if this relates, but I suppose this will only add two lines in
code_fixer
?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.
It's in cloud builder, we open the local file object before checking if the file blob on cloud exists
https://github.com/google/oss-fuzz-gen/blob/main/experiment/builder_runner.py#L645
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.
Ah, I see; let's keep it, then.
Thanks!