Skip to content

Commit

Permalink
this should work
Browse files Browse the repository at this point in the history
  • Loading branch information
Tmonster committed Jul 15, 2024
1 parent e1b1264 commit e3929e6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/run_fuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +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)

print(f"the following command causes an error: \n {cmd}")
# 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 e3929e6

Please sign in to comment.