From nobody@FreeBSD.org  Tue Jan 13 02:38:41 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6542716A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 13 Jan 2004 02:38:41 -0800 (PST)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8DB5943D31
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 13 Jan 2004 02:38:40 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i0DAcedL040578
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 13 Jan 2004 02:38:40 -0800 (PST)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.10/8.12.10/Submit) id i0DAcen5040577;
	Tue, 13 Jan 2004 02:38:40 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200401131038.i0DAcen5040577@www.freebsd.org>
Date: Tue, 13 Jan 2004 02:38:40 -0800 (PST)
From: Alexander Krotov <ank@despammed.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: many binaries crash with "illegal instruction" message (ldexp)
X-Send-Pr-Version: www-2.0

>Number:         61306
>Category:       i386
>Synopsis:       many binaries crash with "illegal instruction" message (ldexp)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-i386
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 13 02:40:13 PST 2004
>Closed-Date:    Wed Jan 14 12:14:55 PST 2004
>Last-Modified:  Wed Jan 14 12:14:55 PST 2004
>Originator:     Alexander Krotov
>Release:        5.2-RELEASE
>Organization:
Solid Information Technology Ltd.
>Environment:
FreeBSD kama 5.2-RELEASE FreeBSD 5.2-RELEASE #0: Mon Jan 12 16:18:06 GMT 2004     root@:/usr/src/sys/i386/compile/KAMA  i386

CPU: AMD Athlon(TM) XP 1700+ (1466.73-MHz 686-class CPU)
          Origin = "AuthenticAMD"  Id = 0x681  Stepping = 1
Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,P\
GE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>

>Description:
I have installed 5.2 release yesterday and got a lot of problems
with different binaries crashing with "illegal instruction" message.
For example "build world" does not work because awk and troff
crash. fsck_ufs did crash.
>How-To-Repeat:
I have not checked details, this problem might be AMD XP specific.
>Fix:
Quick look into the core files lead me to
/usr/src/lib/libc/i386/gen/ldexp.c
After changing ldexp code like
    double
    ldexp (double value, int exp)
    {
           return value*(1<<exp);
    /*
           double temp, texp, temp2;
           texp = exp;
           ...
    */
    }
the problem has gone. Build world works.

>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: Alexander Krotov <ank@despammed.com>
Cc: freebsd-gnats-submit@FreeBSD.org, freebsd-i386@FreeBSD.org
Subject: Re: i386/61306: many binaries crash with "illegal instruction"
 message (ldexp)
Date: Wed, 14 Jan 2004 01:58:25 +1100 (EST)

 On Tue, 13 Jan 2004, Alexander Krotov wrote:
 
 > >Description:
 > I have installed 5.2 release yesterday and got a lot of problems
 > with different binaries crashing with "illegal instruction" message.
 > For example "build world" does not work because awk and troff
 > crash. fsck_ufs did crash.
 
 This is most likely caused by compiling ldexp.c for a pentium4 (not
 the default).
 
 Bruce
State-Changed-From-To: open->closed 
State-Changed-By: bde 
State-Changed-When: Wed Jan 14 12:13:54 PST 2004 
State-Changed-Why:  
Configuration error.  Closed on submitter's request. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61306 
>Unformatted:
