From delphij@FreeBSD.org  Mon Apr 21 22:01:19 2008
Return-Path: <delphij@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6EC771065670
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 21 Apr 2008 22:01:19 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id 64D498FC17
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 21 Apr 2008 22:01:19 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from freefall.freebsd.org (delphij@localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m3LM1Jer052388
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 21 Apr 2008 22:01:19 GMT
	(envelope-from delphij@freefall.freebsd.org)
Received: (from delphij@localhost)
	by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m3LM1JoW052387;
	Mon, 21 Apr 2008 22:01:19 GMT
	(envelope-from delphij)
Message-Id: <200804212201.m3LM1JoW052387@freefall.freebsd.org>
Date: Mon, 21 Apr 2008 22:01:19 GMT
From: Xin LI <delphij@freebsd.org>
Reply-To: Xin LI <delphij@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Fix for mail/thunderbird SIGFPE crash on FreeBSD/amd64
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         122975
>Category:       ports
>Synopsis:       [PATCH] Fix for mail/thunderbird SIGFPE crash on FreeBSD/amd64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnome
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 21 22:10:03 UTC 2008
>Closed-Date:    Tue Apr 22 05:40:26 UTC 2008
>Last-Modified:  Tue Apr 22 05:40:26 UTC 2008
>Originator:     Xin LI
>Release:        FreeBSD 7.0-STABLE i386
>Organization:
The FreeBSD Project
>Environment:
System: FreeBSD freefall.freebsd.org 7.0-STABLE FreeBSD 7.0-STABLE #34: Sat Apr 12 11:52:18 UTC 2008 simon@freefall.freebsd.org:/usr/src/sys/i386/compile/FREEFALL i386


>Description:
	thunderbird crashes on FreeBSD/amd64 8.0-CURRENT due to SIGFPE
issue, which is caused by caculation towards to 0 for a lot of pieces
of code.

	This patch extends the mask of underflow exception from covering
only i386 to both i386 and amd64.
>How-To-Repeat:
>Fix:


--- thunderbird.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/thunderbird/Makefile,v
retrieving revision 1.90
diff -u -p -r1.90 Makefile
--- Makefile	19 Apr 2008 17:51:46 -0000	1.90
+++ Makefile	21 Apr 2008 21:58:18 -0000
@@ -8,7 +8,7 @@
 
 PORTNAME=	thunderbird
 DISTVERSION=	2.0.0.12
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	mail ipv6
 MASTER_SITES=	${MASTER_SITE_MOZILLA_EXTENDED}
 MASTER_SITE_SUBDIR=	thunderbird/releases/${DISTVERSION}/source
Index: files/patch-Double.cpp
===================================================================
RCS file: /home/ncvs/ports/mail/thunderbird/files/patch-Double.cpp,v
retrieving revision 1.2
diff -u -p -r1.2 patch-Double.cpp
--- files/patch-Double.cpp	16 Nov 2003 18:55:33 -0000	1.2
+++ files/patch-Double.cpp	21 Apr 2008 21:05:06 -0000
@@ -1,20 +1,20 @@
---- extensions/transformiix/source/base/Double.cpp.orig	Thu Jan 30 09:26:46 2003
-+++ extensions/transformiix/source/base/Double.cpp	Sun Nov 16 01:46:42 2003
-@@ -51,10 +51,10 @@
+--- extensions/transformiix/source/base/Double.cpp.orig	2006-06-22 12:13:00.000000000 -0700
++++ extensions/transformiix/source/base/Double.cpp	2008-04-21 14:04:37.540570448 -0700
+@@ -52,10 +52,10 @@
  //A trick to handle IEEE floating point exceptions on FreeBSD - E.D.
  #ifdef __FreeBSD__
  #include <ieeefp.h>
 -#ifdef __alpha__
 -fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP;
 -#else
-+#if defined(__i386__)
++#if defined(__i386__) || defined(__amd64__)
  fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML;
 +#else
 +fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP;
  #endif
  fp_except_t oldmask = fpsetmask(~allmask);
  #endif
-@@ -75,22 +75,31 @@
+@@ -115,22 +115,31 @@
  #define TX_DOUBLE_HI32_EXPMASK   0x7ff00000
  #define TX_DOUBLE_HI32_MANTMASK  0x000fffff
  
--- thunderbird.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gnome 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Apr 21 22:10:14 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=122975 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/122975: commit references a PR
Date: Tue, 22 Apr 2008 05:33:05 +0000 (UTC)

 delphij     2008-04-22 05:32:58 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail/thunderbird     Makefile 
     mail/thunderbird/files patch-Double.cpp 
   Log:
   Mask FP_X_DNML not only on i386, but also on amd64.  This fixes mysterious
   crashes of thunderbird with SIGFPE, one of symptom of it is that this
   prevents enigmail-thunderbird from being able to be used on recent FreeBSD
   versions with thunderbird.
   
   PR:             ports/122975
   Approved by:    maintainer (marcus as gnome@)
   
   Revision  Changes    Path
   1.91      +1 -1      ports/mail/thunderbird/Makefile
   1.3       +5 -5      ports/mail/thunderbird/files/patch-Double.cpp
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: delphij 
State-Changed-When: Tue Apr 22 05:40:11 UTC 2008 
State-Changed-Why:  
Patch applied. 

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