Merge branch 'new_fuzzer' of ssh://plrg.eecs.uci.edu:/home/git/random-fuzzer into...
authorbdemsky <bdemsky@uci.edu>
Fri, 21 Jun 2019 15:37:40 +0000 (08:37 -0700)
committerbdemsky <bdemsky@uci.edu>
Fri, 21 Jun 2019 15:37:40 +0000 (08:37 -0700)
1  2 
snapshot.cc

diff --combined snapshot.cc
index b4944f45527e8e93303235d6ddaa5d7f0b9f208e,bada736d35ab0979b217d923785efcec4acde7f1..d73613832e867eb069b5f5288b72f95bc04c96ff
@@@ -12,7 -12,6 +12,7 @@@
  #include "mymemory.h"
  #include "common.h"
  #include "context.h"
 +#include "model.h"
  
  /** PageAlignedAdressUpdate return a page aligned address for the
   * address being added as a side effect the numBytes are also changed.
@@@ -249,7 -248,7 +249,7 @@@ static void mprot_roll_back(snapshot_i
  
  #else /* !USE_MPROTECT_SNAPSHOT */
  
- #define SHARED_MEMORY_DEFAULT  (100 * ((size_t)1 << 20))      // 100mb for the shared memory
+ #define SHARED_MEMORY_DEFAULT  (200 * ((size_t)1 << 20))      // 100mb for the shared memory
  #define STACK_SIZE_DEFAULT      (((size_t)1 << 20) * 20)      // 20 mb out of the above 100 mb for my stack
  
  struct fork_snapshotter {
@@@ -384,11 -383,7 +384,11 @@@ static void fork_snapshot_init(unsigne
  
        /* switch back here when takesnapshot is called */
        snapshotid = fork_snap->currSnapShotID;
 -
 +      if (model->params.nofork) {
 +        setcontext(&fork_snap->shared_ctxt);
 +        exit(EXIT_SUCCESS);
 +      }
 +      
        while (true) {
                pid_t forkedID;
                fork_snap->currSnapShotID = snapshotid + 1;