Skip to content
Snippets Groups Projects
  1. Feb 16, 2025
    • Roman Pišl's avatar
      advapi32: Hack: Don't inherit permissions from directory to file. · 568dfb99
      Roman Pišl authored
      Otherwise executable flag is inherited from directory to file,
      which breaks Pkg tree hash.
      568dfb99
    • Roman Pišl's avatar
      server/file: Respect executable attribute. · 69c9b6ab
      Roman Pišl authored
      Otherwise all readable files are marked as executable which breaks Pkg tree hash.
      69c9b6ab
    • Keno Fischer's avatar
      conhost: Disable VT100 output processing for the time being · c2b92104
      Keno Fischer authored
      
      Wine's conhost does not currently have a full VT100 interpreter on
      the output size (i.e. for Win32 applications sending VT100 text).
      However, Wine also does not prevent applications from asking for
      VT100 processing, which makes applications assume that Wine does
      support it. Of course it would be best to simply implement VT100
      processing, but since that's a fair bit of code, just prevent
      applications from setting the VT100 mode for now, forcing them
      to fall back to non-VT100 mode and hopefully fixing the output
      until wine implements a full VT100 interpreter.
      
      Signed-off-by: default avatarKeno Fischer <keno@juliacomputing.com>
      c2b92104
    • Keno Fischer's avatar
      ntdll/server: Make robust to spurious short writes · 0cace5ed
      Keno Fischer authored
      
      It is possible for the write/writev functions in send_request to
      return short writes, even in non-error conditions. There are
      several situations where this might happen. Examples are:
       - SIGSTOP/SIGCONT (either explicitly or via ptrace attach)
       - cgroup freezes and similar mechanisms
       - system suspends
       - External debuggers or profilers
      
      In general, Linux makes very few guarantees about syscall restarts.
      In some cases (in particular when no bytes have been transferred at all),
      the linux kernel will automatically restart the system call, but once any
      bytes have been transferred, the result will be a short write with
      no automatic restart.
      
      Make wine robust to this corner case by properly restarting a
      short write with adjusted buffers.
      
      Signed-off-by: default avatarKeno Fischer <keno@juliacomputing.com>
      0cace5ed
    • Keno Fischer's avatar
      conhost: Fix status for READ_CONSOLE ioctl · 74a76bb5
      Keno Fischer authored
      
      Without this patch conhost would attempt to process non-existent input,
      spewing stdout with various cursor moves and incorrectly returning
      the ReadConsole call early. Fix that by only attempting input processing
      if there are actually input records to be processed and properly
      returning STATUS_PENDING if the input processing is not yet complete.
      
      Signed-off-by: default avatarKeno Fischer <keno@juliacomputing.com>
      74a76bb5
  2. Feb 09, 2025
    • Bernhard Übelacker's avatar
      ws2_32: Do not fail in closesocket for unknown socket. · 79740faf
      Bernhard Übelacker authored
      This makes cygwin64's rsync happy. It seems to fork a child process
      of itself which wants to close sockets derived from the parent process.
      
      Kind of related Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54995
      Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56927
      
      rsync -aq --delete-before dir-a dir-b
        rsync: [Receiver] Failed to dup/close: Socket operation on non-socket (108)
        rsync error: error in IPC code (code 14) at pipe.c(157) [Receiver=3.2.7]
        rsync: connection unexpectedly closed (0 bytes received so far) [sender]
        rsync error: error in rsync protocol data stream (code 12) at io.c(231) [sender=3.2.7]
      79740faf
    • Bernhard Übelacker's avatar
      server: Return some non-zero value in member WriteQuotaAvailable. · 2f8079e9
      Bernhard Übelacker authored
      Cygwin in version 3.5.4 or later relies in having the WriteQuotaAvailable
      member of a NtQueryInformationFile(FilePipeLocalInformation) query
      to be non-zero.
      
      This causes mintty.exe not being able to show the bash.exe output
      when running in wine.
      
      Unconditionally returning WriteQuotaAvailable=1 causes
      "C:\\msys64\\usr\\bin\\pacman.exe -T cocom git ..." to never return,
      hanging with a gpg.exe child process.
      
      A bisect of cygwin1.dll led to this commit:
        49018bf5774fc90ddddc762a8462030c5d528643 is the first broken commit
        commit 49018bf5774fc90ddddc762a8462030c5d528643
        Author: Takashi Yano <takashi.yano@nifty.ne.jp>
        Date:   Mon Jul 1 17:44:53 2024 +0900
          Cygwin: pty: Avoid client deadlock when pty master stops to read.
      
      https://www.cygwin.com/cgit/newlib-cygwin/commit/?h=cygwin-3_5-branch&id=49018bf5774fc90ddddc762a8462030c5d528643
      https://www.cygwin.com/cgit/newlib-cygwin/commit/?id=c4fb5da2787693ea3bf20b2ac847f2c7d50da67c
      
      
      Installing cygwin/msys2 or reproducing this issue
      might need several other patches from this tree:
      https://gitlab.winehq.org/bernhardu/wine/-/commits/msys2-cygwin_2024-11-16/?ref_type=heads
      
      Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57424
      2f8079e9
    • Bernhard Übelacker's avatar
    • Bernhard Übelacker's avatar
      server: Reset reported_events if socket gets reused. · ed0cf882
      Bernhard Übelacker authored
      MSYS setup tries to setup some pacman/gpg key configuration.
      This involves starting dirmngr.exe which unfortunately hangs.
      Therefore gpg reports:
        gpg: connecting dirmngr at '/etc/pacman.d/gnupg/S.dirmngr' failed: IPC connect call failed
      And fails therefore "silently".
      
      The hang in dirmngr.exe looks to be a result of reusing a socket twice.
      When the first connection attempt failed, wineserver still has
      the reported_events set.
      Therefore on the second attempt WSAEnumNetworkEvents does no longer
      report those events.
      But fhandler_socket_wsock::wait_for_events gets just left when
      there are some events received.
      
      Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53574
      
      dirmngr.exe --server --no-detach --homedir /etc/pacman.d/gnupg --verbose
      
      (gdb) bt
      #0  fhandler_socket_wsock::evaluate_events (this=0x800028718, event_mask=48, events=@0x67dfc278: 0, erase=true) at /home/bernhard/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/cygwin/fhandler/socket_inet.cc:307
      #1  0x000000018015a287 in fhandler_socket_wsock::wait_for_events (this=0x800028718, event_mask=48, flags=0) at /home/bernhard/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/cygwin/fhandler/socket_inet.cc:404
      #2  0x000000018015b267 in fhandler_socket_inet::connect (this=0x800028718, name=0x67dfc810, namelen=16) at /home/bernhard/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/cygwin/fhandler/socket_inet.cc:802
      #3  0x000000018008c63c in cygwin_connect (fd=3, name=0x67dfc810, namelen=16) at /home/bernhard/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/cygwin/net.cc:709
      #4  0x00000001801c348b in _sigfe () at sigfe.s:36
      #5  0x00000005a3099a57 in __assuan_connect (ctx=<optimized out>, sock=<optimized out>, addr=<optimized out>, length=<optimized out>) at system-posix.c:430
      #6  0x00000005a30922c6 in _assuan_connect (ctx=ctx@entry=0xa00020830, sock=sock@entry=3, addr=addr@entry=0x67dfc810, length=length@entry=16) at system.c:412
      #7  0x00000005a30989c8 in socks5_connect (ctx=ctx@entry=0xa00020830, sock=sock@entry=3, socksport=socksport@entry=9050, credentials=credentials@entry=0x0, hostname=hostname@entry=0x5a309d7fa <okstr+1466> "", hostport=hostport@entry=0, addr=addr@entry=0x0, length=length@entry=0) at assuan-socket.c:754
      #8  0x00000005a3099315 in _assuan_sock_connect_byname (ctx=0xa00020830, host=host@entry=0x0, port=port@entry=0, reserved=reserved@entry=0, credentials=credentials@entry=0x0, flags=flags@entry=2) at assuan-socket.c:1148
      #9  0x00000005a30993f7 in assuan_sock_connect_byname (host=host@entry=0x0, port=port@entry=0, reserved=reserved@entry=0, credentials=credentials@entry=0x0, flags=flags@entry=2) at assuan-socket.c:1497
      #10 0x0000000100402531 in dirmngr_use_tor () at dirmngr.c:607
      #11 0x000000010040256c in set_tor_mode () at dirmngr.c:582
      #12 0x00000001004025eb in post_option_parsing () at dirmngr.c:898
      #13 0x0000000100403532 in main (argc=<optimized out>, argv=<optimized out>) at dirmngr.c:1211
      (gdb) print evts.lNetworkEvents
      $1 = 0
      ed0cf882
    • Bernhard Übelacker's avatar
      ntdll: Add read and write to new guard pages. · cc8222e7
      Bernhard Übelacker authored
      cygwin64: LANG=C wine c:/cygwin64/bin/mintty.exe
      msys2-64: LANG=C wine c:/msys64/usr/bin/mintty.exe
      
      Based on patch by Zeb Figura:
        https://bugs.winehq.org/attachment.cgi?id=70483
        https://bugs.winehq.org/show_bug.cgi?id=47808
      
      Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55138
      cc8222e7
    • Bernhard Übelacker's avatar
      TEMP: Print fixme just once. · bb307b8c
      Bernhard Übelacker authored
      Visible with:
      - pacman -Suy
      - wine taskmgr.exe
      - wine msys2-x86_64-20230318.exe
          0114:fixme:icon:NtUserDrawIconEx Error retrieving icon frame 0
      - wine bash.exe
      - wine64 procexp64.exe
      bb307b8c
  3. Feb 08, 2025
  4. Jan 21, 2025
  5. Jan 17, 2025
  6. Jan 16, 2025
  7. Jan 14, 2025
  8. Jan 13, 2025
  9. Jan 10, 2025
  10. Jan 09, 2025
Loading