search for: llvmfuzzertestoneinput

Displaying 20 results from an estimated 24 matches for "llvmfuzzertestoneinput".

2017 Sep 06
2
libFuzzer: issue with weak symbols on Mac
...ents of LibFuzzer to pass ``-U _<symbol_name>`` to the linker to allow // weak symbols to be undefined. That is a complication we don't want to expose // to clients right now. That makes sense, but with current implementation, you cannot use libFuzzer's interface functions other than LLVMFuzzerTestOneInput. Below is a small example to verify that LLVMFuzzerInitialize is not being called on Mac: #include <stddef.h> #include <stdint.h> #include <stdio.h> extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv) { printf("Hello from LLVMFuzzerInitialize, argc: %i\...
2017 Aug 22
8
llvm-mc-[dis]assemble-fuzzer status?
...r the libraries which use libFuzzer. I have tried to compile llvm-mc-assemble-fuzzer, and llvm-mc-disassemble-fuzzer, and I couldn’t build either of those. For the first one, the reason is that it refers to a nonexistent enum, and for the second one I believe the reason is that it does not enclose LLVMFuzzerTestOneInput in “extern ‘C’”. Are those libraries maintained and/or used? If yes, the code should be compilable, and ideally there should be a buildbot. If no, maybe we should remove it, or move it to a separate repository. Thanks, George (sorry for starting multiple threads, I believe this way it is more c...
2017 Aug 24
3
Building LLVM's fuzzers
...; >> I wouldn't expect that to work because for ELF targets llvm.used has no >> effect on the object file (only on the optimizer). >> >> Is there a simple way to reproduce the link failure? >> > > > ninja compiler-rt > echo 'extern "C" int LLVMFuzzerTestOneInput(const unsigned char *a, > unsigned long b){return 0; } ' > test.cc > clang -O3 test.cc -fsanitize=fuzzer # works > clang -O3 test.cc -Wl,-gc-sections -fsanitize=fuzzer # fails > It seems that the issue is that older versions of ld.bfd have a bug which causes it not to define...
2019 Nov 12
2
Using Libfuzzer on a library - linking the library to the fuzz target
...`-fsanitize=fuzzer-no-link,address` should be sufficient. - Acknowledged 2. (although you can actually build object files/shared libraries with -fsanitize=fuzzer, and the libFuzzer main won't be linked, if this makes your build process easier). - with just the *fuzzer *flag, it looks for the LLVMFuzzerTestOneInput. 3. I've run a quick grep and can't find anything that would match "apifunc() resp=0x7ff38f83ac20 uninitialized, fixing it." in libFuzzer (or compiler-rt). What version of compiler-rt/llvm/clang are you trying this with? - This was an oversight on my part, it was a log dump from...
2017 Jan 27
3
Adding a decoder fuzz target
Hi all, I'm working on fuzzing Opus with OSS-Fuzz and have started with the decoder. Attached is a patch to add the corresponding fuzz target. Please let me know if there are any concerns? Thanks, Felicia -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/opus/attachments/20170127/f69951aa/attachment-0001.html>
2017 Aug 25
2
Building LLVM's fuzzers
...vm.used has no > >>> effect on the object file (only on the optimizer). > >>> > >>> Is there a simple way to reproduce the link failure? > >>> > >> > >> > >> ninja compiler-rt > >> echo 'extern "C" int LLVMFuzzerTestOneInput(const unsigned char *a, > >> unsigned long b){return 0; } ' > test.cc > >> clang -O3 test.cc -fsanitize=fuzzer # works > >> clang -O3 test.cc -Wl,-gc-sections -fsanitize=fuzzer # fails > >> > > > > It seems that the issue is that older versi...
2017 Sep 11
2
Building LLVM's fuzzers
...le (only on the optimizer). >>> >>> >>> >>> Is there a simple way to reproduce the link failure? >>> >>> >>> >> >>> >> >>> >> ninja compiler-rt >>> >> echo 'extern "C" int LLVMFuzzerTestOneInput(const unsigned char *a, >>> >> unsigned long b){return 0; } ' > test.cc >>> >> clang -O3 test.cc -fsanitize=fuzzer # works >>> >> clang -O3 test.cc -Wl,-gc-sections -fsanitize=fuzzer # fails >>> >> >>> > >>>...
2017 Feb 10
2
Adding a decoder fuzz target
...seToc(const uint8_t toc, TocInfo *const info) { > > Any particular reason you don't use the Opus functions for parsing the > ToC? It seems like opus_packet_get_nb_samples(), > opus_packet_get_bandwidth(), and opus_packet_get_nb_channels() should do > the trick. > > > int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) > > How is that function supposed to work? I noticed that it will only > decode a single packet. How does the fuzzer handle testing for bugs that > only happen for a given sequence of input packets? > > Cheers, > > Jean-Marc > &gt...
2017 Aug 02
2
libFuzzer: add an option to always null-terminate?
Hi all, While playing with libFuzzer, it's a little cumbersome to having to copy the buffer just in order to null-terminate it. Is a null-terminated buffer an often-enough usage scenario to warrant a libFuzzer commandline configuration switch to always generate a null-terminated test case? Thanks, Johan -------------- next part -------------- An HTML attachment was scrubbed... URL:
2017 Aug 24
2
llvm-mc-[dis]assemble-fuzzer status?
...; I have tried to compile llvm-mc-assemble-fuzzer, and >> llvm-mc-disassemble-fuzzer, and I couldn’t build either of those. >> For the first one, the reason is that it refers to a nonexistent enum, >> and for the second one I believe the reason is that it does not enclose >> LLVMFuzzerTestOneInput in “extern ‘C’”. >> >> Are those libraries maintained and/or used? >> >> If yes, the code should be compilable, and ideally there should be a >> buildbot. >> > > "there should be a buildbot" is actually two different questions. > 1. There shoul...
2017 Aug 24
4
Building LLVM's fuzzers
On Thu, Aug 24, 2017 at 3:21 PM, Kostya Serebryany via llvm-dev < llvm-dev at lists.llvm.org> wrote: > > > On Thu, Aug 24, 2017 at 3:20 PM, Justin Bogner <mail at justinbogner.com> > wrote: > >> I think the simplest fix is something like this: >> >> diff --git a/lib/Transforms/Instrumentation/SanitizerCoverage.cpp >>
2019 Nov 12
2
Using Libfuzzer on a library - linking the library to the fuzz target
I am working of using libfuzzer and asan to test out a third-party library. As demonstrated in the tutorial, I wrote a fuzz target to fuzz a specific function in the library. The fuzz target is then linked to the library and compiles clean and I do see some tests generated by the fuzzer. However, I have some questions regarding the "right" way to go about doing this. I have doubts that
2017 Aug 25
3
llvm-mc-[dis]assemble-fuzzer status?
...rgument was > removed from InitMCObjectFileInfo(). After removing that argument and > adding an 'extern "C"' it at least compiles. I haven't had chance to try > running it yet. > > > and for the second one I believe the reason is that it does not enclose > LLVMFuzzerTestOneInput in “extern ‘C’”. > > I agree we need an "extern C" here. I'm not sure what changed to make it > required though. > > > Are those libraries maintained and/or used? > > I haven't used it for quite a while now. My original motivator was the > Mips assembler...
2017 Jan 30
0
Adding a decoder fuzz target
...your patch: > static void ParseToc(const uint8_t toc, TocInfo *const info) { Any particular reason you don't use the Opus functions for parsing the ToC? It seems like opus_packet_get_nb_samples(), opus_packet_get_bandwidth(), and opus_packet_get_nb_channels() should do the trick. > int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) How is that function supposed to work? I noticed that it will only decode a single packet. How does the fuzzer handle testing for bugs that only happen for a given sequence of input packets? Cheers, Jean-Marc On 27/01/17 02:48 PM, Felicia Lim wrote: > Hi...
2017 Feb 10
0
Adding a decoder fuzz target
...c, TocInfo *const info) { > > Any particular reason you don't use the Opus functions for parsing the > ToC? It seems like opus_packet_get_nb_samples(), > opus_packet_get_bandwidth(), and opus_packet_get_nb_channels() should do > the trick. > > > int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) > > How is that function supposed to work? I noticed that it will only > decode a single packet. How does the fuzzer handle testing for bugs that > only happen for a given sequence of input packets? > > Cheers, > >...
2015 Aug 11
3
libfuzzer questions
First off, thanks -- this is a pretty great library and it feels like I'm learning a lot. I'm getting some more experience with libfuzzer and finding that I have a couple of questions: - How does libfuzzer decide to write a new test file? What distinguishes this one from all the other cases for which new test inputs were not written? Must be something about the path taken through the
2015 Aug 11
3
libfuzzer questions
...m_src//llvm/lib/Fuzzer/FuzzerLoop.cpp:89 #41 0x000000000050b9fc in fuzzer::FuzzerDriver (argc=7, argv=0x7fffd95703e8, USF=...) at /home/brian/tmp/testing/llvm_src//llvm/lib/Fuzzer/FuzzerDriver.cpp:273 #42 0x00000000005095fc in fuzzer::FuzzerDriver (argc=7, argv=0x7fffd95703e8, Callback=0x5d0880 <LLVMFuzzerTestOneInput(unsigned char const*, unsigned long)>) #43 0x00000000005598cf in main (argc=7, argv=0x7fffd95703e8) at /home/brian/tmp/testing/llvm_src//llvm/lib/Fuzzer/FuzzerMain.cpp:19 -------------- next part -------------- #0 atomic_exchange<__sanitizer::atomic_uint32_t> (mo=__sanitizer::memory_order...
2015 Aug 30
4
Fuzzing complex programs
I have a project I want to do based on Libfuzzer. Is there a separate list for it or should I bring up any ideas for it here? What I have in mind is to fuzz Postgres. Trying to fuzz the SQL interpreter in general is not very productive because traditional fuzzers try to execute the entire program repeatedly and it has a fairly high startup and shutdown cost. Also the instrumentation-guided
2015 Dec 03
2
fuzzer crash (but not the good kind)
Ah, yes -- you need to clone with --recursive. I will try the workaround though. On Dec 3, 2015 1:12 PM, "Kostya Serebryany" <kcc at google.com> wrote: > > > On Wed, Dec 2, 2015 at 7:17 PM, Brian Cain <brian.cain at gmail.com> wrote: > >> Kostya, >> >> Here's the git repo: https://bitbucket.org/ebadf/fuzzpy >> >> I've only
2015 Sep 09
3
LibFuzzer and platforms availability
Hi there. I’m trying to use LibFuzzer on OSX and face some issues: I checked out LibFuzzer documentation[1] and managed to proceed until the final step of the first example. Now I see linker errors related to dfsan, dfsan’s documentation[2] states explicitly “DataFlowSanitizer is a work in progress, currently under development for x86_64 Linux.”. Does it mean that LibFuzzer available only on