[Oisf-devel] Debug HashListTableLookup()

Yao-Min Chen Yaomin.Chen at Sun.COM
Sun Jan 31 17:23:19 UTC 2010


My unit test SigTestBidirec03 seems to loop forever while traversing the 
hashed list of signature patterns (I verified this by setting break 
point and single stepping the run). Any hint on how to check whether the 
hashed list is properly terminated, and without self-looping?

Test SigTestBidirec03                                             : 
^Cdbx: warning: Interrupt ignored but forwarded to child.
t at 1 (l at 1) signal INT (Interrupt) in DetectAddressCmp at line 1392 in 
file "detect-engine-address.c"
 1392       if (a->flags & ADDRESS_FLAG_ANY && b->flags & ADDRESS_FLAG_ANY)
(dbx) where
current thread: t at 1
=>[1] DetectAddressCmp(a = <value not available>, b = 0xacc220), line 
1392 in "detect-engine-address.c"
  [2] IPOnlyCompareFunc(data1 = 0xa87ce8, len1 = <value not available>, 
data2 = 0xacc220, len2 = <value not available>), line 190 in 
"detect-engine-iponly.c"
  [3] HashListTableLookup(ht = <value not available>, data = 0xacc220, 
datalen = <value not available>), line 237 in "util-hashlist.c"
  [4] IPOnlyAddSlash16(de_ctx = 0x4c8240, io_ctx = 0x4ca2d0, ht = 
0x2b06f8, gr = 0x5e3898, direction = <value not available>, s = 
0x5e3780), line 81 in "detect-engine-iponly.c"
  [5] IPOnlyAddSignature(de_ctx = 0x4c8240, io_ctx = 0x4ca2d0, s = 
0x5e3780), line 475 in "detect-engine-iponly.c"
  [6] SigAddressPrepareStage2(de_ctx = 0x4c8240), line 1667 in "detect.c"
  [7] SigGroupBuild(de_ctx = 0x4c8240), line 2797 in "detect.c"
  [8] UTHMatchPackets(de_ctx = 0x4c8240, p = <value not available>, 
num_packets = -16948332), line 465 in "util-unittest-helper.c"
  [9] SigTestBidirec03(), line 1352 in "detect-parse.c"
  [10] UtRunTests(regex_arg = <value not available>), line 182 in 
"util-unittest.c"
  [11] main(argc = <value not available>, argv = <value not available>), 
line 596 in "suricata.c"

Thanks,
Yaomin




More information about the Oisf-devel mailing list