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

Testing build rate with more refined header file info #641

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

DonggeLiu
Copy link
Collaborator

No description provided.

DonggeLiu and others added 2 commits September 23, 2024 10:22
**Statement**: Most modifications to the original code of `oss-fuzz-gen`
(including items 2. and 3. below) are for the convenience of current
testing and performance comparison based on Gemini. The current changes
will not be the final merge changes.

Modifications to be noted:

1. Changed c projects like **picotls**, **libvnc**'s language setting in
yaml from c++ to c. Otherwise, the prompt will provide an example of
c++, and the large model imitation the c++ example to include
FuzzydDataProvider. h (c++).

2. Added `headerfiles `project as a module in the oss-fuzz-gen project.
Therefore, the include statement changed from _import headerfiles.api as
headerfiles_ to _from headerfiles.headerfiles import api as
headerfiles_. (This facilitates us to adjust the code in the
`headerfiles` at any time, and eventually, we will package it as an
external library)

3. Changed the function:
https://github.com/occia/oss-fuzz-gen/blob/e71091bab8b4ac20a2e575ee9f7cbce91a987fdd/data_prep/project_src.py#L238
to avoid the bug: "docker: Error response from daemon: Conflict."

4. Project **bind9**: Execute _make "-j\$(nproc)"_ in original build.sh
sometimes cause link errors, related to the setting of multithreading in
the project. Execute _make_ produce no errors (by
headersfile_updated_script).

5. Project **openexr**: The header files introduced by `headerfiles`
will be part of the prompt, occasionally affecting the generation of
LLM. Haven't found a solution yet.
_"We have prepared the following list of headers which covers all target project APIs and will prepend them as #include statments at the beginning of your generated fuzz target. Therefore, you only need to include the headers of non-target-project APIs used in your fuzz target.
\<code\> dns/acl.h..."_.



Overall Results:
(Based on GPT-4o)
PROJ | ORI | FIX
-- | -- | --
avahi | 16 | 18
bind9 | 21 | 14
bluez | 0 | 0
brotli | 0 | 1
capstone | 35 | 50
coturn | 16 | 18
croaring | 42 | 50
igraph | 0 | 0
kamailio | 6 | 28
krb5 | 0 | 0
lcms | 0 | 37
libbpf | 0 | 39
libcoap | 0 | 0
libevent | 4 | 28
libfido2 | 0 | 50
libical | 6 | 16
libjpeg-turbo | 39 | 50
libpcap | 50 | 50
librdkafka | 0 | 0
libsndfile | 39 | 45
libsodium | 0 | 0
libssh2 | 26 | 25
libssh | 22 | 32
libtpms | 40 | 40
libusb | 1 | 27
libvnc | 0 | 24
libxls | 0 | 33
libyang | 1 | 0
lwan | 0 | 8
mbedtls | 0 | 16
mdbtools | 0 | 0
minizip | 50 | 50
ndpi | 1 | 7
njs | 2 | 0
oniguruma | 20 | 20
openexr | 17 | 0
opusfile | 23 | 36
picotls | 43 | 41
pjsip | 14 | 19
proftpd | 23 | 44
pupnp | 29 | 29
sleuthkit | 0 | 0
tidy-html5 | 35 | 39
unicorn | 0 | 0
unit | 15 | 13
utf8proc | 20 | 20
vlc | 6 | 9
w3m | 34 | 30
wasm3 | 5 | 15
zydis | 0 | 0

---------

Co-authored-by: Cen Zhang <[email protected]>
@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -n dg

@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -n dg -b headerfiles

@DonggeLiu
Copy link
Collaborator Author

DonggeLiu commented Sep 23, 2024

@DonggeLiu
Copy link
Collaborator Author

/gcbrun exp -n hd -b headerfiles

@DonggeLiu
Copy link
Collaborator Author

DonggeLiu commented Sep 24, 2024

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