1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

add limit to the number of clauses simplifyCNF can handle

This commit is contained in:
orklah 2021-09-26 17:35:33 +02:00
parent 7f0d25374f
commit 7e1c66d837

View File

@ -90,6 +90,12 @@ class Algebra
{
$clause_count = count($clauses);
//65536 seems to be a significant threshold, when put at 65537, the code https://psalm.dev/r/216f362ea6 goes
//from seconds in analysis to many minutes
if ($clause_count > 65536) {
return [];
}
if ($clause_count > 50) {
$all_has_unknown = true;