Found some interesting reading on bit patterns I thought you all might enjoy. Next time your game crashes with funny memory address and values, read this again.
To call these bit patterns "strange" implies they're somewhat mysterious and unknown, whereas the truth of the matter is that they're simply signatures for various failure modes. You must grok in fullness.
I called them strange because I still didn't know about all of them, and usually the newb debugging his first crash won't know what they mean either. So in both cases they are / were mysterious and unknown. But yeah. I had no idea there were so many specific values to indicate such a wide variety of failures. The only ones I had ever come across were 0xdeadbeef, 0xbaadfood, and 0xfeeefeee. Of course with the ones that make words, you generally get the idea there is something wrong with your shiznit.
Of course with the ones that make words, you generally get the idea there is something wrong with your shiznit.
The Algol 68-R compiler used to initialize its storage to the character string "F00LF00LF00LF00L..." because as a pointer or as a floating point number it caused a crash, and as an integer or a character string it was very recognizable in a dump. Sadly, one day a very senior professor at Nottingham University wrote a program that called him a fool. He proceeded to demonstrate the correctness of this assertion by lobbying the university (not quite successfully) to forbid the use of Algol on its computers.
That's hilarious, and sad at the same time.
Check out the catb entry on 'back door'. That is awesome.
That is awesome.
Yes indeed!
More interesting reading from catb :
http://www.catb.org/jargon/html/meaning-of-hack.html
And I'm currently making my way through In the Beginning Was The Command Line (referenced by some catb jargon definition).
Amazing where the internet might take you. I had no idea I would find catb so interesting. I thought the only thing that came from there was that 'smart questions' article (which was seriously tl;dr;).
And off topic, which is on topic in this thread - I would love to go to school at MIT for programming. I wonder what it would take to get accepted. I have a 4.0 but its at a small community college so I don't know if that counts.
A bit more information about 0xCCCCCCCC. On x86(-64), 0xCC happens to be the opcode for "int 3". Interrupt 3 is a software breakpoint. So, if your instruction pointer happens to run into uninitialized memory your program will instantly halt and let you know.
Whether or not this is by design, I am not certain.
Hey, that's cool. Even cooler if it was by design.
Any one else have any cool programming quirks they'd like to share?
usually the newb debugging his first crash won't know what they mean either. So in both cases they are / were mysterious and unknown.
Total newb here, I can verify that this was helpful