Skip to content

SectionMap sentinel RuleContainer has no hash #1758

Description

The SectionMap constructor always creates a sentinel OutputSectionEntry with an empty name and pattern via insert("",""). The sentinel's RuleHash field stays as std::nullopt. Any code that iterates all output sections and dereferences getRuleHash() will trigger an assertion failure.

optional<T>::operator* called on a disengaged value

Activity

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

Metadata

Metadata

Labels

bugSomething isn't workingplugin

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions