GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Alan Coopersmith (alanc@fosstodon.org)'s status on Monday, 23-Sep-2024 12:11:03 JST Alan Coopersmith Alan Coopersmith

    So much fun when clang optimizes out your autoconf checks:
    https://gitlab.freedesktop.org/xorg/util/macros/-/issues/4

    In conversation about a year ago from fosstodon.org permalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: gitlab.freedesktop.org
      Clang optimization results in inconsistent XORG_CHECK_MALLOC_ZERO behavior (#4) · Issues · xorg / util / macros · GitLab
      Hello! I encountered an issue when attempting to build libXt-1.3.0 using clang version 17. The build process failed due to the use of XORG_CHECK_MALLOC_ZERO in...
    • Embed this notice
      Jann Horn (jann@infosec.exchange)'s status on Monday, 23-Sep-2024 12:11:03 JST Jann Horn Jann Horn
      in reply to

      @alanc trying to determine at build time if malloc can return NULL seems kinda unsafe anyway? like, what if the same kind of compiler optimization also applies to the code that uses the macro, or if an update to the libc changes this behavior?

      In conversation about a year ago permalink
    • Embed this notice
      Alan Coopersmith (alanc@fosstodon.org)'s status on Monday, 23-Sep-2024 12:11:03 JST Alan Coopersmith Alan Coopersmith
      in reply to
      • Jann Horn

      @jann this is true, as is the concern that LD_PRELOADing a different malloc implementation is risky, but X11 has gotten away with it for almost 20 years now. (For the twenty years before that, it was hardcoded per-platform in the Imake config files.)

      I believe it's mostly an optimization to not have to use a malloc wrapper macro that does (size == 0 ? 1 : size) to the size argument everywhere, and that level of micro-optimization may be pointless now compared to 40 years ago.

      In conversation about a year ago permalink
      Haelwenn /элвэн/ :triskell: likes this.
    • Embed this notice
      Jann Horn (jann@infosec.exchange)'s status on Monday, 23-Sep-2024 12:11:22 JST Jann Horn Jann Horn
      in reply to

      @alanc aah, and I guess that also means it's safe if the compiler optimizes malloc(0) into NULL when the libc doesn't do that, only the other direction would break stuff...

      In conversation about a year ago permalink
    • Embed this notice
      Alan Coopersmith (alanc@fosstodon.org)'s status on Monday, 23-Sep-2024 12:11:22 JST Alan Coopersmith Alan Coopersmith
      in reply to
      • Jann Horn

      @jann probably the safest fix is to find and fix all the code in X11 that assumes malloc(0) returns a valid pointer, such as https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/86e71472bc826ac5c850e200cb3820485b5689cf and gcc's -Walloc-zero warnings may help there, but X11 is large and full of cruft.

      In conversation about a year ago permalink

      Attachments

      1. Domain not in remote thumbnail source whitelist: gitlab.freedesktop.org
        SetFontPath: if ndirs is 0, skip work to make a list of directories (86e71472) · Commits · xorg / lib / libX11 · GitLab
        Clears warning from gcc 14.1: SetFPath.c: In function ‘XSetFontPath’: ../include/X11/Xlibint.h:463:24: warning: argument 1 value is zero [-Walloc-zero] 463 | # define Xmalloc(size) malloc((size_t)(size)) | ^~~~~~~~~~~~~~~~~~~~~~ SetFPath.c:61:18: note: in expansion of...
      Haelwenn /элвэн/ :triskell: likes this.

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.