1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-28 10:08:24 +00:00

The per-thread last floating point exception pointer is not initialized

to NULL when it is allocated. As a result, spurious floating point
exceptions are reported.

Obtained from:	David Reiss <dreiss at cs.stanford.edu>
This commit is contained in:
Jimmy Olgeni 2009-07-01 14:58:04 +00:00
parent 6d26f6f16e
commit 56d091e0c5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=236869
4 changed files with 28 additions and 2 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= erlang
PORTVERSION= r13b01
PORTREVISION= 4
PORTREVISION= 5
PORTEPOCH= 1
CATEGORIES= lang parallel java
MASTER_SITES= http://www.erlang.org/download/ \

View File

@ -0,0 +1,13 @@
$FreeBSD$
--- erts/emulator/sys/unix/sys_float.c.orig
+++ erts/emulator/sys/unix/sys_float.c
@@ -57,6 +57,7 @@
void erts_thread_init_fp_exception(void)
{
unsigned long *fpe = erts_alloc(ERTS_ALC_T_FP_EXCEPTION, sizeof(*fpe));
+ *fpe = 0;
erts_tsd_set(fpe_key, fpe);
}

View File

@ -7,7 +7,7 @@
PORTNAME= erlang
PORTVERSION= r13b01
PORTREVISION= 4
PORTREVISION= 5
PORTEPOCH= 1
CATEGORIES= lang parallel java
MASTER_SITES= http://www.erlang.org/download/ \

View File

@ -0,0 +1,13 @@
$FreeBSD$
--- erts/emulator/sys/unix/sys_float.c.orig
+++ erts/emulator/sys/unix/sys_float.c
@@ -57,6 +57,7 @@
void erts_thread_init_fp_exception(void)
{
unsigned long *fpe = erts_alloc(ERTS_ALC_T_FP_EXCEPTION, sizeof(*fpe));
+ *fpe = 0;
erts_tsd_set(fpe_key, fpe);
}