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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions benchmark-sets/headerfiles/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Selected 50 projects to test the effectiveness of headerfiles. It should be noted that we have corrected the language settings of the following projects:

**From c++ to c:**
avahi.yaml, brotli.yaml, capstone.yaml, lcms.yaml, libcoap.yaml, libfido2.yaml, libpcap.yaml, librdkafka.yaml, libtpms.yaml, libvnc.yaml, libxls.yaml, mbedtls.yaml, minizip.yaml, ndpi.yaml, njs.yaml, picotls.yaml, tidy-html5.yaml, unicorn.yaml

(In case of incorrect settings, prompt will provide a c++ fuzz target example, and LLM will mimic it by including "FuzzydDataProvider.h", causing compilation errors.)

**From c to c++:**
libjpeg-turbo.yaml, libsndfile.yaml
56 changes: 56 additions & 0 deletions benchmark-sets/headerfiles/avahi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
"functions":
- "exceptions": []
"name": "avahi_string_list_new"
"params":
- "name": "txt"
"type": "bool "
"return_type": "void"
"signature": "AvahiStringList * avahi_string_list_new(const char *, void)"
- "exceptions": []
"name": "avahi_string_list_add_vprintf"
"params":
- "name": "l"
"type": "bool "
- "name": "format"
"type": "bool "
- "name": "va"
"type": "bool "
"return_type": "void"
"signature": "AvahiStringList * avahi_string_list_add_vprintf(AvahiStringList *, const char *, struct __va_list_tag *)"
- "exceptions": []
"name": "avahi_string_list_add_printf"
"params":
- "name": "l"
"type": "bool "
- "name": "format"
"type": "bool "
"return_type": "void"
"signature": "AvahiStringList * avahi_string_list_add_printf(AvahiStringList *, const char *, void)"
- "exceptions": []
"name": "avahi_dns_packet_new_reply"
"params":
- "name": "p"
"type": "bool "
- "name": "mtu"
"type": "int"
- "name": "copy_queries"
"type": "int"
- "name": "aa"
"type": "int"
"return_type": "void"
"signature": "AvahiDnsPacket * avahi_dns_packet_new_reply(AvahiDnsPacket *, unsigned int, int, int)"
- "exceptions": []
"name": "avahi_string_list_add_pair"
"params":
- "name": "l"
"type": "bool "
- "name": "key"
"type": "bool "
- "name": "value"
"type": "bool "
"return_type": "void"
"signature": "AvahiStringList * avahi_string_list_add_pair(AvahiStringList *, const char *, const char *)"
"language": "c"
"project": "avahi"
"target_name": "fuzz-packet"
"target_path": "/src/avahi/fuzz/fuzz-packet.c"
70 changes: 70 additions & 0 deletions benchmark-sets/headerfiles/bind9.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
"functions":
- "exceptions": []
"name": "dns_view_freezezones"
"params":
- "name": "view"
"type": "bool "
- "name": "value"
"type": "bool"
"return_type": "int"
"signature": "isc_result_t dns_view_freezezones(dns_view_t *, bool)"
- "exceptions": []
"name": "dns_view_asyncload"
"params":
- "name": "view"
"type": "bool "
- "name": "newonly"
"type": "bool"
- "name": "callback"
"type": "bool "
- "name": "arg"
"type": "bool "
"return_type": "int"
"signature": "isc_result_t dns_view_asyncload(dns_view_t *, bool, dns_zt_callback_t *, void *)"
- "exceptions": []
"name": "dns_zt_asyncload"
"params":
- "name": "zt"
"type": "bool "
- "name": "newonly"
"type": "bool"
- "name": "loaddone"
"type": "bool "
- "name": "arg"
"type": "bool "
"return_type": "int"
"signature": "isc_result_t dns_zt_asyncload(dns_zt_t *, bool, dns_zt_callback_t *, void *)"
- "exceptions": []
"name": "dns_zt_freezezones"
"params":
- "name": "zt"
"type": "bool "
- "name": "view"
"type": "bool "
- "name": "freeze"
"type": "bool"
"return_type": "int"
"signature": "isc_result_t dns_zt_freezezones(dns_zt_t *, dns_view_t *, bool)"
- "exceptions": []
"name": "dns__rbtdb_addrdataset"
"params":
- "name": "db"
"type": "bool "
- "name": "node"
"type": "bool "
- "name": "version"
"type": "bool "
- "name": "now"
"type": "int"
- "name": "rdataset"
"type": "bool "
- "name": "options"
"type": "int"
- "name": "addedrdataset"
"type": "bool "
"return_type": "int"
"signature": "isc_result_t dns__rbtdb_addrdataset(dns_db_t *, dns_dbnode_t *, dns_dbversion_t *, isc_stdtime_t, dns_rdataset_t *, unsigned int, dns_rdataset_t *)"
"language": "c"
"project": "bind9"
"target_name": "dns_qpkey_name_fuzzer"
"target_path": "/src/bind9/fuzz/dns_qpkey_name.c"
86 changes: 86 additions & 0 deletions benchmark-sets/headerfiles/bluez.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
"functions":
- "exceptions": []
"name": "g_obex_put_req"
"params":
- "name": "obex"
"type": "bool "
- "name": "data_func"
"type": "bool "
- "name": "complete_func"
"type": "bool "
- "name": "user_data"
"type": "bool "
- "name": "err"
"type": "bool "
- "name": "first_hdr_id"
"type": "int"
"return_type": "int"
"signature": "guint g_obex_put_req(GObex *, GObexDataProducer, GObexFunc, gpointer, GError **, guint, void)"
- "exceptions": []
"name": "g_obex_new"
"params":
- "name": "io"
"type": "bool "
- "name": "transport_type"
"type": "int"
- "name": "io_rx_mtu"
"type": "size_t"
- "name": "io_tx_mtu"
"type": "size_t"
"return_type": "void"
"signature": "GObex * g_obex_new(GIOChannel *, GObexTransportType, gssize, gssize)"
- "exceptions": []
"name": "g_obex_get_req"
"params":
- "name": "obex"
"type": "bool "
- "name": "data_func"
"type": "bool "
- "name": "complete_func"
"type": "bool "
- "name": "user_data"
"type": "bool "
- "name": "err"
"type": "bool "
- "name": "first_hdr_id"
"type": "int"
"return_type": "int"
"signature": "guint g_obex_get_req(GObex *, GObexDataConsumer, GObexFunc, gpointer, GError **, guint, void)"
- "exceptions": []
"name": "g_obex_get_req_pkt"
"params":
- "name": "obex"
"type": "bool "
- "name": "req"
"type": "bool "
- "name": "data_func"
"type": "bool "
- "name": "complete_func"
"type": "bool "
- "name": "user_data"
"type": "bool "
- "name": "err"
"type": "bool "
"return_type": "int"
"signature": "guint g_obex_get_req_pkt(GObex *, GObexPacket *, GObexDataConsumer, GObexFunc, gpointer, GError **)"
- "exceptions": []
"name": "g_obex_put_req_pkt"
"params":
- "name": "obex"
"type": "bool "
- "name": "req"
"type": "bool "
- "name": "data_func"
"type": "bool "
- "name": "complete_func"
"type": "bool "
- "name": "user_data"
"type": "bool "
- "name": "err"
"type": "bool "
"return_type": "int"
"signature": "guint g_obex_put_req_pkt(GObex *, GObexPacket *, GObexDataProducer, GObexFunc, gpointer, GError **)"
"language": "c"
"project": "bluez"
"target_name": "fuzz_sdp"
"target_path": "/src/fuzz_sdp.c"
58 changes: 58 additions & 0 deletions benchmark-sets/headerfiles/brotli.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
"functions":
- "exceptions": []
"name": "BrotliDecoderAttachDictionary"
"params":
- "name": ""
"type": "bool "
- "name": ""
"type": "int"
- "name": ""
"type": "size_t"
- "name": ""
"type": "bool "
"return_type": "int"
"signature": "int BrotliDecoderAttachDictionary(BrotliDecoderStateInternal *, BrotliSharedDictionaryType, size_t, const uint8_t *)"
- "exceptions": []
"name": "BrotliDecoderIsFinished"
"params":
- "name": ""
"type": "bool "
"return_type": "int"
"signature": "int BrotliDecoderIsFinished(const BrotliDecoderStateInternal *)"
- "exceptions": []
"name": "BrotliSafeReadBits32Slow"
"params":
- "name": ""
"type": "bool "
- "name": ""
"type": "size_t"
- "name": ""
"type": "bool "
"return_type": "int"
"signature": "int BrotliSafeReadBits32Slow(const BrotliBitReader *, uint64_t, uint64_t *)"
- "exceptions": []
"name": "BrotliDecoderDecompress"
"params":
- "name": ""
"type": "size_t"
- "name": ""
"type": "bool "
- "name": ""
"type": "bool "
- "name": ""
"type": "bool "
"return_type": "int"
"signature": "BrotliDecoderResult BrotliDecoderDecompress(size_t, const uint8_t *, size_t *, uint8_t *)"
- "exceptions": []
"name": "BrotliDecoderTakeOutput"
"params":
- "name": ""
"type": "bool "
- "name": ""
"type": "bool "
"return_type": "void"
"signature": "const uint8_t * BrotliDecoderTakeOutput(BrotliDecoderStateInternal *, size_t *)"
"language": "c"
"project": "brotli"
"target_name": "decode_fuzzer"
"target_path": "/src/brotli/c/fuzz/decode_fuzzer.c"
84 changes: 84 additions & 0 deletions benchmark-sets/headerfiles/capstone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
"functions":
- "exceptions": []
"name": "BPF_getInstruction"
"params":
- "name": "ud"
"type": "size_t"
- "name": "code"
"type": "bool "
- "name": "code_len"
"type": "size_t"
- "name": "instr"
"type": "bool "
- "name": "size"
"type": "bool "
- "name": "address"
"type": "size_t"
- "name": "info"
"type": "bool "
"return_type": "bool"
"signature": "bool BPF_getInstruction(csh, const uint8_t *, size_t, MCInst *, uint16_t *, uint64_t, void *)"
- "exceptions": []
"name": "LoongArch_printer"
"params":
- "name": "MI"
"type": "bool "
- "name": "O"
"type": "bool "
- "name": "info"
"type": "bool "
"return_type": "void"
"signature": "void LoongArch_printer(MCInst *, SStream *, void *)"
- "exceptions": []
"name": "PPC_getInstruction"
"params":
- "name": "ud"
"type": "size_t"
- "name": "code"
"type": "bool "
- "name": "code_len"
"type": "size_t"
- "name": "instr"
"type": "bool "
- "name": "size"
"type": "bool "
- "name": "address"
"type": "size_t"
- "name": "info"
"type": "bool "
"return_type": "bool"
"signature": "bool PPC_getInstruction(csh, const uint8_t *, size_t, MCInst *, uint16_t *, uint64_t, void *)"
- "exceptions": []
"name": "ARM_getInstruction"
"params":
- "name": "ud"
"type": "size_t"
- "name": "code"
"type": "bool "
- "name": "code_len"
"type": "size_t"
- "name": "instr"
"type": "bool "
- "name": "size"
"type": "bool "
- "name": "address"
"type": "size_t"
- "name": "info"
"type": "bool "
"return_type": "bool"
"signature": "bool ARM_getInstruction(csh, const uint8_t *, size_t, MCInst *, uint16_t *, uint64_t, void *)"
- "exceptions": []
"name": "AArch64_printer"
"params":
- "name": "MI"
"type": "bool "
- "name": "O"
"type": "bool "
- "name": "info"
"type": "bool "
"return_type": "void"
"signature": "void AArch64_printer(MCInst *, SStream *, void *)"
"language": "c"
"project": "capstone"
"target_name": "driverbin"
"target_path": "/src/capstonev5/suite/fuzz/driverbin.c"
Loading
Loading