GCC Easter Eggs?

Levi Pearson levi at cold.org
Mon Jul 24 10:45:09 MDT 2006


On Jul 24, 2006, at 9:14 AM, Steve wrote:

> Hello Everyone,
> I'm wondering if anyone has seen any easter eggs in GCC dissamblies?
> Reason I ask is I was debugging a bit of code recently and saw a lot
> of pointers all to the same place in memory, even though they should
> have been completely different values.
> (this=0x85cafe0)
> I got to looking alot closer at the code (Note I am debugging this
> code I did not write it)
> And figured out that they were ALL uninitialized pointers!
> Anyways I don't know if it was fluke or an easter egg, but it looks
> like an easter egg to me!

Initializing pointers to some recognizable value can help in  
debugging.  That way, if you see a segfault with an attempt to  
dereference that address, you know what your problem is.  I'm not  
sure that's what's happening, but it's a reasonably likely possibility.

			--Levi


More information about the PLUG mailing list