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

Resolve TypeError during FuzzContext creation #4696

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AashutoshMurthy
Copy link
Contributor

This PR aims to resolve the following error:
TypeError: bad argument type for built-in operation

The value of fuzzer_metadata for the key 'issue_metadata' is a dict, it should be a str.

@svasudevprasad
Copy link
Collaborator

/gcbrun

@jonathanmetzman
Copy link
Collaborator

jonathanmetzman commented Feb 20, 2025

I think this needs more thought. We are returning a dict elsewhere, do all users of this need a string? Why bother loading it.

@AashutoshMurthy
Copy link
Contributor Author

I think this needs more thought. We are returning a dict elsewhere, do all users of this need a string? Why bother loading it.

I had a look at the usage of issue_metadata, and have summarised my findings in the chart below:

image

From this, I feel we can probably change the fix to convert issue_metadata from a dict to str in fuzz_task.py, as the same logic has been implemented elsewhere. Here's the reference where issue_metadata is converted to a str using json.dumps() wherever needed.

@jonathanmetzman
Copy link
Collaborator

I think this needs more thought. We are returning a dict elsewhere, do all users of this need a string? Why bother loading it.

I had a look at the usage of issue_metadata, and have summarised my findings in the chart below:

image

From this, I feel we can probably change the fix to convert issue_metadata from a dict to str in fuzz_task.py, as the same logic has been implemented elsewhere. Here's the reference where issue_metadata is converted to a str using json.dumps() wherever needed.

Sure, let's do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants