Skip to content

Add InvalidOperationException exception#1325

Merged
erikzhang merged 6 commits intoimprovements/jsonfrom
shargon-patch-1
Dec 5, 2019
Merged

Add InvalidOperationException exception#1325
erikzhang merged 6 commits intoimprovements/jsonfrom
shargon-patch-1

Conversation

@shargon
Copy link
Copy Markdown
Member

@shargon shargon commented Dec 4, 2019

According to our fuzzing process we need to cover generic exceptions

image

We can get errors like this:

System.InvalidOperationException: Cannot read invalid UTF-16 JSON text as string. Invalid surrogate value: '0xDBFF'.
   at TuringMachine.Core.Fuzzers.FuzzerClient.Execute(Action`1 action, FuzzingStream stream)
ExtraInformation: TaskId: 2

With entries like

[
	[100, 500, 300, 200],
	123,
	true,
	false,
	null,
	{
		"color": "red",
		"value": "#f\uDBFF\uDBFF\uDFFF\uDFFFdata": [1, 2]
	}
]

@shargon shargon requested a review from erikzhang December 4, 2019 16:12
@shargon shargon changed the title Add generic excetion Add generic exception Dec 4, 2019
Copy link
Copy Markdown
Member

@erikzhang erikzhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hate generic exceptions. We need to find all reason the resolve them.

@shargon
Copy link
Copy Markdown
Member Author

shargon commented Dec 4, 2019

I hate generic exceptions. We need to find all reason the resolve them.

I think that always that we catch an exception we need a plan B, but please take a look again with the last changes

@shargon shargon requested a review from erikzhang December 4, 2019 16:25
@shargon shargon changed the title Add generic exception Add InvalidOperationException exception Dec 4, 2019
@erikzhang
Copy link
Copy Markdown
Member

Can you upload the JSON file here? I will test it.

@shargon
Copy link
Copy Markdown
Member Author

shargon commented Dec 4, 2019

@erikzhang erikzhang merged commit f812fa0 into improvements/json Dec 5, 2019
@erikzhang erikzhang deleted the shargon-patch-1 branch December 5, 2019 04:17
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.

2 participants