程序运行出错,麻烦看看
我运行一个程序,运行一段很长的时间后,会出现如下的错误2 ^$ J+ F% X8 I) P% j
Program received signal SIGSEGV, Segmentation fault.
$ O: x6 {. U2 V" p4 T; i, R3 r[Switching to Thread 95468464 (LWP 14578)]( ~1 d% n j3 |( g8 q
0x08057ec0 in mSearch (
% T# ]/ |8 @% k- w7 ?9 jbuf=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,6 a+ J6 x/ i0 {) T
ptrn=0x5a0a5d3 "html", plen=3, skip=0x9ffeec0, shift=0xa004938)
) k3 z9 |9 U, ?# n/ C6 q3 I9 Pat start.c:3738 L% W0 u* F( t! b
warning: Source file is more recent than executable.0 X. n/ j+ O; |. \# f7 C( P
) @. U/ x/ R+ Z R. i0 L
373 skip_stride = skip[(unsigned char) buf[b_idx]];1 E) E+ w; u6 K/ H
我用bt,出现的结果如下:+ a0 g4 z" G' E" [' H
(gdb) bt
0 F+ W& l' J B#0 0x08057ec0 in mSearch (& V& a& y- Q( L) {
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,
1 e4 W* o8 A' S. P. a- zptrn=0x5a0a5d3 "html", plen=3, skip=0x9ffeec0, shift=0xa004938)$ @- s7 P* S& ]% |: H; G. [7 M. q' ^
at start.c:373
* |) h; _1 [3 \$ Q! l* i#1 0x080588c0 in judge_content_tcp (variable=0x5a0a9d3 "tcp_content",
8 j7 V/ ?. x" b& ^$ ]6 gsymbol=94 '^', value=0x5a0a5d3 "html") at start.c:570" ~1 z9 w' F2 P2 A
#2 0x08058e90 in parase_content (content=0x5a0ae15 "af", rule_type=3)
. V) y; O& V/ G5 |at start.c:7586 w3 n- ]& k. q% S6 _7 ^2 j
#3 0x08058fc5 in parse_a_statement (statement=0x5a0b23c "", rule_type=3)) {: Z- o4 \' N$ Y' V# Q1 Y
at start.c:788
7 K* T2 ^6 m: |. B, v( s#4 0x08059076 in parse_rule (rule=0x85b6590 "", rule_type=3) at start.c:813' d- y# Q( A Y2 p- _; M
#5 0x0805911d in detect () at start.c:829. Z* l4 n1 S2 `0 N. n7 x/ S
#6 0x08059925 in get_packet (argument=0x0, packet_header=0x5b0b2c8,+ }3 y! F* ~/ @7 o
packet_content=0x9d071d2 "") at start.c:1022
Q5 _0 b0 o( t1 K* i#7 0x00507970 in pcap_platform_finddevs () from /usr/lib/libpcap.so.0.8.3
" N6 e! L; x- H d/ N' `/ `#8 0x005091a0 in pcap_loop () from /usr/lib/libpcap.so.0.8.3
, K6 D8 L4 W7 W( T) G#9 0x080598ae in another_thread (args=0x0) at start.c:1005! s, C8 G& c8 g# \3 ?
#10 0x001dfb80 in start_thread () from /lib/libpthread.so.0# |9 d2 {! A* x Z* [+ Y
,大家说说问题有可能出在什么地方.1 `* t( }) [' a) F1 @4 ?+ c
这个问题我搞了很久都没有解决,麻烦知道的人说说,先谢谢了,+ r7 B1 Q$ Z% C. d5 {
程序太长了,就没有贴了