Thanks to visit codestin.com
Credit goes to github.com

Skip to content

UnknownLineType thrown when parsing coverage data from 10K+ line file #882

@zidel

Description

@zidel

Describe the bug
When the source code file is larger than 10K lines the .gcov format appears to drop the space between %%%%%: and the line number. This causes _RE_BLOCK_LINE to not match since it requires the space to be present.

Slightly redacted .gcov extract:

    %%%%%: 9998-block  1
call    6 never executed
    #####: 9999:    child_->set_access([...]);
call    0 never executed
branch  1 never executed (fallthrough)
branch  2 never executed (throw)
    #####:10000:    setReadAccess(*child_);
    %%%%%:10000-block  0
call    0 never executed
branch  1 never executed (fallthrough)
branch  2 never executed (throw)
    #####:10001:    child_ = child_->add_child([...]);
    %%%%%:10001-block  0

To Reproduce
Steps to reproduce the behavior:

  1. Generate coverage data for a file with at least 10000 lines of code
  2. gcovr -r . --html-details -o coverage/index.html (or similar)
  3. gcovr dumps all -block lines with line number 10000 or higher, then fails with gcovr.formats.gcov.parser.UnknownLineType: %%%%%:10000-block 0

Expected behavior
_RE_BLOCK_LINE should matches lines 10000 and later

Desktop (please complete the following information):

  • OS: Debian testing
  • GCC version: Debian 13.2.0-13
  • GCOVR version 7.0

Additional context
When I deleted the .gcno file for the large .cpp file the report for the other files was generated successfully

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