aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)