https://sourceware.org/bugzilla/show_bug.cgi?id=26554
Bug ID: 26554 Summary: SIGSEGV in pe_dll_generate_implib Product: binutils Version: 2.36 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: markus.boeck02 at gmail dot com Target Milestone: --- Current HEAD of the repository (42afa120eb180bce52c692939cd179e3c02160d9) causes a segmentation fault when --out-implib is specified on the command line. The simplest reproduction is to take any C source file that has eg. an empty main in it and compile it with the command: gcc main.c -Wl,--out-implib,libout.dll.a with a gcc that targets a MinGW target. The SIGSEGV is caused by the dll_filename variable being NULL at the call to xstrdup in pe-dll.c:2823 The backtrace generated by gdb is: #0 0x00007ff9e320d2f1 in strlen () from C:\WINDOWS\System32\msvcrt.dll #1 0x00000000005600c7 in xstrdup (s=0x0) at ../../libiberty/xstrdup.c:33 #2 0x000000000043f41c in pep_dll_generate_implib (def=0x60148d0, impfilename=0x1797c0 "libcmTC_3e257.dll.a", info=0x6158e0 <link_info>) at ../../ld/pe-dll.c:2823 #3 0x0000000000430984 in gld_i386pep_finish () at ei386pep.c:1775 #4 0x0000000000425cda in ldemul_finish () at ../../ld/ldemul.c:101 #5 0x000000000041ae46 in lang_process () at ../../ld/ldlang.c:8185 #6 0x000000000041f4d8 in main (argc=71, argv=0x1725a0) at ../../ld/ldmain.c:494 #7 0x0000000000401434 in __tmainCRTStartup () at ../crt/crtexe.c:335 #8 0x000000000040113d in mainCRTStartup () at ../crt/crtexe.c:219 -- You are receiving this mail because: You are on the CC list for the bug.