* lto-partition.c (lto_balanced_map): Watch overflow.
From-SVN: r257939
This commit is contained in:
parent
1996c75efd
commit
97bb48126b
@ -1,3 +1,7 @@
|
||||
2018-02-08 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
* lto-partition.c (lto_balanced_map): Watch overflow.
|
||||
|
||||
2018-02-08 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
PR ipa/81360
|
||||
|
@ -757,7 +757,8 @@ lto_balanced_map (int n_lto_partitions, int max_partition_size)
|
||||
if (npartitions < n_lto_partitions)
|
||||
partition_size = total_size / (n_lto_partitions - npartitions);
|
||||
else
|
||||
partition_size = INT_MAX;
|
||||
/* Watch for overflow. */
|
||||
partition_size = INT_MAX / 16;
|
||||
|
||||
if (partition_size < PARAM_VALUE (MIN_PARTITION_SIZE))
|
||||
partition_size = PARAM_VALUE (MIN_PARTITION_SIZE);
|
||||
|
Loading…
Reference in New Issue
Block a user