this post was submitted on 16 Mar 2025
798 points (98.2% liked)
Programmer Humor
21896 readers
2498 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Challange accepted. The following Rust code technically segfaults:
A stack overflow is technically a segmentation violation. At least on linux the program recives the SIGSEGV signal. This compiles and I am no rust dev but this does not use
unsafe
code, right?While the compiler shows a warning, the error message the program prints when run is not very helpfull IMHO:
Edit: Even the compiler warning can be tricked by making it do recusion in pairs:
Fair point.