Hello, After some investigation and help (http://sourceware.org/ml/binutils/2010-02/msg00111.html), I've been able to simplify this problem.
On Open Solaris 2009.06 i386, GCC 3.4.3 or GCC 4.3.2, with Binutils 2.20 configured as: ./configure --target='i686-pc-mingw32' --prefix='/export/home/tony/usr' Windres segfaults when running this command (with pthread.h, version.rc, and winver.h in .): i686-pc-mingw32-windres --include-dir=. --preprocessor="gcc -E -xc -DRC_INVOKED" version.rc version.o The gdb output: Starting program: /export/home/tony/usr/bin/i686-pc-mingw32-windres --include-dir=. --preprocessor=gcc\ -E\ -xc\ -DRC_INVOKED version.rc version.o Program received signal SIGSEGV, Segmentation fault. 0xcea46832 in iconv () from /lib/libc.so.1 #0 0xcea46832 in iconv () from /lib/libc.so.1 #1 0x08071dbd in iconv_onechar (cd=0xffffffff, s=0x8105390 "FileDescription", d=0x8046960 "\022", d_len=32, n_s=0xffffffff, n_d=0xffffffff) at winduni.c:633 #2 0x08071fc3 in wind_MultiByteToWideChar (cp=4294967295, mb=0x8105390 "FileDescription", u=0x0, u_len=0) at winduni.c:694 #3 0x08072052 in unicode_from_codepage (length=0x0, u=0x8105390, src=0x8105390 "FileDescription", cp=0) at winduni.c:584 #4 0x080720ae in unicode_from_ascii (length=0x0, unicode=0x8046a48, ascii=0x8105390 "FileDescription") at winduni.c:194 #5 0x0806e74f in yyparse () at rcparse.y:1703 #6 0x08064c2e in read_rc_file (filename=0x8047b1d "version.rc", preprocessor=0x8047b05 "gcc -E -xc -DRC_INVOKED", preprocargs=0x8107170 "-I.", language=1033, use_temp_file=0) at resrc.c:562 #7 0x08063aee in main (argc=5, argv=0x8047990) at windres.c:1025 Continuing. Program terminated with signal SIGSEGV, Segmentation fault. The program no longer exists. If a codepage is specified via the -c option or by defining the macro CP_ACP in binutils/winduni.h, the segfault no longer occurs. I've attached the three files and also the core dump. Please let me know if I can provide any further details. Thanks, Tony -- Summary: Windres segfault on Open Solaris with default codepage Product: binutils Version: 2.20 Status: NEW Severity: normal Priority: P2 Component: binutils AssignedTo: unassigned at sources dot redhat dot com ReportedBy: tonyt at logyst dot com CC: bug-binutils at gnu dot org GCC build triplet: i386-pc-solaris2.11 GCC host triplet: i386-pc-solaris2.11 GCC target triplet: i686-pc-mingw32 http://sourceware.org/bugzilla/show_bug.cgi?id=11280 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils