.... joke in the source code?
#define STACK_GUARD ((reg_t) (sizeof(reg_t) == 2 ? 0xBEEF : 0xDEADBEEF))
:D
Printable View
.... joke in the source code?
#define STACK_GUARD ((reg_t) (sizeof(reg_t) == 2 ? 0xBEEF : 0xDEADBEEF))
:D
Bernhard Kast <bernhard.kast@gmail.com> writes:
[color=blue]
> ... joke in the source code?
>
> #define STACK_GUARD ((reg_t) (sizeof(reg_t) == 2 ? 0xBEEF : 0xDEADBEEF))
>
> :D[/color]
You might enjoy
[url]http://www.decafbad.com/twiki/bin/view/Main/HexOddities[/url]
as well.
Notice that 0xDEADBEEF is an uneven address, and as such will cause a
fault on machines that expect memory access to be evenly aligned on
16/32/64 bit words.
--
Thomas Bjorn Andersen
+++ATH
It's actually a fairly common thing to do. I remember seeing 0xDEADBEEF
used, for instance, in an embedded system. The reason is that values
like 0xDEADBEEF are easy to recognize when you are using a debugger or
looking at a core file. It just doesn't look random enough to go
unnoticed.
Also, there's a joke in clock_time().