Skip to content

Commit

Permalink
Merge pull request #15 from Tmonster/fix_fuzzer_script
Browse files Browse the repository at this point in the history
Fuzzer script needs better error message/issue creation message
  • Loading branch information
Tmonster authored Jul 15, 2024
2 parents c5305fd + e3929e6 commit e051efa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/run_fuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,16 @@ def run_shell_command(cmd):
# reduce_multi_statement checks just the last statement first as a heuristic to see if
# only the last statement causes the error.
required_queries = reduce_sql.reduce_multi_statement(all_queries, shell, load_script)
cmd = load_script + '\n' + last_query + "\n"
cmd = load_script + '\n' + '\n'.join(required_queries)

# get a new error message.
(stdout, stderr, returncode) = run_shell_command(cmd)
error_msg = reduce_sql.sanitize_error(stderr)

print(f"the sql `{cmd}` causes the below error.")
print(f"================MARKER====================")

print(f"{error_msg}")

if not dry:
fuzzer_helper.file_issue(cmd, error_msg, fuzzer_name, seed, git_hash)

0 comments on commit e051efa

Please sign in to comment.