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
    Jann Horn (jann@infosec.exchange)'s status on Saturday, 29-Mar-2025 07:18:57 JST Jann Horn Jann Horn

    Wow, __builtin_dump_struct is an amazing clang feature, how did I never hear about this before?

    $ cat test.c
    #include <stdio.h>

    struct nested {
    int n;
    };
    struct foo {
    int member_a;
    unsigned long member_b;
    char *str;
    void *ptr;
    struct nested nested;
    };

    int main(void) {
    struct foo f = {
    .member_a = 123,
    .member_b = 0x4141414141414141,
    .str = "foobar",
    .ptr = &f,
    .nested = {.n = 42}
    };
    __builtin_dump_struct(&f, printf);
    }
    $ clang -o test test.c && ./test
    struct foo {
    int member_a = 123
    unsigned long member_b = 4702111234474983745
    char * str = "foobar"
    void * ptr = 0x7fff1df41b78
    struct nested nested = {
    int n = 42
    }
    }

    The original version of this feature was introduced back in 2018 (though it was reimplemented since in 2022).

    In conversation about 3 months ago from infosec.exchange permalink
    • Haelwenn /элвэн/ :triskell: likes this.
    • Embed this notice
      Ryan Castellucci :nonbinary_flag: (ryanc@infosec.exchange)'s status on Saturday, 29-Mar-2025 19:49:49 JST Ryan Castellucci :nonbinary_flag: Ryan Castellucci :nonbinary_flag:
      in reply to

      @jann wow this is amazeballs

      In conversation about 3 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.