aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-05-08 19:01:34 +0200
committerSverker Eriksson <[email protected]>2015-05-08 19:01:34 +0200
commit0a3dbbc20377aba3d7732ab6d2dca21e0f7b37c0 (patch)
treec0a19ce8bf850e08c40df41f3fe7769b8309cb2d
parentcc03bb892c4ecf2344234d4f7b1b49133d782f41 (diff)
parentb5ab6ded99afb0978dd4722d0d43b755555ac549 (diff)
downloadotp-0a3dbbc20377aba3d7732ab6d2dca21e0f7b37c0.tar.gz
otp-0a3dbbc20377aba3d7732ab6d2dca21e0f7b37c0.tar.bz2
otp-0a3dbbc20377aba3d7732ab6d2dca21e0f7b37c0.zip
Merge branch 'sverk/erts-fp-exception-fixes/OTP-12717'
* sverk/erts-fp-exception-fixes/OTP-12717: erts: Disable float exceptions for clang/llvm erts: Increase buffer in erts_fp_check_init_error
-rw-r--r--erts/configure.in4
-rw-r--r--erts/emulator/sys/unix/sys_float.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 884307b24f..4c0d981df1 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -2908,6 +2908,10 @@ else
#include <signal.h>
#include <stdlib.h>
+#if defined(__clang__) || defined(__llvm__)
+#error "Clang/LLVM generates broken code for FP exceptions"
+#endif
+
volatile int erl_fp_exception;
/*
diff --git a/erts/emulator/sys/unix/sys_float.c b/erts/emulator/sys/unix/sys_float.c
index 2ffa649767..c30ef7cce2 100644
--- a/erts/emulator/sys/unix/sys_float.c
+++ b/erts/emulator/sys/unix/sys_float.c
@@ -85,7 +85,7 @@ static void set_current_fp_exception(unsigned long pc)
void erts_fp_check_init_error(volatile unsigned long *fpexnp)
{
- char buf[64];
+ char buf[128];
snprintf(buf, sizeof buf, "ERTS_FP_CHECK_INIT at %p: detected unhandled FPE at %p\r\n",
__builtin_return_address(0), (void*)*fpexnp);
if (write(2, buf, strlen(buf)) <= 0)