[Bro-Dev] #930: Segfault when logging strange record
Bro Tracker
bro at tracker.bro-ids.org
Wed Jan 16 15:36:51 PST 2013
#930: Segfault when logging strange record
---------------------+------------------------
Reporter: amannb | Owner:
Type: Problem | Status: new
Priority: Normal | Milestone: Bro2.2
Component: Bro | Version: git/master
Keywords: |
---------------------+------------------------
The following short script segfaults when run
{{{
module MyMod;
export {
redef enum Log::ID += { LOG };
type Log: record {
ss: set[string];
} &log;
}
event bro_init()
{
Log::create_stream(MyMod::LOG, [$columns=Log]);
local test: string;
Log::write(MyMod::LOG, [
$ss=set(test, "BB", "CC")
]);
}
}}}
The backtrace is
{{{
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000030
Val::Type (this=0x0) at Val.h:197
197 const BroType* Type() const { return type; }
(gdb) bt
#0 Val::Type (this=0x0) at Val.h:197
#1 0x0000000100103717 in CompositeHash::ComputeSingletonHash
(this=0x102828410, v=0x0, type_check=1) at
/Users/bernhard/bro/bro/src/CompHash.cc:327
#2 0x00000001001032f1 in CompositeHash::ComputeHash (this=0x102828410,
v=0x0, type_check=1) at /Users/bernhard/bro/bro/src/CompHash.cc:277
#3 0x00000001002f2489 in TableVal::ComputeHash (this=0x102828f90,
index=0x0) at Val.h:846
#4 0x00000001002e752b in TableVal::Assign (this=0x102828f90, index=0x0,
new_val=0x0, op=OP_ASSIGN) at /Users/bernhard/bro/bro/src/Val.cc:1451
#5 0x000000010018836d in SetConstructorExpr::Eval (this=0x102826540,
f=0x102828430) at /Users/bernhard/bro/bro/src/Expr.cc:3527
#6 0x0000000100174f13 in UnaryExpr::Eval (this=0x102826780,
f=0x102828430) at /Users/bernhard/bro/bro/src/Expr.cc:475
#7 0x0000000100190984 in ListExpr::Eval (this=0x102826830, f=0x102828430)
at /Users/bernhard/bro/bro/src/Expr.cc:4885
#8 0x0000000100174f13 in UnaryExpr::Eval (this=0x102826a10,
f=0x102828430) at /Users/bernhard/bro/bro/src/Expr.cc:475
#9 0x000000010018d406 in eval_list (f=0x102828430, l=0x102825cd0) at
/Users/bernhard/bro/bro/src/Expr.cc:5482
#10 0x000000010018f17a in CallExpr::Eval (this=0x102826be0, f=0x102828430)
at /Users/bernhard/bro/bro/src/Expr.cc:4633
#11 0x00000001002ae4a4 in ExprStmt::Exec (this=0x102826c70, f=0x102828430,
flow=@0x7fff5fbfebb8) at /Users/bernhard/bro/bro/src/Stmt.cc:369
#12 0x00000001002b4f7f in StmtList::Exec (this=0x102824e80, f=0x102828430,
flow=@0x7fff5fbfebb8) at /Users/bernhard/bro/bro/src/Stmt.cc:1574
#13 0x00000001001a3d55 in BroFunc::Call (this=0x101cfb340,
args=0x102828220, parent=0x0) at /Users/bernhard/bro/bro/src/Func.cc:336
#14 0x0000000100153573 in EventHandler::Call (this=0x101c28be0,
vl=0x102828220, no_remote=false) at
/Users/bernhard/bro/bro/src/EventHandler.cc:72
#15 0x00000001000cbf69 in Event::Dispatch (this=0x1028282a0,
no_remote=false) at Event.h:46
#16 0x0000000100152a61 in EventMgr::Dispatch (this=0x100516260) at
/Users/bernhard/bro/bro/src/Event.cc:105
#17 0x0000000100152b05 in EventMgr::Drain (this=0x100516260) at
/Users/bernhard/bro/bro/src/Event.cc:117
#18 0x00000001000c9f78 in main (argc=3, argv=0x7fff5fbffb58) at
/Users/bernhard/bro/bro/src/main.cc:1058
}}}
--
Ticket URL: <http://tracker.bro-ids.org/bro/ticket/930>
Bro Tracker <http://tracker.bro-ids.org/bro>
Bro Issue Tracker
More information about the bro-dev
mailing list