From owner-freebsd-questions Wed Nov 12 20:30:35 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id UAA12181 for questions-outgoing; Wed, 12 Nov 1997 20:30:35 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from luke.cpl.net (luke.cpl.net [207.67.172.194]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id UAA12175 for ; Wed, 12 Nov 1997 20:30:29 -0800 (PST) (envelope-from shawn@luke.cpl.net) Received: from localhost (shawn@localhost) by luke.cpl.net (8.8.7/8.6.12) with SMTP id UAA11379; Wed, 12 Nov 1997 20:30:57 -0800 (PST) Date: Wed, 12 Nov 1997 20:30:53 -0800 (PST) From: Shawn Ramsey To: Mike Jeays cc: freebsd-questions@FreeBSD.ORG Subject: Re: Pentium hardware bug In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 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...