From owner-freebsd-questions Wed Nov 12 19:28:21 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id TAA08077 for questions-outgoing; Wed, 12 Nov 1997 19:28:21 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from stcgate.statcan.ca (stcgate.statcan.ca [142.206.192.1]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id TAA08068 for ; Wed, 12 Nov 1997 19:28:16 -0800 (PST) (envelope-from jeays@statcan.ca) Received: (from root@localhost) by stcgate.statcan.ca (8.6.11/8.6.9) id WAA23833 for ; Wed, 12 Nov 1997 22:31:06 -0500 Received: from stcinet.statcan.ca(142.206.128.146) by stcgate via smap (V1.3) id sma023811; Thu Nov 13 03:30:25 1997 Received: from statcan.ca by statcan.ca (SMI-8.6/SMI-SVR4) id WAA27355; Wed, 12 Nov 1997 22:29:24 -0500 Date: Wed, 12 Nov 1997 22:26:54 -0500 (EST) From: Mike Jeays X-Sender: jeays@austral To: freebsd-questions@freebsd.org Subject: Pentium hardware bug 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 I tried the program shown today in comp.risks, which crashes Pentium 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?