Merge remote-tracking branch 'origin/topic/vern/reaching-defs'

* origin/topic/vern/reaching-defs: (36 commits)
  added &is_assigned test case for variable rather than record field
  Speedup ReachingDefs logic by ~15%
  Simplify ReachingDefs::RDMap() accessor
  test for -uu correctly tracking $?, and not misled by conditional assignments
  &is_set => &is_assigned
  remove pending maybe-reconsider-this comment
  fixes for ?$ operator - always track it, and assume subrecords are initialized
  speedup (and more coherent memory management) for tracking RDs
  fixes for generating and evaluating RDs associate with ?$ expressions
  fix for failure to reduce InlineExpr's to CatchReturnStmt's
  inlining fix: propagate identifier attributes (such as &is_set)
  tidier memory management
  fix for an ancient bug - surprising that this hasn't caused problems previously
  Fix IntrusivePtr release leaks in reaching-def logic
  Change dynamic_cast in reaching-def logic to static_cast
  Adjust some reaching-def memory management
  Update a couple baselines for "xform" alternative
  Adjust various reaching-def move/reference semantics
  Change LambdaExpr::OuterIDs() accessor to return const-reference
  Simplify declaration of DefPointType enum
  ...
This commit is contained in:
Jon Siwek 2021-02-05 10:56:23 -08:00
commit 03f74958f3
48 changed files with 4636 additions and 1849 deletions

View file

@ -240,7 +240,7 @@ function set_conn(c: connection, eoc: bool)
{
if ( ! c?$conn )
{
local tmp: Info;
local tmp: Info &is_assigned;
c$conn = tmp;
}

View file

@ -293,7 +293,7 @@ hook set_session(c: connection, msg: dns_msg, is_query: bool) &priority=5
else
{
# Just pick an arbitrary, unpaired query.
local tid: count;
local tid: count &is_assigned;
local found_one = F;
for ( trans_id, q in c$dns_state$pending_queries )

View file

@ -87,7 +87,7 @@ function add_pending_cmd(pc: PendingCmds, cmd: string, arg: string): CmdArg
# response code and message.
function get_pending_cmd(pc: PendingCmds, reply_code: count, reply_msg: string): CmdArg
{
local best_match: CmdArg;
local best_match: CmdArg &is_assigned; # &is_assigned for $ts field
local best_seq = 0;
local best_score: int = -1;

View file

@ -66,7 +66,7 @@ event zeek_init() &priority=5
event ntp_message(c: connection, is_orig: bool, msg: NTP::Message) &priority=5
{
local info: Info;
local info: Info &is_assigned; # for case where no $std_msg
info$ts = network_time();
info$uid = c$uid;
info$id = c$id;

View file

@ -142,7 +142,7 @@ function set_session(c: connection)
{
if ( ! c?$ssh )
{
local info: SSH::Info;
local info: SSH::Info &is_assigned; # needed for $version
info$ts = network_time();
info$uid = c$uid;
info$id = c$id;

View file

@ -102,7 +102,7 @@ event file_sniff(f: fa_file, meta: fa_metadata) &priority=5
|| f$info$mime_type == "application/pkix-cert" ) )
return;
local c: connection;
local c: connection &is_assigned; # to help static analysis
for ( cid, c in f$conns )
{

View file

@ -44,7 +44,7 @@ event file_sniff(f: fa_file, meta: fa_metadata) &priority=4
|| f$info$mime_type == "application/pkix-cert" ) )
return;
local c: connection;
local c: connection &is_assigned;
for ( cid, c in f$conns )
{

View file

@ -95,7 +95,7 @@ event x509_ocsp_ext_signed_certificate_timestamp(f: fa_file, version: count, log
if ( |f$conns| != 1 )
return;
local c: connection;
local c: connection &is_assigned;
for ( cid, c in f$conns )
{