Skip to content

Toml library causes IndexError #95

@simisimon

Description

@simisimon

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions