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
    John Regehr (regehr@mastodon.social)'s status on Saturday, 25-Jan-2025 10:43:21 JST John Regehr John Regehr

    C and C++ people: I'm looking for an example -- for a target the supports unaligned memory operations -- where code that violates language-level memory alignment requirements is *not* compiled into something that works as one would naively expect.

    I vaguely remember people (almost certainly including @void_friend) discussing this some time ago, but I can't find the posts, argh

    In conversation about 4 months ago from mastodon.social permalink
    • Embed this notice
      Jeff "never puts away anything, especially oven mitts" Cliff, Bringer of Nightmares 🏴‍☠️🦝🐙 🇱🇧🧯 🇨🇦🐧 (jeffcliff@shitposter.world)'s status on Saturday, 25-Jan-2025 10:43:19 JST Jeff "never puts away anything, especially oven mitts" Cliff,  Bringer of Nightmares 🏴‍☠️🦝🐙 🇱🇧🧯 🇨🇦🐧 Jeff "never puts away anything, especially oven mitts" Cliff, Bringer of Nightmares 🏴‍☠️🦝🐙 🇱🇧🧯 🇨🇦🐧
      in reply to
      • John Ripley
      • John Marshall
      @johnm @regehr @jripley STOP USING GITHUB
      In conversation about 4 months ago permalink
    • Embed this notice
      John Regehr (regehr@mastodon.social)'s status on Saturday, 25-Jan-2025 10:43:20 JST John Regehr John Regehr
      in reply to
      • John Ripley

      @jripley yeah! one of the blog posts I linked is that exact scenario

      In conversation about 4 months ago permalink
    • Embed this notice
      John Marshall (johnm@genomic.social)'s status on Saturday, 25-Jan-2025 10:43:20 JST John Marshall John Marshall
      in reply to
      • John Ripley

      @regehr @jripley Our genomics library suffered from this on x86-64 a while back: data structures with unaligned uint32_ts crashed when user code was compiled with vectorisation. It was a shame that these uint32_t CIGAR entries weren't aligned in the first place, which I've long used as an example of the perils of bioinformaticians single-handedly designing formats without any input from anyone with a CS background… #ThisIsBioinformatics

      https://github.com/samtools/htslib/issues/400

      In conversation about 4 months ago permalink
    • Embed this notice
      John Ripley (jripley@mastodon.social)'s status on Saturday, 25-Jan-2025 10:43:21 JST John Ripley John Ripley
      in reply to

      @regehr There's an insidious problem on targets where the ISA has a few instructions which rely on alignment (e.g some SSE/AVX and even recent ARM). Unaligned access works until the optimizer figures out a way to save a cycle by using the faster vector op, and then it breaks. This turns into a heisenbug where any attempt to track it down breaks the optimization.

      In conversation about 4 months ago permalink
    • Embed this notice
      Edwin Török (edwintorok@discuss.systems)'s status on Tuesday, 28-Jan-2025 05:41:36 JST Edwin Török Edwin Török
      in reply to
      • John Marshall

      @johnm @regehr Another example. testcase that (used to) breaks with
      GCC -O3 on x86-64 https://github.com/Cisco-Talos/clamav/commit/c47e43ce354878de55f3521c9b8fbc887ed206f4
      Attempted fix https://github.com/Cisco-Talos/clamav/commit/2b481467801751d79d1bcd40878c070e7bc03bcb

      This was from ~17 years ago, and TBH I'm not convinced the "fix" avoids UB completely, but I assume someone would've found a unit test failure by now, but I see the code still looks the same now. Perhaps the only way to really avoid UB there is to use `memcpy`, and hope the compiler will be smart enough to optimize it away.

      In conversation about 4 months ago permalink

      Attachments

      1. Domain not in remote thumbnail source whitelist: opengraph.githubassets.com
        testcase for bb #890. · Cisco-Talos/clamav@c47e43c
        It fails on gcc-4.3 -O3 (-msse2) currently. git-svn: trunk@3764

    • Embed this notice
      Edwin Török (edwintorok@discuss.systems)'s status on Tuesday, 28-Jan-2025 05:43:47 JST Edwin Török Edwin Török
      in reply to

      @regehr @void_friend LLVM bug 6910: malloc/new only returns memory aligned to 8 bytes, but GCC would assume a 16-byte alignment.

      In conversation about 4 months ago permalink

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.