https://bugs.llvm.org/show_bug.cgi?id=45950

            Bug ID: 45950
           Summary: LLD generates duplicate .pdata chunks
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: COFF
          Assignee: unassignedb...@nondot.org
          Reporter: alexandre.ga...@ubisoft.com
                CC: llvm-bugs@lists.llvm.org, pe...@pcc.me.uk,
                    r...@google.com

We stumped on a case where LLD generates two identical RUNTIME_FUNCTION for the
same function, but with different UNWIND_INFO. This looks like an error, for
the same .OBJs, link.exe does not generate duplicates.

Function Table

           Begin    End      Info      Function Name

0049D0DC 0554E9D0 0554E9F7 06ACBCE8
   Unwind version: 1
   Unwind flags: EHANDLER UHANDLER
   Size of prologue: 0x0A
   Count of codes: 2
   Unwind codes:
     0A: ALLOC_SMALL, size=0x30
     06: PUSH_NONVOL, register=rbp
   Handler: 05503340 
0049D0E8 0554E9D0 0554E9F7 06ACB0E8
   Unwind version: 1
   Unwind flags: EHANDLER UHANDLER
   Size of prologue: 0x0A
   Count of codes: 2
   Unwind codes:
     0A: ALLOC_SMALL, size=0x30
     06: PUSH_NONVOL, register=rbp
   Handler: 05503340

Here, we get two RUNTIME_FUNCTION for function 0554E9D0, but two different
Info/UNWIND_INFO.

Interestingly, for the same inputs, we get a different number of entries
between different linkers:
   VS2019 16.5.4 link.exe : Function Table (316955)
   LLD 8.0:                 Function Table (316888)
   LLD 10.0:                Function Table (316959)

Any idea of what could be going on here? I was under the impression that we
need more than xxHash64 folding for .pdata chunks? Maybe a specific step after
ICF? I will dig next week.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to