Skip to content
Snippets Groups Projects
  1. Feb 04, 2021
  2. Feb 03, 2021
  3. Feb 02, 2021
  4. Feb 01, 2021
    • Simon McVittie (Collabora)'s avatar
      Expand test coverage for G_SPAWN_SEARCH_PATH · 9eb4fe3c
      Simon McVittie (Collabora) authored and Philip Withnall's avatar Philip Withnall committed
      
      Signed-off-by: Simon McVittie (Collabora)'s avatarSimon McVittie <smcv@collabora.com>
      9eb4fe3c
    • Thomas Haller's avatar
      spawn: prefer allocating buffers on stack for small sizes to avoid valgrind leaks · 8a3c3b8c
      Thomas Haller authored and Philip Withnall's avatar Philip Withnall committed
      We preallocate buffers that are used after forked. That is because
      malloc()/free() are not async-signal-safe and must not be used between
      fork() and exec().
      
      However, for the child process that exits without fork, valgrind wrongly
      reports these buffers as leaked.
      That can be suppressed with "--child-silent-after-fork=yes", but it is
      cumbersome.
      
      Work around by trying to allocate the buffers on the stack. At
      least in the common cases where the pointers are small enough
      so that we can reasonably do that.
      
      If the buffers happen to be large, we still allocate them on the heap
      and the problem still happens. Maybe we could have also allocated them
      as thread_local, but currently glib doesn't use that.
      
      [smcv: Cosmetic adjustments to address review comments from pwithnall]
      8a3c3b8c
    • Simon McVittie (Collabora)'s avatar
      Add test coverage for G_SPAWN_SEARCH_PATH · 136a9d7f
      Simon McVittie (Collabora) authored and Philip Withnall's avatar Philip Withnall committed
      
      For manual test coverage that would reproduce the bug fixed in !1902,
      copy /bin/true (or any other harmless executable) to
      /usr/bin/spawn-test-helper.
      
      Signed-off-by: Simon McVittie (Collabora)'s avatarSimon McVittie <smcv@collabora.com>
      136a9d7f
    • Simon McVittie (Collabora)'s avatar
      spawn: Don't set a search path if we don't want to search PATH · 0d50c6bb
      Simon McVittie (Collabora) authored and Philip Withnall's avatar Philip Withnall committed
      do_exec() and g_execute() rely on being passed a NULL search path
      if we intend to avoid searching the PATH, but since the refactoring
      in commit 62ce66d4, this was never done. This resulted in some spawn
      calls searching the PATH when it was not intended.
      
      Spawn calls that go through the posix_spawn fast-path were unaffected.
      
      The deprecated gtester utility, as used in GTK 3, relies on the
      ability to run an executable from the current working directory by
      omitting the G_SPAWN_SEARCH_PATH flag. This *mostly* worked, because
      our fallback PATH ends with ".". However, if an executable of the
      same name existed in /usr/bin or /bin, it would run that instead of the
      intended test: in particular, GTK 3's build-time tests failed if
      ImageMagick happens to be installed, because gtester would accidentally
      run display(1) instead of testsuite/gdk/display.
      
      Fixes: 62ce66d4 "gspawn: Don’t use getenv() in async-signal-safe context"
      Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977961
      0d50c6bb
  5. Jan 11, 2021
  6. Jan 08, 2021
  7. Jan 07, 2021
  8. Jan 04, 2021
    • Philip Withnall's avatar
      Merge branch '266.c89' into 'glib-2-66' · a7ad3fd3
      Philip Withnall authored
      gdatetime.c: Fix MSVC builds for lack of NAN items
      
      See merge request GNOME/glib!1831
      a7ad3fd3
    • Sebastian Dröge's avatar
      Merge branch 'backport-1827-win32-fd-read-glib-2-66' into 'glib-2-66' · 55ebcf05
      Sebastian Dröge authored
      Backport !1827 “Windows: fix FD_READ condition flag still set on recoverable UDP socket errors.” to glib-2-66
      
      See merge request GNOME/glib!1836
      55ebcf05
    • Marco Mastropaolo's avatar
      Windows: fix FD_READ condition flag still set on recoverable UDP socket errors. · 6900d53e
      Marco Mastropaolo authored and Philip Withnall's avatar Philip Withnall committed
      Contrary to what the WSARecvFrom seem to imply, a UDP socket is perfectly recoverable and usable after a WSAECONNRESET error (and, I assume, WSAENETRESET).
      However GSocket condition has the FD_READ bit set after a UDP socket fails with WSAECONNRESET, even if no data is available on the socket anymore; this causes select calls to report the socket as readable when, in fact, it's not.
      
      The change resets FD_READ flag on a socket upon the above error conditions; there's no 'if' to filter between datagram and stream sockets as the change should be harmless in the case of stream sockets which are, however, very unlikely to be usable after a WSAECONNRESET.
      6900d53e
  9. Dec 30, 2020
  10. Dec 21, 2020
Loading