What happens if I deference a null pointer?
>>101542700You get slapped by Bret Hart
Try it yourself#include <stdlib.h>int main() { free(NULL);}
#include <stdlib.h>int main() { free(NULL);}
>>101542700you try to access memoryit likely fails miserably because userspace or succeeds even MORE miserablyend
>>101542700you get an error in the static analyzer you're using to verify you're code.you are using a static analyzer, right?
>>101542700Anything and everything can happen.
>>101542700https://youtu.be/dFIqNZ8VbRYtl;dr it depends
Usually (modern OS in user space) it segfaults because that address isn't mapped.
couldn't tell you, since it's impossible in rust
>>101542869Box::leak
>>101542869Sounds like Rust is inferior.
>>101542869like it is impossible for a man to become a woman
seems like I hit a nerve, kek. Seethe, cniles
>>101542700>deferenceYou mean defenestrate? The pointer gets glassed (and we ain't leavin til we find oot what cunt did it).
>>101542700Nothing. Just use this in your program, trust me:signal(SIGSEGV, SIG_IGN);
>>101542948You will NEVER pass,EVERYour friends lie to you to make you feel better ;-)
>>101543449Embrace the future chud. Most programmers are retards so we need the borrow checker to tardwrangle everyone.
>deferenceThat's not the word that you think it is
>>101543544We dont need more programmers in the first place, what a stupid premise.
What ever happened to little bobby tabbles
>>101542700In MSDOS it lets you write over the timer interrupt.
You get hired for Crowdstrike