Skip to content

Segfault during srcML parsing of add_test CMake command including COMMAND_EXPAND_LISTS option #2355

Open

Description

@CarmineStroman

When parsing the CMake add_test command, a segfault is returned when the COMMAND_EXPAND_LISTS option is included.

For example, consider this line:

add_test(NAME test COMMAND testDriver COMMAND_EXPAND_LISTS)

Then the expected srcML output should be:

<unit revision="1.0.0" language="CMake">
<command><name>add_test</name><argument_list>(<option><name>NAME</name> <argument><expr><name>test</name></expr></argument></option> <option><name>COMMAND</name> <argument><expr><name>testDriver</name></expr></argument></option> <option><name>COMMAND_EXPAND_LISTS</name></option>)</argument_list></command>
</unit>

However, this is the current output:

Segmentation fault (core dumped)

This bug also causes the add_test test suite to not run until this issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions