Skip to content

Commit

Permalink
Bug 1894001 - Unify the REPRL support in JS engine for fuzzilli. r=tr…
Browse files Browse the repository at this point in the history
  • Loading branch information
choller committed Apr 30, 2024
1 parent 5f6118f commit e6ef7cb
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions js/src/shell/js.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11432,15 +11432,20 @@ static int Shell(JSContext* cx, OptionParser* op) {
fflush(stdout);
fflush(stderr);
// Send return code to parent and reset edge counters.
struct {
int status;
uint32_t execHash;
uint32_t execHashInputs;
} s;
s.status = (result & 0xff) << 8;
s.execHash = cx->executionHash;
s.execHashInputs = cx->executionHashInputs;
MOZ_RELEASE_ASSERT(write(REPRL_CWFD, &s, 12) == 12);
int status = (result & 0xff) << 8;
if (js::SupportDifferentialTesting()) {
struct {
int status;
uint32_t execHash;
uint32_t execHashInputs;
} s;
s.status = status;
s.execHash = cx->executionHash;
s.execHashInputs = cx->executionHashInputs;
MOZ_RELEASE_ASSERT(write(REPRL_CWFD, &s, 12) == 12);
} else {
MOZ_RELEASE_ASSERT(write(REPRL_CWFD, &status, 4) == 4);
}
__sanitizer_cov_reset_edgeguards();
cx->executionHash = 1;
cx->executionHashInputs = 0;
Expand Down

0 comments on commit e6ef7cb

Please sign in to comment.