Skip to content
Snippets Groups Projects
Commit 5e80ce1e authored by Sergey Bronnikov's avatar Sergey Bronnikov Committed by Igor Munkin
Browse files

test/fuzz: fix errors "table index is {nil, NaN}"

Running of automatically generated Lua programs sometimes
failed due to errors "table index is nil" and
"table index is NaN" (3%). The error was caused by `nil` and
`NaN` values used as a table indices and key values,
but it is prohibited.

Examples of errors are the following:

```
local t = {}
t[nil] = 42 -- table index is nil.
t[0 / 0] = 42 -- table index is NaN.
local a = { [nil] = 0 } -- table index is nil.
local a = { [0 / 0] = 0 } -- table index is NaN.
```

The patch fixes serializer, index or key value is always not
a `nil` and not a `NaN`: it is either a generated value or
a default number.

NO_CHANGELOG=testing
NO_DOC=testing
NO_TEST=testing
parent 3b7bd590
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment