Hello, I recently upgraded BIRD from 2.0.4 to 2.0.5 and with the same (pretty large) .conf I got Segmentation fault. Until today I didn't have time to debug it, but here it goes: With this simple .conf I get seg fault on 2.0.5 while 2.0.4 works as expected. (if I define myvar = true it doesn't crash on 2.0.5) log syslog all; define myvar = false; function something () { if myvar then { return false; } return true; } protocol device DEVICE { } Could this be because of the new filter code or something else? Radu
On Sat, Aug 10, 2019 at 02:22:18PM +0300, Radu Anghel wrote:
Hello,
I recently upgraded BIRD from 2.0.4 to 2.0.5 and with the same (pretty large) .conf I got Segmentation fault.
Until today I didn't have time to debug it, but here it goes:
With this simple .conf I get seg fault on 2.0.5 while 2.0.4 works as expected. (if I define myvar = true it doesn't crash on 2.0.5)
log syslog all;
define myvar = false;
function something () { if myvar then { return false; }
return true; }
protocol device DEVICE {
}
Could this be because of the new filter code or something else?
Hello Thanks for bugreport. Yes, it is the new filter code, most likely it is a bug in handling of statically eliminable (constant-false) if statements without else branch. Similar issue also happens for empty blocks: if true then { } -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
define myvar = false;
function something () { if myvar then { return false; }
return true; }
protocol device DEVICE {
}
Could this be because of the new filter code or something else?
Hello
Thanks for bugreport. Yes, it is the new filter code, most likely it is a bug in handling of statically eliminable (constant-false) if statements without else branch.
Similar issue also happens for empty blocks:
if true then { }
What about the attached patch? Maria
On 13.08.2019 17:45, Maria Jan Matejka wrote:
define myvar = false;
function something () { if myvar then { return false; }
return true; }
protocol device DEVICE {
}
Could this be because of the new filter code or something else?
Hello
Thanks for bugreport. Yes, it is the new filter code, most likely it is a bug in handling of statically eliminable (constant-false) if statements without else branch.
Similar issue also happens for empty blocks:
if true then { }
What about the attached patch? Maria
Hi, I can confirm that the patch works for my setup. Thank you, Radu
participants (3)
-
Maria Jan Matejka -
Ondrej Zajicek -
Radu Anghel