Bro core dump in logical operations with vector and scalar types

Description

This code crashes Bro with a core dump :

event bro_init() {
local v : vector of bool = { T, F, T };
print v && T; # OK, print [T, F, T]
print v || F; # OK, print [T, F, T]
print v && F; # KO, print [F, F, F]

  1. then : internal error: bad reference count [2], then core dumped
    print v || T; # KO, print [T, T, T]

  2. then : internal error: bad reference count [2], then core dumped
    }

Environment

None

Activity

Show:
Jon Siwek
August 16, 2018, 4:58 AM

Looks like it was fixed at some point:

{{noformat}
$ bro -b ./test.bro
warning in ././test.bro, line 4: mixing vector and scalar operands is deprecated
warning in ././test.bro, line 5: mixing vector and scalar operands is deprecated
warning in ././test.bro, line 6: mixing vector and scalar operands is deprecated
warning in ././test.bro, line 7: mixing vector and scalar operands is deprecated
[T, F, T]
[T, F, T]
[F, F, F]
[T, T, T]

Fixed

Assignee

Unassigned

Reporter

François

Labels

External issue ID

None

Components

Fix versions

Affects versions

Priority

Normal