|
我运行一个程序,运行一段很长的时间后,会出现如下的错误
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 95468464 (LWP 1457]
0x08057ec0 in mSearch (
buf=0x8185180 "r\227\uffff\201\227\uffff\204\t1\uffffB\225\226\205s\233\ufffft\003\uffff\uffffi\f\uffff\203\a\uffff\uffff dg>\227\uffff?y\uffffs\ufffft\u01fbD'\232\002bO\uffff\uffff\uffff\002\206l\220}\uffff\036\t\uffff\uffff\uffff\036vc,\uffff\f6P\230?\204\uffffv\uffff\uffff] \uffff\024\uffffF*\234\uffffv\uffff\uffffd\004\uffff\"\uffffZF0\223\2310\201!o\uffff{\uffff\031\017x\uffffG>\uffff\f\221\002\n\uffff\uffff\020z4~ \uffff\uffff}\uffff\uffff\uffff\uffff\uffff\u03b7=\200\\\b/\uffff%/\uffff\uffff\213\uffff\037\uffff\017=Dz+=\fT\uffff\205\231g<\uffffm\uffff\uffff\uffffC$\uffff\220_\uffff\v\uffff\uffff1\vK\uffff B\uffff\uffff'>\uffff\215/\uffff\uffff\uffff~\uffffkQ\204\uffff\235\uffff\uffff\uffff\a\177\026"..., blen=273,
ptrn=0x5a0a5d3 "html", plen=3, skip=0x9ffeec0, shift=0xa00493
at start.c:373
warning: Source file is more recent than executable.
373 skip_stride = skip[(unsigned char) buf[b_idx]];
我用bt,出现的结果如下:
(gdb) bt
#0 0x08057ec0 in mSearch (
buf=0x8185180 "r\227\uffff\201\227\uffff\204\t1\uffffB\225\226\205s\233\ufffft\003\uffff\uffffi\f\uffff\203\a\uffff\uffff dg>\227\uffff?y\uffffs\ufffft\u01fbD'\232\002bO\uffff\uffff\uffff\002\206l\220}\uffff\036\t\uffff\uffff\uffff\036vc,\uffff\f6P\230?\204\uffffv\uffff\uffff] \uffff\024\uffffF*\234\uffffv\uffff\uffffd\004\uffff\"\uffffZF0\223\2310\201!o\uffff{\uffff\031\017x\uffffG>\uffff\f\221\002\n\uffff\uffff\020z4~ \uffff\uffff}\uffff\uffff\uffff\uffff\uffff\u03b7=\200\\\b/\uffff%/\uffff\uffff\213\uffff\037\uffff\017=Dz+=\fT\uffff\205\231g<\uffffm\uffff\uffff\uffffC$\uffff\220_\uffff\v\uffff\uffff1\vK\uffff B\uffff\uffff'>\uffff\215/\uffff\uffff\uffff~\uffffkQ\204\uffff\235\uffff\uffff\uffff\a\177\026"..., blen=273,
ptrn=0x5a0a5d3 "html", plen=3, skip=0x9ffeec0, shift=0xa00493
at start.c:373
#1 0x080588c0 in judge_content_tcp (variable=0x5a0a9d3 "tcp_content",
symbol=94 '^', value=0x5a0a5d3 "html") at start.c:570
#2 0x08058e90 in parase_content (content=0x5a0ae15 "af", rule_type=3)
at start.c:758
#3 0x08058fc5 in parse_a_statement (statement=0x5a0b23c "", rule_type=3)
at start.c:788
#4 0x08059076 in parse_rule (rule=0x85b6590 "", rule_type=3) at start.c:813
#5 0x0805911d in detect () at start.c:829
#6 0x08059925 in get_packet (argument=0x0, packet_header=0x5b0b2c8,
packet_content=0x9d071d2 "") at start.c:1022
#7 0x00507970 in pcap_platform_finddevs () from /usr/lib/libpcap.so.0.8.3
#8 0x005091a0 in pcap_loop () from /usr/lib/libpcap.so.0.8.3
#9 0x080598ae in another_thread (args=0x0) at start.c:1005
#10 0x001dfb80 in start_thread () from /lib/libpthread.so.0
,大家说说问题有可能出在什么地方.
这个问题我搞了很久都没有解决,麻烦知道的人说说,先谢谢了,
程序太长了,就没有贴了 |
|