Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follow test/fuzz/README.md to install latest clang and libFuzzer then: ``` export PATH="$HOME/third_party/llvm-build/Release+Asserts/bin:$PATH" export LIB_FUZZER_PATH="$HOME/src/compiler-rt/lib/fuzzer/libFuzzer.a" ./script/configure ./script/build-fuzzers ruby ./script/reproduce ruby ./oom-1 ``` which gives: ``` /home/philipturnbull/src/tree-sitter/out/ruby_fuzzer: Running 1 inputs 1 time(s) each. Running: ./oom-1 ==4257== ERROR: libFuzzer: out-of-memory (used: 1051Mb; limit: 1024Mb) To change the out-of-memory limit use -rss_limit_mb=<N> Live Heap Allocations: 1086637843 bytes in 13638 chunks; quarantined: 669298 bytes in 104 chunks; 7256 other chunks; total chunks: 20998; showing top 95% (at most 8 unique contexts) 1055741504 byte(s) (97%) in 13495 allocation(s) 0 0x4c180a in calloc /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_malloc_linux.cc:97:3 1 0xa952fe in ts_calloc (/home/philipturnbull/src/tree-sitter/out/ruby_fuzzer+0xa952fe) 2 0xa9492e in ts_tree_array_copy (/home/philipturnbull/src/tree-sitter/out/ruby_fuzzer+0xa9492e) 3 0xaf1479 in ts_stack_pop_count (/home/philipturnbull/src/tree-sitter/out/ruby_fuzzer+0xaf1479) 4 0xa5edbe in parser__reduce (/home/philipturnbull/src/tree-sitter/out/ruby_fuzzer+0xa5edbe) 5 0xa901af in parser__do_all_potential_reductions (/home/philipturnbull/src/tree-sitter/out/ruby_fuzzer+0xa901af) 6 0xa6dc3d in parser__handle_error (/home/philipturnbull/src/tree-sitter/out/ruby_fuzzer+0xa6dc3d) 7 0xa4e217 in parser__advance (/home/philipturnbull/src/tree-sitter/out/ruby_fuzzer+0xa4e217) 8 0xa457a0 in parser_parse (/home/philipturnbull/src/tree-sitter/out/ruby_fuzzer+0xa457a0) 9 0xa1461c in ts_document_parse_with_options (/home/philipturnbull/src/tree-sitter/out/ruby_fuzzer+0xa1461c) 10 0x4f135a in LLVMFuzzerTestOneInput (/home/philipturnbull/src/tree-sitter/out/ruby_fuzzer+0x4f135a) 11 0xb42d72 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/philipturnbull/src/compiler-rt/lib/fuzzer/./FuzzerLoop.cpp:517:13 12 0xb35f4a in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /home/philipturnbull/src/compiler-rt/lib/fuzzer/./FuzzerDriver.cpp:280:3 13 0xb3a708 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/philipturnbull/src/compiler-rt/lib/fuzzer/./FuzzerDriver.cpp:703:9 14 0xb35ca0 in main /home/philipturnbull/src/compiler-rt/lib/fuzzer/./FuzzerMain.cpp:20:10 15 0x7f092214f82f in __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:291 SUMMARY: libFuzzer: out-of-memory ```
- Loading branch information