Skip to content

[LLD] Linker crashes when trying to parse ':ALIGN' #146722

@parth-07

Description

@parth-07

If there is no space between ":" and ALIGN, linker will misparse the following script:

SECTIONS
{
  S :ALIGN(4096) {}
}

Moreover, when recovering from this error, it will enter infinite recursion and overflow the stack.

Thank you @quic-akaryaki for finding this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashPrefer [crash-on-valid] or [crash-on-invalid]lld:ELF

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions