[llvm-bugs] [Bug 38645] New: [COFF] LLD Crashing binary when compiling with LDC and build with LLD

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 20 12:07:41 PDT 2018


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

            Bug ID: 38645
           Summary: [COFF] LLD Crashing binary when compiling with LDC and
                    build with LLD
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: COFF
          Assignee: unassignedbugs at nondot.org
          Reporter: radu.racariu at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20747
  --> https://bugs.llvm.org/attachment.cgi?id=20747&action=edit
Program D source code

When compiling the attached program with LDC 1.11.0 (latest release ATM) and
linking with LLD for Win32 x86-64 the resulting binary will crash with an
access violation.

The same program linked with the MS linker works.

To get LDC 1.11.0, download the Window x86-64 variant
https://github.com/ldc-developers/ldc/releases/download/v1.11.0/ldc2-1.11.0-windows-x64.7z

The setup used Visual Studio Community 2017 for the system libraries.

Command line for building the binary:

```
%LDC_HOME%\bin\ldc2.exe -m64 -v -linker=lld-link bug.d
```

This will print the linker parameters also.

The probable cause is related with the size of the .rdata section, as by
reducing the size of the big enum string in the example program the crash
disappears.

This bug is also tracked at https://github.com/ldc-developers/ldc/issues/2823

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180820/a007a686/attachment.html>


More information about the llvm-bugs mailing list