Skip to content

attempt to load arch xml file without extension leads to segfault #3334

@w0lek

Description

@w0lek

if we go in following condition

    if (!vtr::check_file_name_extension(arch_file, ".xml")) {
        VTR_LOG_WARN(
            "Architecture file '%s' may be in incorrect format. "
            "Expecting .xml format for architecture files.\n",
            arch_file);
    }

vpr segfault

Expected Behaviour

not crash

Current Behaviour

crash

Possible Solution

using data() method for string_view inside VTR_LOG_WARN macro

Steps to Reproduce

  • remove extension from the xml arch file and try to load it

Content

gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions