[llvm-bugs] [Bug 36785] New: lld mingw64: invalid memory access leads to deadlock

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Mar 18 05:06:07 PDT 2018


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

            Bug ID: 36785
           Summary: lld mingw64: invalid memory access leads to deadlock
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: COFF
          Assignee: unassignedbugs at nondot.org
          Reporter: daniel.f.starke at freenet.de
                CC: llvm-bugs at lists.llvm.org

Created attachment 20086
  --> https://bugs.llvm.org/attachment.cgi?id=20086&action=edit
drmemory extract

I build clang/llvm 6.0.0 including lld with GCC 7.3.0 for mingw-w64 using
https://sourceforge.net/projects/gcc-win64/files/7.3.0/ and the following
configuration:
cmake -G 'Ninja' -DCMAKE_BUILD_TYPE=Debug -DDEFAULT_SYSROOT=/mingw64-64
-DGCC_INSTALL_PREFIX=/mingw64-64 -DCMAKE_INSTALL_PREFIX=/mingw64-64
'-DCMAKE_C_FLAGS=' '-DCMAKE_CXX_FLAGS=-std=c++14' '-DLLVM_TARGETS_TO_BUILD=X86'
-DLLVM_BUILD_TESTS=OFF -DLLVM_INCLUDE_TESTS=OFF -DCLANG_INCLUDE_DOCS=OFF
-DBUILD_SHARED_LIBS=OFF -DLLVM_POLLY_LINK_INTO_TOOLS=ON ../llvm-6.0.0.src
and this patch:
https://reviews.llvm.org/D43786

I replaced my system ld.exe with lld.exe and executed the following
command-line:
ld.exe --sysroot=E:/msys/mingw64-64 -s -m i386pep -Bstatic -o bin/pp.exe -s
"E:/msys/mingw64-64\x86_64-w64-mingw32\lib\crt2u.o"
"E:/msys/mingw64-64\lib\gcc\x86_64-w64-mingw32\7.3.0\crtbegin.o" -Llib64
-L../libpcfxx/lib64 "-LE:/msys/mingw64-64\lib\gcc\x86_64-w64-mingw32\7.3.0"
"-LE:/msys/mingw64-64\x86_64-w64-mingw32\lib" "-LE:/msys/mingw64-64\lib"
"-LE:/msys/mingw64-64\x86_64-w64-mingw32/sys-root/mingw/lib" --icf=all
--gc-sections bin/pp.o bin/posix_main.o bin/pp/Script.o bin/pp/Execution.o
bin/pp/Variable.o bin/pp/Shell.o bin/pp/Database.o bin/pp/Type.o
bin/pp/parser/Utility.o -lpcfxx -lboost_program_options -lboost_locale
-lboost_filesystem -lboost_iostreams -lboost_date_time -lboost_thread
-lboost_regex -lboost_system -lpcf -lsqlite3 -lws2_32 -lstdc++ --start-group
-lmingw32 -lgcc -lmoldname -lmingwex -lpthread -lmsvcrt -ladvapi32 -lshell32
-luser32 -lkernel32 --end-group
"E:/msys/mingw64-64\lib\gcc\x86_64-w64-mingw32\7.3.0\crtend.o"

This resulted in a deadlock within lld. I re-executed all with drmemory and got
the output with invalid memory access errors (see attachment).

The used lld.exe executable with debug symbols can be found here:
https://www.sendspace.com/file/12dj2d

-- 
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/20180318/2e0126f8/attachment.html>


More information about the llvm-bugs mailing list