diff options
author | Giuliano Procida <gprocida@google.com> | 2022-03-25 15:18:22 +0000 |
---|---|---|
committer | Giuliano Procida <gprocida@google.com> | 2022-03-29 15:48:32 +0100 |
commit | 253e0ceda7f7acb81650b12133dd20e359b3d4c8 (patch) | |
tree | bfe67e6952e19ee2ec3b44d35b3c8298c63ded20 /fuzz | |
parent | 49a5183d4689b5158cef326f6ccdabfbbeab51db (diff) | |
download | stg-253e0ceda7f7acb81650b12133dd20e359b3d4c8.tar.gz |
concrete Graph and node Id types
* the code now uses node `Id`s wherever possible instead of pointers
* `Graph` is fully concrete
* the readers hold a `Graph` reference and return a root node `Id`
* multiple ABI graphs are loaded into a single `Graph`
PiperOrigin-RevId: 437251702
Change-Id: I8111f16050c57728e392792a774eeb63edf3f0f0
Diffstat (limited to 'fuzz')
-rw-r--r-- | fuzz/abigail_reader_fuzzer.cc | 3 | ||||
-rw-r--r-- | fuzz/btf_reader_fuzzer.cc | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/fuzz/abigail_reader_fuzzer.cc b/fuzz/abigail_reader_fuzzer.cc index cbf6b79..91fe86a 100644 --- a/fuzz/abigail_reader_fuzzer.cc +++ b/fuzz/abigail_reader_fuzzer.cc @@ -42,7 +42,8 @@ extern "C" int LLVMFuzzerTestOneInput(char* data, size_t size) { xmlNodePtr root = xmlDocGetRootElement(doc); if (root) { try { - stg::abixml::Abigail _(root); + stg::Graph graph; + stg::abixml::Abigail(graph).ProcessRoot(root); } catch (const stg::Exception&) { // Pass as this is us catching invalid XML properly. } diff --git a/fuzz/btf_reader_fuzzer.cc b/fuzz/btf_reader_fuzzer.cc index 0cd9548..4a60985 100644 --- a/fuzz/btf_reader_fuzzer.cc +++ b/fuzz/btf_reader_fuzzer.cc @@ -32,7 +32,9 @@ extern "C" int LLVMFuzzerTestOneInput(char* data, size_t size) { auto symtab = abigail::symtab_reader::symtab::load(symmap, symmap); try { - stg::btf::Structs(data, size, std::move(env), std::move(symtab)); + stg::Graph graph; + stg::btf::Structs( + graph, std::move(env), std::move(symtab)).Process(data, size); } catch (const stg::Exception&) { // Pass as this is us catching invalid BTF properly. } |