zeek/testing/btest/language
Jon Siwek 0a69b87f03 Fix uninitialized locals in event/hook handlers from having a value.
Since values for local variables are referenced by offset within a Frame
(not by identifier name), and event/hook handler bodies share a common
Frame, the value offsets for local variables in different handlers may
overlap.  This meant locals in a handler without an initialization may
actually end up referring to the value of a previous handler's local
that has the same Frame offset.  When executing the body, that can
possibly result in a type-conflict error or give give unexpected
results instead of a "use of uninitialized value" error.

This patch makes it so uninitialized locals do always refer to a null
value before executing the body of a event/hook handler, so that using
them without assigning a value within the body will connsistently give
a "use of uninitialized value" error.

Addresses #932.
2013-01-17 15:21:50 -06:00
..
addr.bro Add parsing rules for IPv4/IPv6 subnet literal constants, addresses #888 2012-10-22 15:57:21 -05:00
any.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
at-if.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
at-ifdef.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
at-ifndef.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
at-load.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
bool.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
conditional-expression.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
const.bro Make const variables actually constant. Addresses #922. 2012-12-13 15:05:29 -06:00
copy.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
count.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
cross-product-init.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
delete-field-set.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
delete-field.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
double.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
enum-desc.bro Change presentation of enum val to include namespace. 2011-08-31 10:57:19 -05:00
enum-scope.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
enum.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
event.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
expire_func.test Fix table expiry for values assigned in bro_init() when reading live. 2012-04-06 13:24:27 -05:00
file.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
for.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
function.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
hook.bro Change hook calls to only be allowed when preceded by "hook" keyword. 2012-11-30 15:39:00 -06:00
hook_calls.bro Change hook calls to only be allowed when preceded by "hook" keyword. 2012-11-30 15:39:00 -06:00
if.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
incr-vec-expr.test Fix segfault when incrementing whole vector values. 2012-07-13 14:32:50 -05:00
int.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
interval.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
invalid_index.bro Invalid vector indices now generate error message (addresses #24). 2012-12-04 15:22:16 -06:00
ipv6-literals.bro Adapt FreeBSD's inet_ntop implementation for internal use. 2012-03-19 11:26:31 -05:00
module.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
next-test.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
no-module.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
null-statement.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
pattern.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
port.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
precedence.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
raw_output_attr.test Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
rec-comp-init.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
rec-nested-opt.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
rec-of-tbl.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
rec-table-default.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
record-bad-ctor.bro Bad record constructor initializers now give an error (addresses #34). 2012-12-04 16:29:23 -06:00
record-default-coercion.bro Fix &default fields in records not being initialized in coerced assignments. 2011-12-15 12:16:42 -06:00
record-extension.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
record-index-complex-fields.bro Teach CompHash to allow indexing by records with vector/table/set fields. 2012-01-20 16:54:48 -06:00
record-recursive-coercion.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
record-ref-assign.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
set-opt-record-index.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
set.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
short-circuit.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
sizeof.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
smith-waterman-test.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
string-indexing.bro Change substring index notation to use a colon (addresses #422). 2013-01-07 13:29:05 -06:00
string.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
strings.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
subnet.bro Add parsing rules for IPv4/IPv6 subnet literal constants, addresses #888 2012-10-22 15:57:21 -05:00
switch-statement.bro Finish implementation of script-layer switch statement. Addresses #754. 2012-12-20 12:49:50 -06:00
table-init-attrs.bro Fix various bugs with table/set attributes. 2012-11-29 15:44:03 -06:00
table-init-container-ctors.bro Add test of record() constructor to table initializer unit test. 2012-11-28 14:53:36 -06:00
table-init.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
table.bro Fix ambiguity between composite table index and record ctor expressions. 2012-11-16 12:43:39 -06:00
time.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
timeout.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
type-type-error.bro Improve error for invalid use of types as values (addresses #923). 2012-12-18 14:31:39 -06:00
uninitialized-local.bro Fix uninitialized locals in event/hook handlers from having a value. 2013-01-17 15:21:50 -06:00
vector-coerce-expr.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
vector-list-init-records.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
vector.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
when.bro Serialize language.when unit test with the "comm" group. 2012-09-25 14:53:51 -05:00
wrong-delete-field.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00
wrong-record-extension.bro Quick pass over unit tests, adding -b flag to bro so they run faster. 2012-11-30 17:44:36 -06:00