Simon Pilgrim
8e3c60968e
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
llvm-svn: 298226
2017-03-19 16:50:25 +00:00
..
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2017-02-08 10:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-06-17 20:52:32 +00:00
2017-02-08 10:24:18 +00:00
2010-03-14 18:51:18 +00:00
2014-02-13 14:44:26 +00:00
2014-02-13 14:44:26 +00:00
2015-06-17 20:52:32 +00:00
2015-03-16 21:36:38 +00:00
2017-02-08 10:24:18 +00:00
2015-06-17 20:52:32 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-03-12 20:38:10 +00:00
2015-04-16 23:24:18 +00:00
2015-03-13 18:20:45 +00:00
2015-09-11 03:22:04 +00:00
2015-05-12 01:26:05 +00:00
2015-02-27 21:17:42 +00:00
2015-06-17 20:52:32 +00:00
2010-07-27 18:02:18 +00:00
2011-09-26 06:13:20 +00:00
2010-06-17 15:18:27 +00:00
2011-01-06 23:04:29 +00:00
2017-02-08 10:24:18 +00:00
2015-02-27 21:17:42 +00:00
2013-03-20 06:18:06 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2010-03-22 23:15:57 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2014-02-13 14:44:26 +00:00
2014-07-25 21:13:35 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2017-01-05 20:55:28 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2015-08-28 20:26:49 +00:00
2015-06-17 20:52:32 +00:00
2016-04-05 14:21:32 +00:00
2012-06-08 23:15:12 +00:00
2014-09-20 00:10:47 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-06-17 20:52:32 +00:00
2017-03-02 12:00:10 +00:00
2015-03-13 18:20:45 +00:00
2015-11-19 05:56:52 +00:00
2015-02-27 21:17:42 +00:00
2010-02-09 06:36:30 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2017-02-27 16:09:44 +00:00
2017-02-08 10:24:18 +00:00
2014-02-13 14:44:26 +00:00
2016-11-07 16:47:20 +00:00
2015-11-19 05:56:52 +00:00
2015-09-16 05:34:32 +00:00
2016-09-23 21:46:02 +00:00
2011-12-12 11:59:10 +00:00
2017-02-08 10:24:18 +00:00
2015-06-17 20:52:32 +00:00
2015-04-16 23:24:18 +00:00
2013-12-13 16:05:32 +00:00
2010-12-19 20:01:13 +00:00
2017-03-01 01:56:41 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2012-04-10 00:16:22 +00:00
2017-03-19 16:50:25 +00:00
2015-04-16 23:24:18 +00:00
2014-02-28 19:08:01 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2014-12-13 04:52:04 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-03-13 18:20:45 +00:00
2017-02-08 10:24:18 +00:00
2015-02-27 21:17:42 +00:00
2010-02-09 06:19:20 +00:00
2015-02-27 21:17:42 +00:00
2017-02-08 10:24:18 +00:00
2015-07-03 08:02:12 +00:00
2015-02-27 21:17:42 +00:00
2017-02-08 10:24:18 +00:00
2017-02-08 10:24:18 +00:00
2011-05-13 15:18:06 +00:00