Skip to content

lld-link LTO doesn't support comdat selection kinds #113974

Open
@rnk

Description

@rnk

This code in LLD COFF doesn't ever look at the LLVM IR comdat selection kind, so it doesn't implement selection kinds other than "any". It simply boils comdats down to a boolean, rather than a selection kind.

This means that mixing RTTI code with no-RTTI code can crash at runtime because the static linker forgot to implement IMAGE_COMDAT_SELECT_LARGEST or the largest comdat selection kind (LangRef).

A Chrome-related user exercised these conditions and reported those symptoms, and I'm reasonably convinced I've spotted the bug by looking at the source code. The source does say "// FIXME: Check nodeduplicate" after all. =S

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions