Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

configure

Blame
    • Andres Freund's avatar
      978515df
      Error out for clang on x86-32 without SSE2 support, no -fexcess-precision. · 978515df
      Andres Freund authored
      As clang currently doesn't support -fexcess-precision=standard,
      compiling x86-32 code with SSE2 disabled, can lead to problems with
      floating point overflow checks and the like.
      
      This issue was noticed because clang, on at least some BSDs, defaults
      to i386 compatibility, whereas it defaults to pentium4 on Linux.  Our
      forced usage of __builtin_isinf() lead to some overflow checks not
      triggering when compiling for i386, e.g. when the result of the
      calculation didn't overflow in 80bit registers, but did so in 64bit.
      
      While we could just fall back to a non-builtin isinf, it seems likely
      that the use of 80bit registers leads to other problems (which is why
      we force the flag for GCC already).  Therefore error out when
      detecting clang in that situation.
      
      Reported-By: Victor Wagner
      Analyzed-By: Andrew Gierth and Andres Freund
      Author: Andres Freund
      Discussion: https://postgr.es/m/20180905005130.ewk4xcs5dgyzcy45@alap3.anarazel.de
      Backpatch: 9.3-, all supported versions are affected
      978515df
      History
      Error out for clang on x86-32 without SSE2 support, no -fexcess-precision.
      Andres Freund authored
      As clang currently doesn't support -fexcess-precision=standard,
      compiling x86-32 code with SSE2 disabled, can lead to problems with
      floating point overflow checks and the like.
      
      This issue was noticed because clang, on at least some BSDs, defaults
      to i386 compatibility, whereas it defaults to pentium4 on Linux.  Our
      forced usage of __builtin_isinf() lead to some overflow checks not
      triggering when compiling for i386, e.g. when the result of the
      calculation didn't overflow in 80bit registers, but did so in 64bit.
      
      While we could just fall back to a non-builtin isinf, it seems likely
      that the use of 80bit registers leads to other problems (which is why
      we force the flag for GCC already).  Therefore error out when
      detecting clang in that situation.
      
      Reported-By: Victor Wagner
      Analyzed-By: Andrew Gierth and Andres Freund
      Author: Andres Freund
      Discussion: https://postgr.es/m/20180905005130.ewk4xcs5dgyzcy45@alap3.anarazel.de
      Backpatch: 9.3-, all supported versions are affected