Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Nov 1997 22:26:54 -0500 (EST)
From:      Mike Jeays <jeays@statcan.ca>
To:        freebsd-questions@freebsd.org
Subject:   Pentium hardware bug
Message-ID:  <Pine.SOL.3.96.971112222356.20418B-100000@austral>

next in thread | raw e-mail | index | archive | help
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?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.3.96.971112222356.20418B-100000>