[Bro-Dev] [JIRA] (BIT-1071) Initializing an opaqueval as a global segfaults Bro

Bernhard Amann (JIRA) jira at bro-tracker.atlassian.net
Thu Aug 29 13:38:59 PDT 2013

Bernhard Amann created BIT-1071:

             Summary: Initializing an opaqueval as a global segfaults Bro
                 Key: BIT-1071
                 URL: https://bro-tracker.atlassian.net/browse/BIT-1071
             Project: Bro Issue Tracker
          Issue Type: Problem
          Components: Bro
    Affects Versions: git/master
            Reporter: Bernhard Amann
             Fix For: 2.2

Running Bro with a file containing

global test = md5_hash_init();

crashes Bro and results in the following backtrace:

#0  0x08259e95 in Ref (o=0x0) at /home/bernhard/bro/src/Obj.h:205
#1  0x0825a037 in BroType::Ref (this=0x0) at /home/bernhard/bro/src/Type.h:225
#2  0x0825a35b in Val::Val (this=0x87c7580, t=0x0) at /home/bernhard/bro/src/Val.h:387
#3  0x08377d46 in OpaqueVal::OpaqueVal (this=0x87c7580, t=0x0) at /home/bernhard/bro/src/Val.cc:3133
#4  0x0830b6a8 in HashVal::HashVal (this=0x87c7580, t=0x0) at /home/bernhard/bro/src/OpaqueVal.cc:62
#5  0x0830b8bd in MD5Val::MD5Val (this=0x87c7580) at /home/bernhard/bro/src/OpaqueVal.cc:81
#6  0x082d68aa in BifFunc::bro_md5_hash_init (frame=0x0, BiF_ARGS=0x93db520) at bro.bif:631
#7  0x082d4df1 in BuiltinFunc::Call (this=0x8b57e40, args=0x93db520, parent=0x0) at /home/bernhard/bro/src/Func.cc:507
#8  0x082c76a6 in CallExpr::Eval (this=0x93e4300, f=0x0) at /home/bernhard/bro/src/Expr.cc:4827
#9  0x082b438b in Expr::InitVal (this=0x93e4300, t=0x897c740, aggr=0x0) at /home/bernhard/bro/src/Expr.cc:130
#10 0x0837a4de in init_val (init=0x93e4300, t=0x897c740, aggr=0x0) at /home/bernhard/bro/src/Var.cc:17
#11 0x0837abc5 in make_var (id=0x93d0c30, t=0x897c740, c=INIT_FULL, init=0x93e4300, attr=0x0, dt=VAR_REGULAR, do_init=1) at /home/bernhard/bro/src/Var.cc:188
#12 0x0837adc5 in add_global (id=0x93d0c30, t=0x0, c=INIT_FULL, init=0x93e4300, attr=0x0, dt=VAR_REGULAR) at /home/bernhard/bro/src/Var.cc:226
#13 0x08255c0c in yyparse () at parse.y:1068
#14 0x08268da1 in main (argc=2, argv=0xbffff624) at /home/bernhard/bro/src/main.cc:859

Seems to work for any opaque val.

This message was sent by Atlassian JIRA

More information about the bro-dev mailing list