Code Monkey home page Code Monkey logo

Comments (2)

morozkod avatar morozkod commented on June 9, 2024

afl-fuzz.c : save_if_interesting() function

switch (fault) {
  
      case FAULT_TMOUT:
  
        /* Timeouts are not very interesting, but we're still obliged to keep
           a handful of samples. We use the presence of new bits in the
           hang-specific bitmap as a signal of uniqueness. In "dumb" mode, we
           just keep everything. */
  
        total_tmouts++;
        //some_code
        fn = alloc_printf("%s/replayable-hangs/id_%06llu", out_dir,
                                   unique_hangs);

So the test cases you're looking for should be in replayable-hangs folder.

But I suppose that in your case, this folder could be emply if the target doesn't yield in timeout when a latter is more generous

        /* Before saving, we make sure that it's a genuine hang by re-running
           the target with a more generous timeout (unless the default timeout
           is already generous). */
  
        if (exec_tmout < hang_tmout) {
  
          u8 new_fault;
          write_to_testcase(mem, len);
          new_fault = run_target(argv, hang_tmout);
  
          /* A corner case that one user reported bumping into: increasing the
             timeout actually uncovers a crash. Make sure we don't discard it if
             so. */
  
          if (!stop_soon && new_fault == FAULT_CRASH) goto keep_as_crash;
  
          if (stop_soon || new_fault != FAULT_TMOUT) return keeping;
  
        }

from afl.

michaellrowley avatar michaellrowley commented on June 9, 2024

Thanks for that information, when I reported this I don't think I had a /replayable-hangs/ folder (or it was empty) but now that I know where to look for timeout-handling code I should be able to change it so that it logs all timeouts next time I use AFL.

from afl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.