aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-04-29 16:31:24 +0200
committerLukas Larsson <[email protected]>2016-04-29 16:31:24 +0200
commit370ff8e637efaae6f7c9ba3ab59caa6ab63450a7 (patch)
tree97bcc1d76c5de10932433b94c2c0f0e96e2a0a84 /erts
parentab0fd9ea6c333d11fa03df1391e320077adc1907 (diff)
parent0127f930e6aa2abc95ec4a95c9d5638d7e9bd512 (diff)
downloadotp-370ff8e637efaae6f7c9ba3ab59caa6ab63450a7.tar.gz
otp-370ff8e637efaae6f7c9ba3ab59caa6ab63450a7.tar.bz2
otp-370ff8e637efaae6f7c9ba3ab59caa6ab63450a7.zip
Merge branch 'mikpe/fp-exceptions-neuter-matherr/PR-1018/OTP-13531'
* mikpe/fp-exceptions-neuter-matherr/PR-1018/OTP-13531: matherr() must not fake an FP exception
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/sys/unix/sys_float.c5
-rw-r--r--erts/emulator/sys/win32/sys_float.c3
2 files changed, 1 insertions, 7 deletions
diff --git a/erts/emulator/sys/unix/sys_float.c b/erts/emulator/sys/unix/sys_float.c
index 60661d9016..9d2b25a787 100644
--- a/erts/emulator/sys/unix/sys_float.c
+++ b/erts/emulator/sys/unix/sys_float.c
@@ -818,11 +818,6 @@ sys_chars_to_double(char* buf, double* fp)
int
matherr(struct exception *exc)
{
-#if !defined(NO_FPE_SIGNALS)
- volatile unsigned long *fpexnp = erts_get_current_fp_exception();
- if (fpexnp != NULL)
- *fpexnp = (unsigned long)__builtin_return_address(0);
-#endif
return 1;
}
diff --git a/erts/emulator/sys/win32/sys_float.c b/erts/emulator/sys/win32/sys_float.c
index a2b9bd1263..2b2d6ab7d3 100644
--- a/erts/emulator/sys/win32/sys_float.c
+++ b/erts/emulator/sys/win32/sys_float.c
@@ -139,8 +139,7 @@ sys_double_to_chars_ext(double fp, char *buffer, size_t buffer_size, size_t deci
int
matherr(struct _exception *exc)
{
- erl_fp_exception = 1;
- DEBUGF(("FP exception (matherr) (0x%x) (%d)\n", exc->type, erl_fp_exception));
+ DEBUGF(("FP exception (matherr) (0x%x)\n", exc->type));
return 1;
}