1. 25 Feb, 2022 36 commits
  2. 17 Dec, 2021 4 commits
    • Simon McVittie's avatar
    • Simon McVittie's avatar
      Update NEWS · f6e894ef
      Simon McVittie authored
      
      Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
      f6e894ef
    • Simon McVittie's avatar
      internals: Use Standard C offsetof macro if available · b44e0cc9
      Simon McVittie authored
      
      
      clang 13 fails to compile our current implementation with:
      
      .../dbus/dbus-message.c:2070:3: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant]
        _DBUS_STATIC_ASSERT (_DBUS_ALIGNOF (DBusMessageRealIter) <=
        ^
      .../dbus/dbus-internals.h:460:25: note: expanded from macro '_DBUS_STATIC_ASSERT'
        typedef struct { char _assertion[(expr) ? 1 : -1]; } \
      
      This appears to be because the "traditional" definition of
      offsetof(), which we're hard-coding here, does not qualify as a constant
      expression under C rules due to its use of pointer casts.
      
      Modern compilers like gcc and clang have a built-in implementation
      of offsetof that *is* a constant expression.
      Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
      (cherry picked from commit a24cf746)
      b44e0cc9
    • Jean-Louis Fuchs's avatar
      disable fork-malloc-exec for non-glibc-systems · d13349f2
      Jean-Louis Fuchs authored and Simon McVittie's avatar Simon McVittie committed
      Calling malloc() after fork is undefined behaviour if the process is
      multi-threaded. locks held by a thread on fork() will never be released.
      malloc() is usally protected by a lock and can therefore deadlock. glibc
      is known not to deadlock in this case.
      
      This commit does not rule out other problems on glibc-systems, but fixes an
      issue on musl-libc-systems. Only restricting to async-signal safe functions
      between fork() and exec() prevents undefined behaviour for sure. See
      signal-safety(7).
      
      (cherry picked from commit 3fab06d6)
      d13349f2