Skip to content

Commit db32e96

Browse files
committed
Avoid deep, high-fanout productions in bool_expr::factory.
This appears to provoke stack overflows when testing MonetDB.
1 parent 8bbb4fa commit db32e96

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

expr.cc

+2
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ column_reference::column_reference(prod *p, sqltype *type_constraint) : value_ex
9696
shared_ptr<bool_expr> bool_expr::factory(prod *p)
9797
{
9898
try {
99+
if (p->level > d100())
100+
return make_shared<truth_value>(p);
99101
if(d6() < 4)
100102
return make_shared<comparison_op>(p);
101103
else if (d6() < 4)

0 commit comments

Comments
 (0)