Top all-time · #25633
Mohit Saini
Personal blog · mohitmv.github.io/blogprogramming
Mohit Saini writes Mohit, a personal blog at mohitmv.github.io about programming. Since 2025, 3 different Hacker News readers have linked it 4 times. The last post was in 2022, but the archive is still widely read.
Too few sampled comments (4) to say how often HN recommends it.?
Why HN links it
HN readers link this blog's posts on undefined behaviour in C and C++, which give examples of odd compiler and hardware behaviour. The comments cite the posts as examples rather than evaluating the writing.
Summarised by Claude from a sample of 4 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- /blog/Shocking-Undefined-Behaviour-In-Action/3 people · 4 mentions · first linked 2025-05-21
What Hacker News says?
Here are just a few examples: https://mohitmv.github.io/blog/Shocking-Undefined-Behaviour-...
Comment linking /blog/Shocking-Undefined-Behaviour-In-Action/
on “Writing into Uninitialized Buffers in Rust”If a C program accesses uninitialized memory (UB), it is perfectly compliant with the language spec for the compiler to reformat your hard drive and replace your OS code with crypto mining. I'm not exaggerating by a legalistic interpretation, and I'm only slightly exaggerating in practice. UB can do some really weird, unintuitive stuff in practice on real hardware: https://mohitmv.github.io/blog/Shocking-Undefined-B…
Comment linking /blog/Shocking-Undefined-Behaviour-In-Action/
on “Writing into Uninitialized Buffers in Rust”It's surprising and potentially buggy behavior, but that's very different from undefined behavior. To such a degree that I think you might not understand what it means, and what the risks are around undefined behavior, especially in the presence of an optimizing compiler. As a starter / refresher perhaps, both of these are perfectly permissible and happen in practice with UB, but never with "wrap or panic" / "implem…
Comment linking /blog/Shocking-Undefined-Behaviour-In-Action/
on “Memory safety CVEs differ between Rust and C/C++”Ah you're in the "but it doesn't really mean anything can happen" denial stage. Welcome to acceptance: https://mohitmv.github.io/blog/Shocking-Undefined-Behaviour-...
Comment linking /blog/Shocking-Undefined-Behaviour-In-Action/
on “Rust Is Just a Tool”