Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuzzer script needs better error message/issue creation message #15

Merged
merged 2 commits into from
Jul 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading