[Bro-Dev] [JIRA] (BIT-34) Segfault from assigning uninitialized variables to record values
Bernhard Amann (JIRA)
jira at bro-tracker.atlassian.net
Thu Nov 7 08:37:31 PST 2013
[ https://bro-tracker.atlassian.net/browse/BIT-34?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bernhard Amann updated BIT-34:
------------------------------
Resolution: Fixed
Status: Closed (was: Open)
Seems to be fixed - does not crash anymore and gives appropriate error messages.
> Segfault from assigning uninitialized variables to record values
> ----------------------------------------------------------------
>
> Key: BIT-34
> URL: https://bro-tracker.atlassian.net/browse/BIT-34
> Project: Bro Issue Tracker
> Issue Type: Problem
> Components: Bro
> Affects Versions: 1.5.2
> Reporter: Seth Hall
>
> Contents of the test-crash.bro script:
> {noformat}
> global asdfasdf;
> const blah = [$ports=asdfasdf];
> {noformat}
> Running the test-crash script:
> {noformat}
> (gdb) run test-crash.bro
> Starting program: /Users/seth/Desktop/bro/bro.dev/bro.trunk.clean/src/bro test-crash.bro
> Reading symbols for shared libraries ++++++++++++. done
> ./test-crash.bro, line 1 (asdfasdf): error, no type given
> ./test-crash.bro, line 2 ($nothing=asdfasdf): run-time error, uninitialized list value
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_PROTECTION_FAILURE at address: 0x00000020
> 0x000430b1 in Val::AsRecordVal (this=0x0) at Val.h:295
> 295 CONVERTER(TYPE_RECORD, RecordVal*, AsRecordVal)
> (gdb) bt
> #0 0x000430b1 in Val::AsRecordVal (this=0x0) at Val.h:295
> BIT-1 0x0009f0f6 in RecordConstructorExpr::InitVal (this=0xa09190, t=0xa09220, aggr=0xa09290) at Expr.cc:3320
> BIT-2 0x001a96ef in init_val (init=0xa09190, t=0xa09220, aggr=0xa09290) at Var.cc:17
> BIT-3 0x001a9d23 in make_var (id=0xa08e30, t=0xa09220, c=INIT_FULL, init=0xa09190, attr=0x0, dt=VAR_CONST, do_init=1) at Var.cc:152
> BIT-4 0x001a9e08 in add_global (id=0xa08e30, t=0x0, c=INIT_FULL, init=0xa09190, attr=0x0, dt=VAR_CONST) at Var.cc:179
> BIT-5 0x0000f39e in yyparse () at parse.y:803
> BIT-6 0x00003d12 in main (argc=2, argv=0xbffff184) at main.cc:735
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2-OD-01#6204)
More information about the bro-dev
mailing list