Ticket #34 (seen Problem)

Opened 21 months ago

Last modified 20 months ago

Segfault from assigning uninitialized variables to record values

Reported by: seth Owned by:
Priority: Normal Component: Bro
Version: 1.5.2-devel (svn) Keywords:
Cc:

Description (last modified by seth) (diff)

Contents of the test-crash.bro script:

global asdfasdf;
const blah = [$ports=asdfasdf];

Running the test-crash script:

(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
#1  0x0009f0f6 in RecordConstructorExpr::InitVal (this=0xa09190, t=0xa09220, aggr=0xa09290) at Expr.cc:3320
#2  0x001a96ef in init_val (init=0xa09190, t=0xa09220, aggr=0xa09290) at Var.cc:17
#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
#4  0x001a9e08 in add_global (id=0xa08e30, t=0x0, c=INIT_FULL, init=0xa09190, attr=0x0, dt=VAR_CONST) at Var.cc:179
#5  0x0000f39e in yyparse () at parse.y:803
#6  0x00003d12 in main (argc=2, argv=0xbffff184) at main.cc:735

Attachments

Change History

Changed 21 months ago by seth

  • description modified (diff)

Changed 21 months ago by seth

  • description modified (diff)

Changed 20 months ago by robin

  • status changed from new to seen

Add/Change #34 (Segfault from assigning uninitialized variables to record values)

Author


E-mail address and user name can be saved in the Preferences.


Action
as seen
 
Note: See TracTickets for help on using tickets.