Bug 17984

Summary: coredumps due to incorrect FP handling
Product: Base System Reporter: wkb <wkb>
Component: i386Assignee: Marcel Moolenaar <marcel>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.4-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description wkb 2000-04-13 19:40:00 UTC
	float to double conversions don't work right. 
	NOTE: this was taken of the -stable mailing list to mark the 
	      problem in the PR database.

	Original posters: Randall Hopper <aa8vb@ipass.net> (problem)
		          "Sean O'Connell" <sean@stat.Duke.EDU> (patch)

Fix: Here's the fix, from 4.0, that Sean sent me.
How-To-Repeat: 
     main()
     {
        float  f = FLT_MAX;
        double d;
        f = f * 2;
        d = f;
     }

Delete the "d=f" line and it doesn't core.  Put it in and it does
(floating-point exception).
Comment 1 wkb 2000-04-13 19:47:42 UTC
Forgot to mention I tested this on my 3.4-stable machine and the Linux
Acrobat4 now runs stable,
no coredumps anymore

W/
Comment 2 Sheldon Hearn freebsd_committer freebsd_triage 2000-04-17 09:27:03 UTC
State Changed
From-To: open->closed

The change is alrady in effect in 4.0-RELEASE and in 5.0-CURRENT. 
It probably doesn't make sense to change this so late in the  
RELENG_3 lifecycle. 

Comment 3 Jose M. Alcaide 2000-04-17 16:52:51 UTC
I bumped into this problem yesterday, just after upgrading Acrobat
to 4.05 (Acrobat 4.0 didn't work as plug-in for linux-netscape).
I think that Sean's patch should have been applied to RELENG_3 before
closing this PR, since it does not depend on any of the
new features of RELENG_4 or HEAD, and it is a very simple patch.
Don't forget that the print/acroread4 port will be broken for 3.5-RELEASE
if this problem is not fixed for RELENG_3.

-- JMA
Comment 4 wilko freebsd_committer freebsd_triage 2000-04-24 15:22:56 UTC
State Changed
From-To: closed->open

I've exchanged private email with Marcel., the 'owner' of the 
Linuxulator. He told me he plans to fix the Linuxulator for this problem. 
But he is waiting for his network/machine infrastructure to arrive in his 
new home in Ca.  

The patch listed in this PR is not the right thing to do in general, a fix 
in the Linux compatibility code is. Until Marcel gets time to do his thing 
the patch will get you things like Acrobat4 working (it does for me).
Comment 5 wilko freebsd_committer freebsd_triage 2000-04-24 15:22:56 UTC
Responsible Changed
From-To: freebsd-bugs->marcel

Marcel wants to fix this in the Linuxulator 

Comment 6 jruigrok 2000-06-21 06:17:20 UTC
-On [20000418 16:15], Martin Cracauer (cracauer@cons.org) wrote:
>Personally, I will not maintain RELENG_3 anymore (and I don't have a
>3.x machine to test changes on anymore), but on the other side, I
>don't care about it either, so if you find a committer and agreement
>with Bruce, no "release line stability" objections from me.

Actually I am still maintaining RELENG_3 and I hated the fact that I
couldn't get more MFC's done. =(((

But trust me that I'll want to fix this bug since I am unable to view
PDFs on my 3.4-S box for some time now.  So its personal. ;)

I'll go test the patches/diffs from 4/5 on this box today and commit it
if that's ok with Bruce.

-- 
Jeroen Ruigrok van der Werven          Network- and systemadministrator
<jruigrok@via-net-works.nl>            VIA Net.Works The Netherlands
BSD: Technical excellence at its best  http://www.via-net-works.nl
Care-charmer Sleep, son of the sable Night, Brother to Death, in silent
darkness born...
Comment 7 Martin Cracauer 2000-06-21 10:08:01 UTC
In <20000621071720.H30672@lucifer.bart.nl>, Jeroen Ruigrok van der Werven wrote: 
> -On [20000418 16:15], Martin Cracauer (cracauer@cons.org) wrote:
> >Personally, I will not maintain RELENG_3 anymore (and I don't have a
> >3.x machine to test changes on anymore), but on the other side, I
> >don't care about it either, so if you find a committer and agreement
> >with Bruce, no "release line stability" objections from me.
> 
> Actually I am still maintaining RELENG_3 and I hated the fact that I
> couldn't get more MFC's done. =(((
> 
> But trust me that I'll want to fix this bug since I am unable to view
> PDFs on my 3.4-S box for some time now.  So its personal. ;)

It is not a bug, but a policy.  The bug is that the Linux emulator
inherits FreeBSD's value for the default control word.

Having said this, I can only repeat that I think you can just change
3.x to default to masked exceptions.  Feedback on the issue in 4.x was
almost all positive and no applications that I am aware of (and I
watched) broke.

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@cons.org> http://www.cons.org/cracauer/
BSD User Group Hamburg, Germany     http://www.bsdhh.org/
Comment 8 Marcel Moolenaar freebsd_committer freebsd_triage 2000-07-18 05:13:29 UTC
State Changed
From-To: open->closed

Patch applied. Thanks...