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
    nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Saturday, 03-May-2025 13:50:28 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
    ALRIGHT THATS 83 LINES OF LINKED LIST CREATION CODE LETS SEE IF THIS WORKS FIRST TRY
    In conversation about a month ago from lab.nyanide.com permalink
    • soberano likes this.
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 13:51:27 JST pwm pwm
      in reply to
      @nyanide you_dereferenced_a_null_pointer.mpeg
      In conversation about a month ago permalink
      prettygood repeated this.
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Saturday, 03-May-2025 14:06:32 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • pwm
      @pwm :kannadie:
      In conversation about a month ago permalink

      Attachments


      1. https://meds.lab.nyanide.com/media/bd/c8/f1/bdc8f1d81ee0193a7c8a8ab73f2604020f9eceb18c301f70ddca86056353f8aa.png
      prettygood and pwm like this.
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:07:13 JST pwm pwm
      in reply to
      @nyanide CALLED IT
      In conversation about a month ago permalink
      prettygood likes this.
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Saturday, 03-May-2025 14:12:33 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • pwm
      @pwm omg even better, it segfaulted at a free lmfao
      In conversation about a month ago permalink
      pwm likes this.
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:13:14 JST pwm pwm
      in reply to
      @nyanide YOU FREED AN INVALID POINTER
      In conversation about a month ago permalink
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: likes this.
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Saturday, 03-May-2025 14:17:10 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • pwm
      @pwm uh, it tried to free NULL which i thought free would just ignore
      In conversation about a month ago permalink
      pwm likes this.
      pwm repeated this.
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Saturday, 03-May-2025 14:17:46 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • pwm
      @pwm idk maybe i dreamt this but i remember saying "omg free actually freed null!!!" and people were telling me "its in the spec buckaroo" and i was mystified
      In conversation about a month ago permalink
      pwm likes this.
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:19:36 JST pwm pwm
      in reply to
      @nyanide You can't free NULL, why would you ever free null? Only thing I could come up with is some sort of way to signal an internal state in free() but there is no such state
      In conversation about a month ago permalink
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: likes this.
    • Embed this notice
      :ihavenomouth: (inginsub@clubcyberia.co)'s status on Saturday, 03-May-2025 14:19:39 JST :ihavenomouth: :ihavenomouth:
      in reply to
      • pwm
      @nyanide @pwm it wasn’t null enough
      In conversation about a month ago permalink
      pwm likes this.
    • Embed this notice
      Hildegunst von Mythenmetz of programming (condret@shitposter.world)'s status on Saturday, 03-May-2025 14:19:55 JST Hildegunst von Mythenmetz of programming Hildegunst von Mythenmetz of programming
      in reply to
      • pwm
      @nyanide @pwm it should ignore that
      In conversation about a month ago permalink
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Saturday, 03-May-2025 14:20:11 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • pwm
      @pwm i just wanted to be lazy and ignore null checking
      In conversation about a month ago permalink
      pwm likes this.
    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Saturday, 03-May-2025 14:20:25 JST gentoobro gentoobro
      in reply to
      • pwm

      #define free(x) do { if(x) free(x); } while(0)

      In conversation about a month ago permalink
      pwm likes this.
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:20:49 JST pwm pwm
      in reply to
      • Hildegunst von Mythenmetz of programming
      @condret @nyanide My guess is that it's undefined behavior/implementation defined
      In conversation about a month ago permalink
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: likes this.
    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Saturday, 03-May-2025 14:20:55 JST gentoobro gentoobro
      in reply to
      • pwm

      Also, if you don't know about and use valgrind, you should.

      In conversation about a month ago permalink
      pwm likes this.
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:21:16 JST pwm pwm
      in reply to
      • gentoobro
      @gentoobro @nyanide It's CY10, everyone hardnosed enough to still use C knows about valgrind (I think)
      In conversation about a month ago permalink
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: likes this.
    • Embed this notice
      :ihavenomouth: (inginsub@clubcyberia.co)'s status on Saturday, 03-May-2025 14:21:32 JST :ihavenomouth: :ihavenomouth:
      in reply to
      • pwm
      @nyanide @pwm free does that internally
      In conversation about a month ago permalink
      Forest of Enchantment and nyanide :nyancat_rainbow::nyancat_body::nyancat_face: like this.
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:21:34 JST pwm pwm
      in reply to
      • gentoobro
      • pwm
      @gentoobro @nyanide Though he might still be a lazy bum
      In conversation about a month ago permalink
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: likes this.
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Saturday, 03-May-2025 14:23:03 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • gentoobro
      • pwm
      @gentoobro @pwm i use it all the time when i write code, i'm planning to use it to try to find any potential memory leaks in this questionable code later
      In conversation about a month ago permalink
    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Saturday, 03-May-2025 14:24:18 JST gentoobro gentoobro
      in reply to
      • pwm

      You never know. It's not mentioned in a lot of tutorials, and if you're working on a linked list and getting basic errors, you might be new. I don't keep track of who's at what general level.

      In conversation about a month ago permalink
      pwm likes this.
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: repeated this.
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:24:35 JST pwm pwm
      in reply to
      • gentoobro
      @gentoobro @nyanide kirby is just drunk and high and can't remember up from down
      In conversation about a month ago permalink
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Saturday, 03-May-2025 14:26:10 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • gentoobro
      • pwm
      @pwm @gentoobro i'll prove your point: i don't actually know what free free'd, i just saw these 2 lines and assumed it free'd NULL even though failure calls a helper function which destroys the linked list
      In conversation about a month ago permalink

      Attachments


      1. https://meds.lab.nyanide.com/media/eb/1f/86/eb1f86ea44a5757edb5597fb6a6cf31023c1939da28315e16c242af59de90716.png
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Saturday, 03-May-2025 14:26:46 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • gentoobro
      • pwm
      @pwm @gentoobro i like, need to get myself checked out i swear
      In conversation about a month ago permalink
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:27:24 JST pwm pwm
      in reply to
      • gentoobro
      @nyanide @gentoobro Well if your helper function frees the data pointed too by the field string then that's your problem, you are explicitly freeing null when it's null
      In conversation about a month ago permalink
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:27:42 JST pwm pwm
      in reply to
      • gentoobro
      • pwm
      @nyanide @gentoobro and if that doesn't check before freeing then that's that
      In conversation about a month ago permalink
    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Saturday, 03-May-2025 14:28:00 JST gentoobro gentoobro
      in reply to
      • pwm

      It didn't fall back into the debugger so you could inspect it?

      You weren't testing code outside of a debugger were you? ... were you?

      In conversation about a month ago permalink
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:28:00 JST pwm pwm
      in reply to
      • gentoobro
      @gentoobro @nyanide debugger is bloat, god gave us printf
      In conversation about a month ago permalink
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:30:36 JST pwm pwm
      in reply to
      • gentoobro
      @gentoobro @nyanide macros are bloat debuggers are bloat everything I don't like is bloat

      I use clion btw
      In conversation about a month ago permalink
    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Saturday, 03-May-2025 14:30:37 JST gentoobro gentoobro
      in reply to
      • pwm

      Debugger tells you where your shit crashed, and lets you see which variable is at fault.

      Also, wrap your printf something like this:

      #define dbg(fmt, ...) dprintf(STDERR_FILENO, "%s:%d " fmt "\n", strstr(__FILE__, "src/"), __LINE__ __VA_OPT__(,) __VA_ARGS__);
      In conversation about a month ago permalink
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Saturday, 03-May-2025 14:30:52 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • gentoobro
      • pwm
      @gentoobro @pwm my mind is literally scrambled eggs dude

      here's whats happening:
      - failure state is triggered
      - i go to mindlessly say that free somehow segfaulted at freeing null
      - i then realize after like 5 posts that that was not the case and came to the correct conclusion that something in the helper function went wrong
      In conversation about a month ago permalink
    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Saturday, 03-May-2025 14:31:37 JST gentoobro gentoobro
      in reply to
      • pwm

      Proper C should be 70% macros.

      In conversation about a month ago permalink
      pwm likes this.
    • Embed this notice
      Hildegunst von Mythenmetz of programming (condret@shitposter.world)'s status on Saturday, 03-May-2025 14:31:42 JST Hildegunst von Mythenmetz of programming Hildegunst von Mythenmetz of programming
      in reply to
      • pwm
      @pwm @nyanide i'm very sure this is defined behaviour
      In conversation about a month ago permalink
      pwm likes this.
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Saturday, 03-May-2025 14:31:58 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • Hildegunst von Mythenmetz of programming
      • pwm
      @condret @pwm no yeah it's working fine, free tries to free null a few more times in the code i just, mindlessly assumed it did after a failure state was triggered
      In conversation about a month ago permalink
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:32:09 JST pwm pwm
      in reply to
      • Hildegunst von Mythenmetz of programming
      @condret @nyanide /shrug I can't say I've done it in recent history but I could see the argument for it being defined as a no-op
      In conversation about a month ago permalink
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:32:36 JST pwm pwm
      in reply to
      • Hildegunst von Mythenmetz of programming
      @nyanide @condret you know what they say about assuming (and not using a debugger you freak)
      In conversation about a month ago permalink
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: likes this.
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Saturday, 03-May-2025 14:33:06 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • Hildegunst von Mythenmetz of programming
      • pwm
      @pwm @condret gdb has been open for like 15 minutes lmfao
      In conversation about a month ago permalink
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Saturday, 03-May-2025 14:33:38 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • Hildegunst von Mythenmetz of programming
      • pwm
      @pwm @condret add an extra 10 min to that i have so much damn brainfog and i can hardly keep track of time rn
      In conversation about a month ago permalink
    • Embed this notice
      Hildegunst von Mythenmetz of programming (condret@shitposter.world)'s status on Saturday, 03-May-2025 14:34:59 JST Hildegunst von Mythenmetz of programming Hildegunst von Mythenmetz of programming
      in reply to
      • pwm
      @pwm @nyanide yes, it is

      "The free() function frees the memory space pointed to by ptr, which must have been returned by a previous call to malloc(), calloc() or realloc(). Otherwise, or if free(ptr) has already been called before, undefined behavior occurs. If ptr is NULL, no operation is performed."

      https://linux.die.net/man/3/free
      In conversation about a month ago permalink

      Attachments


      pwm likes this.
    • Embed this notice
      Hildegunst von Mythenmetz of programming (condret@shitposter.world)'s status on Saturday, 03-May-2025 14:36:07 JST Hildegunst von Mythenmetz of programming Hildegunst von Mythenmetz of programming
      in reply to
      • pwm
      @nyanide @pwm use r2, the commands are much shorter than in gdb, also asm syntax of r2 is more readable than atnt
      In conversation about a month ago permalink
      pwm likes this.
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:36:32 JST pwm pwm
      in reply to
      • Hildegunst von Mythenmetz of programming
      @condret @nyanide I for one HATE at&t
      I learned on Intel and it is so much better.
      In conversation about a month ago permalink
    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Saturday, 03-May-2025 14:36:42 JST gentoobro gentoobro
      in reply to
      • pwm

      You could override free with your own allocator that makes freeing null run the syscalls to wipe out the TLB cache. Because reasons.

      In conversation about a month ago permalink
      pwm likes this.
    • Embed this notice
      Hildegunst von Mythenmetz of programming (condret@shitposter.world)'s status on Saturday, 03-May-2025 14:41:07 JST Hildegunst von Mythenmetz of programming Hildegunst von Mythenmetz of programming
      in reply to
      • pwm
      @pwm @nyanide intel syntax is objectivly better than atnt, however it is bloated. why write
      mov eax, dwordptr [ebx]
      if you could instead just write
      mov eax, [ebx]
      ?
      In conversation about a month ago permalink
      pwm likes this.
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:43:47 JST pwm pwm
      in reply to
      • Hildegunst von Mythenmetz of programming
      @condret @nyanide I've always been a nasm guy, which is smarter about that in its language.
      In conversation about a month ago permalink
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:44:59 JST pwm pwm
      in reply to
      • Hildegunst von Mythenmetz of programming
      • pwm
      @condret @nyanide well, more terse.
      In conversation about a month ago permalink
    • Embed this notice
      pwm (pwm@darkdork.dev)'s status on Saturday, 03-May-2025 14:45:34 JST pwm pwm
      in reply to
      • þernia
      • gentoobro
      @pernia @nyanide @gentoobro > bro is scared by big letters
      Zoomers are COOKED chat
      In conversation about a month ago permalink
    • Embed this notice
      þernia (pernia@cum.salon)'s status on Saturday, 03-May-2025 14:45:36 JST þernia þernia
      in reply to
      • gentoobro
      • pwm
      @gentoobro @pwm @nyanide 70% of ur ENTIRE WORLD is FAKE. I cant live with that.

      Also the capital letters r unsettling
      In conversation about a month ago permalink
    • Embed this notice
      þernia (pernia@cum.salon)'s status on Saturday, 03-May-2025 14:45:37 JST þernia þernia
      in reply to
      • gentoobro
      • pwm
      @gentoobro @pwm @nyanide that sounds like hell
      In conversation about a month ago permalink
    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Saturday, 03-May-2025 14:45:37 JST gentoobro gentoobro
      in reply to
      • þernia
      • pwm

      This is about 70% macros. Much more readable than the alternative.

      In conversation about a month ago permalink

      Attachments


      1. https://shitpost.cloud/media/bb7af223-32a6-4a44-8c71-35f55de56f3c/macros.png

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.