Date: Wed, 12 Nov 1997 20:30:53 -0800 (PST) From: Shawn Ramsey <shawn@luke.cpl.net> To: Mike Jeays <jeays@statcan.ca> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Pentium hardware bug Message-ID: <Pine.BSF.3.95.971112202735.11361A-100000@luke.cpl.net> In-Reply-To: <Pine.SOL.3.96.971112222356.20418B-100000@austral>
next in thread | previous in thread | raw e-mail | index | archive | help
> machines under various operating systems. This was done on a Pentium
> 120, running FreeBSD 2.2.1.
>
> The program is trapped with an illegal instruction, as shown below.
> Running gdb on the resulting core dump gives the message shown below,
> but any attempt to run the program *under gdb* results in a complete
> system crash. So FreeBSD survives the test well - but gdb doesn't!
>
> /home/mike/c/crash% cat crash1.c
> unsigned char hang[] = { 0xf0, 0x0f, 0xc7, 0xc8 };
>
> int main()
> {
> void (*kill)();
> kill = hang;
> kill();
> /* return can be omitted as there is none */
> }
>
> /home/mike/c/crash% gcc crash1.c -o crash1
> crash1.c: In function `main':
> crash1.c:6: warning: assignment from incompatible pointer type
> /home/mike/c/crash% crash1
> Illegal instruction (core dumped)
> /home/mike/c/crash% d
> total 162
> -rwxrwxr-x 1 mike wheel 8826 Nov 12 1997 22:08 crash1
> -rw-r--r-- 1 mike wheel 173 Nov 12 1997 22:06 crash1..c
> -rw------- 1 mike wheel 143360 Nov 12 1997 22:09 crash1.core
>
> /home/mike/c/crash% gdb crash1 crash1.core
> GDB is free software and you are welcome to distribute copies of it
> under certain conditions; type "show copying" to see the conditions.
> There is absolutely no warranty for GDB; type "show warranty" for details.
> GDB 4.16 (i386-unknown-freebsd), Copyright 1996 Free Software Foundation,
> Inc...
> (no debugging symbols found)...
> Core was generated by `crash1'.
> Program terminated with signal 4, Illegal instruction.
> #0 0x208c in hang ()
> (gdb)
>
> (Typing 'r' here results in an immediate and very complete crash!)
>
> Any comments, more explanation, other experiences?
>
>
This vicious piece of code locks my P233 up tight as a drum. I would hate
to by an ISP providing shell access to hundreds of users on a P5, when any
user could compile this code and lock the machine up! :(
If I run this on an AMD 5x86-133 I get this :
Illegal instruction (core dump)
Havent done anything with gdb as I am not familar with it...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.971112202735.11361A-100000>
