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

Toml library causes IndexError #95

Open
simisimon opened this issue Jan 17, 2022 · 0 comments
Open

Toml library causes IndexError #95

simisimon opened this issue Jan 17, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@simisimon
Copy link
Member

The analysis of rust failed due to an IndexError caused by the toml library we use for parsing.

2022-01-14 20:18:32,630 |     INFO |             launcher | Analyzing network for rust.
2022-01-16 19:40:11,686 |    ERROR |             analyzer | An exception occurred during analysis at commit 293db0d33c06f1642af51df0afcb6f5e0fd0eb10.
2022-01-16 19:40:11,686 |    ERROR |             analyzer | list index out of range

Traceback:

  File "/tmp/ssimon/analysis/2/venv/lib/python3.10/site-packages/cfgnet/plugins/file_type/toml_plugin.py", line 49, in _parse_config_file
    data = toml.load(file)
  File "/tmp/ssimon/analysis/2/venv/lib/python3.10/site-packages/toml/decoder.py", line 156, in load
    return loads(f.read(), _dict, decoder)
  File "/tmp/ssimon/analysis/2/venv/lib/python3.10/site-packages/toml/decoder.py", line 511, in loads
    ret = decoder.load_line(line, currentlevel, multikey,
  File "/tmp/ssimon/analysis/2/venv/lib/python3.10/site-packages/toml/decoder.py", line 778, in load_line
    value, vtype = self.load_value(pair[1], strictly_valid)
  File "/tmp/ssimon/analysis/2/venv/lib/python3.10/site-packages/toml/decoder.py", line 880, in load_value
    return (self.load_array(v), "array")
  File "/tmp/ssimon/analysis/2/venv/lib/python3.10/site-packages/toml/decoder.py", line 1002, in load_array
    a[b] = a[b] + ',' + a[b + 1]
IndexError: list index out of range

This error is not caused by our implementation, but by the toml library we use to parse toml files. We can't easily fix this error.
How do we want to deal with it?

@simisimon simisimon added the bug Something isn't working label Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant