https://sourceware.org/bugzilla/show_bug.cgi?id=33244

            Bug ID: 33244
           Summary: Crash in windres since 2.45
           Product: binutils
           Version: 2.45
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: reiter.christoph at gmail dot com
  Target Milestone: ---

Steps:

* Download and extract
https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-postgresql-17.5-3-any.pkg.tar.zst
* Run "windres mingw64/bin/psql.exe"
* Expected: No crash
* Actual:

```
$ windres  --version
GNU windres (GNU Binutils) 2.45
```

```
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007ff7c5c29174 in write_rc_resource (e=0x7ffae853da30 <msvcrt!_iob+48>,
type=0x35e5218, name=0x35e5278, res=0x0,
    language=0xfffd28) at ../../binutils-2.45/binutils/resrc.c:2157
warning: 2157   ../../binutils-2.45/binutils/resrc.c: No such file or directory
(gdb) bt
#0  0x00007ff7c5c29174 in write_rc_resource (e=0x7ffae853da30 <msvcrt!_iob+48>,
type=0x35e5218, name=0x35e5278,
    res=0x0, language=0xfffd28) at ../../binutils-2.45/binutils/resrc.c:2157
#1  0x00007ff7c5c28bed in write_rc_directory (e=0x7ffae853da30
<msvcrt!_iob+48>, rd=0x35e52a0, type=0x35e5218,
    name=0x35e5278, language=0xfffd28, level=3) at
../../binutils-2.45/binutils/resrc.c:2054
#2  0x00007ff7c5c2914a in write_rc_subdir (e=0x7ffae853da30 <msvcrt!_iob+48>,
re=0x35e5270, type=0x35e5218,
    name=0x35e5278, language=0xfffd28, level=2) at
../../binutils-2.45/binutils/resrc.c:2139
#3  0x00007ff7c5c28bc0 in write_rc_directory (e=0x7ffae853da30
<msvcrt!_iob+48>, rd=0x35e5240, type=0x35e5218,
    name=0x35e5278, language=0xfffd28, level=2) at
../../binutils-2.45/binutils/resrc.c:2044
#4  0x00007ff7c5c2914a in write_rc_subdir (e=0x7ffae853da30 <msvcrt!_iob+48>,
re=0x35e5210, type=0x35e5218, name=0x0,
    language=0xfffd28, level=1) at ../../binutils-2.45/binutils/resrc.c:2139
#5  0x00007ff7c5c28bc0 in write_rc_directory (e=0x7ffae853da30
<msvcrt!_iob+48>, rd=0x370f290, type=0x35e5218,
    name=0x0, language=0xfffd28, level=1) at
../../binutils-2.45/binutils/resrc.c:2044
#6  0x00007ff7c5c2899b in write_rc_file (filename=0x0, res_dir=0x370f290) at
../../binutils-2.45/binutils/resrc.c:1977
#7  0x00007ff7c5c235d8 in main (argc=2, argv=0x35e1d80) at
../../binutils-2.45/binutils/windres.c:1089
```

Downstream report: https://github.com/msys2/MINGW-packages/issues/24998

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to