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

Fix undefined reference #465

Merged
merged 18 commits into from
Jul 16, 2024
Merged

Fix undefined reference #465

merged 18 commits into from
Jul 16, 2024

Conversation

DonggeLiu
Copy link
Collaborator

@DonggeLiu DonggeLiu commented Jul 11, 2024

  1. Add the header file of the function-under-test in the code generation prompt.
  2. Add the header file or source code file of the missing function in the code fixing prompt (C projects mostly).
  3. Related instructions.

@DonggeLiu DonggeLiu force-pushed the fix-undefined-reference branch from 5f49c76 to 1cbb1c1 Compare July 11, 2024 08:16
@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -n dg

@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -n dg

@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -ns 10 -nf 5 -n dg

@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -ns 10 -nf 5 -n dg

2 similar comments
@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -ns 10 -nf 5 -n dg

@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -ns 10 -nf 5 -n dg

@DonggeLiu DonggeLiu force-pushed the fix-undefined-reference branch from 5340eb6 to d9b042e Compare July 12, 2024 03:37
@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -ns 10 -nf 5 -n dg

1 similar comment
@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -ns 10 -nf 5 -n dg

@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -ns 10 -nf 5 -n dg-1

1 similar comment
@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -ns 10 -nf 5 -n dg-1

@DonggeLiu
Copy link
Collaborator Author

Strange that this works locally but not on the server:

**** Finished benchmark ada-url, bool ada_can_parse_with_base(const char *, size_t, const char *, size_t) ****
build success rate: 1.0, crash rate: 0.0, found bug: 0, max coverage: 0.18582758876287897, max line coverage diff: 0.002601156069364162
max coverage sample: /usr/local/google/home/donggeliu/Code/oss-fuzz-gen/results-2024-07-12-21-41/output-ada-url-ada_can_parse_with_base/fixed_targets/01.cc
max coverage diff sample: /usr/local/google/home/donggeliu/Code/oss-fuzz-gen/results-2024-07-12-21-41/output-ada-url-ada_can_parse_with_base/fixed_targets/01.cc
max coverage diff report: gs://oss-fuzz-gcb-experiment-run-logs/dg-curl56df3ed9-b0f1-4e4e-a02e-b1008c8f63fc.coverage

@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -i -ns 10 -nf 5 -n dg-2

@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -i -ns 10 -nf 5 -n dg-3

@DonggeLiu DonggeLiu force-pushed the fix-undefined-reference branch from 3c98ad2 to 5264587 Compare July 13, 2024 00:47
@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -n dg

@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -n dg-4

@DonggeLiu DonggeLiu force-pushed the fix-undefined-reference branch from 5264587 to 3353a29 Compare July 13, 2024 06:35
@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -i -ns 10 -nf 5 -n dg-3

@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -i -ns 10 -nf 5 -n dg-4

@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -i -ns 10 -nf 5 -n dg-5

@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -f -i -ns 10 -nf 5 -n dg

@DonggeLiu
Copy link
Collaborator Author

Increase build rate of:

  1. ada_can_parse_with_base from 0 to 100%,
  2. crxLoadDecodeLoop from 60% to 100%,
  3. sf_open from 20% to 100%,
  4. plus other random fluctuations between:
    1. https://llm-exp.oss-fuzz.com/Result-reports/scheduled/2024-07-16-daily-comparison/index.html
    2. https://llm-exp.oss-fuzz.com/Result-reports/ofg-pr/2024-07-14-465-dg-comparison/index.html

@DonggeLiu
Copy link
Collaborator Author

DonggeLiu commented Jul 16, 2024

Some other improvements:

  1. Get function header/source file when FI implements the API (function name -> function signatures for C++ projects)
  2. Group the instructions based on the change needed (e.g., to fix X, do a),b),and c).
  3. Add project documentation in the prompt, etc. project stb.
  4. Add line breaks to make instructions in the prompt more human-readable.
  5. Consider re-organizing the rule-applying logic implementation.

Other than these, this PR is in a good shape as a 1st iteration.

@DonggeLiu DonggeLiu merged commit e46888b into main Jul 16, 2024
7 checks passed
@DonggeLiu DonggeLiu deleted the fix-undefined-reference branch July 16, 2024 22:53
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.

2 participants