llvm/lib
Simon Pilgrim 33e1fb27fd Fix constant folding of fp2int to large integers
We make the assumption in most of our constant folding code that a fp2int will target an integer of 128-bits or less, calling the APFloat::convertToInteger with only uint64_t[2] of raw bits for the result.

Fuzz testing (PR24662) showed that we don't handle other cases at all, resulting in stack overflows and all sorts of crashes.

This patch uses the APSInt version of APFloat::convertToInteger instead to better handle such cases.

Differential Revision: https://reviews.llvm.org/D31074

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298226 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-19 16:50:25 +00:00
..
Analysis Extract FindAvailablePtrLoadStore out of FindAvailableLoadedValue. NFCI 2017-03-19 15:27:52 +00:00
AsmParser
Bitcode SamplePGO ThinLTO ICP fix for local functions. 2017-03-14 17:33:01 +00:00
CodeGen Fix constant folding of fp2int to large integers 2017-03-19 16:50:25 +00:00
DebugInfo Revert "Make NativeExeSymbol a concrete subclass of NativeRawSymbol [PDB]" 2017-03-17 00:46:42 +00:00
Demangle
ExecutionEngine
Fuzzer [libFuzzer] inline the code of __sanitizer_cov_trace_pc_guard into it 2017-03-17 01:45:15 +00:00
IR Fix constant folding of fp2int to large integers 2017-03-19 16:50:25 +00:00
IRReader
LibDriver
LineEditor
Linker
LTO LTO: Work around libstdc++ version mismatch bug, see D31063 review thread. 2017-03-17 21:49:09 +00:00
MC [Asm] Don't list '@<type>' in diag when '@' is a comment 2017-03-17 11:10:17 +00:00
Object ArchiveWriter: Remove unused variables. NFC. 2017-03-16 20:35:07 +00:00
ObjectYAML
Option
Passes
ProfileData SamplePGO ThinLTO ICP fix for local functions. 2017-03-14 17:33:01 +00:00
Support [LockFileManager] Reduce lock timeout 2017-03-18 00:32:34 +00:00
TableGen
Target Fix MSVC warning: "switch statement contains 'default' but no 'case' labels". NFCI. 2017-03-19 16:39:04 +00:00
Transforms Correct a rebase mistake. 2017-03-19 15:41:46 +00:00
XRay
CMakeLists.txt
LLVMBuild.txt