------=_Part_14835_28200274.1194748806900
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

hi all:
first thanks for your openssl.=20
i use the openssl0.9.8g =EF=BC=8B DTLS patch=E3=80=82i found a bug i=
n my code.
there is the information:
=20

I have an issue in OpenSSL, I call the free function to free the BIO resour=
ce:

if (para.dtls.SslBioPtr !=3D NULL){ =C3=A7I do the test=
, the free point is the correct address which get from BIO_new_dgram

ah_err("ready free BIO %x",para.dtls.SslBioPtr)=
;

BIO_free(para.dtls.SslBioPtr); <=3Dcore after this fun=
ction

ah_err("free BIO ok"); =C3=A7can not print thi=
s information

para.dtls.SslBioPtr =3D NULL;

}

I often found core after BIO_free function. But I add the debug inf=
ormation to BIO_free function, each time the function is return correct. Bu=
t the next information is not print out (free BIO ok), segment fault will h=
appen.

=20

I check the core file, every time core is in libc function:

Program terminated with signal 5, Trace/breakpoint trap.

#0 0x0f9a5088 in main_arena () from /opt/aero/crosstool/gcc-4.0.3-glibc-2.=
3.5/powerpc-603-linux-gnu/powerpc-603-linux-gnu/lib/libc.so.6

(gdb) bt

#0 0x0f9a5088 in main_arena () from /opt/aero/crosstool/gcc-4.0.3-glibc-2.=
3.5/powerpc-603-linux-gnu/powerpc-603-linux-gnu/lib/libc.so.6

#1 0x0fa602a4 in file_ctrl () from /opt/aero/crosstool/gcc-4.0.3-glibc-2.3=
..5/powerpc-603-linux-gnu/powerpc-603-linux-gnu/lib/libcrypto.so.0.9.8

#2 0x10015054 in dtls_clean () at dtls.c:90

#3 0x1001560c in dtls_thread () at dtls.c:217

#4 0x0fe04f48 in pthread_start_thread () from /opt/aero/crosstool/gcc-4.0.=
3-glibc-2.3.5/powerpc-603-linux-gnu/powerpc-603-linux-gnu/lib/libpthread.so=
..0

#5 0x0f9316f8 in clone () from /opt/aero/crosstool/gcc-4.0.3-glibc-2.3.5/p=
owerpc-603-linux-gnu/powerpc-603-linux-gnu/lib/libc.so.6

Backtrace stopped: previous frame inner to this frame (corrupt stack?)

=20

I google the main_arena function, there have many segment fault in this fun=
ction. But I don=E2=80=99t found the file_ctrl function with main_arena,=20

Is it our libc problem? Can you help me?

=20
thanks
lei
=20

------=_Part_14835_28200274.1194748806900
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

hi all:

       first thanks for your openssl. DIV>
       i use the openssl0.9.8g =EF=BC=8B=
DTLS patch=E3=80=82i found a bug in my code.

       there is the information:

      =20

ize=3D"1"> mso-bidi-font-size: 10.0pt">I have an issue in OpenSSL, I call the free fu=
nction to free the BIO resource:>>


ize=3D"1"> mso-bidi-font-size: 10.0pt">  &=
nbsp;           &nbs=
p;   
color=3D"blue"> t-weight: normal">if (para.dtls.SslBioPtr !=3D NULL){ cerun: yes"> 
idi-font-weight: normal">=
; FONT-FAMILY: Wingdings; mso-bidi-font-size: 10.0pt; mso-ascii-font-family=
: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; mso-bid=
i-font-weight: normal; mso-char-type: symbol; mso-symbol-font-family: Wingd=
ings"> gs">=C3=A7
"> =3D"FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: Arial; mso-=
bidi-font-size: 10.0pt; mso-bidi-font-weight: normal">I do the test, the fr=
ee point is the correct address which get from BIO_new_dgram>> AN>


ont-weight: normal"> ng=3D"EN-US" style=3D"FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: blue; FONT-=
FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: normal"> PAN style=3D"mso-tab-count: 3">       &n=
bsp;           &nbsp=
;       
ah_err("ready free BIO %=
x",para.dtls.SslBioPtr);>>


ont-weight: normal"> ng=3D"EN-US" style=3D"FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: blue; FONT-=
FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: normal"> PAN style=3D"mso-spacerun: yes">        =
     &nbsp=
;     
di-font-weight: normal"> lang=3D"EN-US" style=3D"FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: red; FON=
T-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: normal">=
BIO_free(para.dtls.SslBioPtr);  AN><=3Dcore after this function>>


ont-weight: normal"> ng=3D"EN-US" style=3D"FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: blue; FONT-=
FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: normal"> PAN style=3D"mso-tab-count: 3">       &n=
bsp;           &nbsp=
;       
ah_err("free BIO ok"); PAN style=3D"mso-spacerun: yes"> 
"mso-bidi-font-weight: normal"> =3D"1"> OR: blue; FONT-FAMILY: Wingdings; mso-bidi-font-size: 10.0pt; mso-ascii-fon=
t-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;=
mso-bidi-font-weight: normal; mso-char-type: symbol; mso-symbol-font-famil=
y: Wingdings"> Wingdings">=C3=A7
: normal"> S" style=3D"FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: Ar=
ial; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: normal">can not prin=
t this information>>


ont-weight: normal"> ng=3D"EN-US" style=3D"FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: blue; FONT-=
FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: normal"> PAN style=3D"mso-tab-count: 3">       &n=
bsp;           &nbsp=
;       
para.dtls.SslBioPtr =3D =
NULL;>>


ize=3D"1"> mso-bidi-font-size: 10.0pt">  =
    
<=
FONT color=3D"blue"> -font-weight: normal"> }>=
>


ize=3D"1"> mso-bidi-font-size: 10.0pt">  &=
nbsp;    
I often found core after BIO_free func=
tion. But I add the debug information to BIO_free function, each time the f=
unction is return correct. But the next information is not print out (free =
BIO ok), segment fault will happen.


ize=3D"1"> mso-bidi-font-size: 10.0pt">  &=
nbsp;     
>>


ize=3D"1"> mso-bidi-font-size: 10.0pt">  &=
nbsp;     
I check the core file, every tim=
e core is in libc function:>>


ize=3D"1"> mso-bidi-font-size: 10.0pt">  &=
nbsp;     
di-font-weight: normal"> N lang=3D"EN-US" style=3D"FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: blue; F=
ONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: normal=
">Program terminated with signal 5, Trace/breakpoint trap.>>
>


style=3D"mso-bidi-font-weight: normal"> size=3D"1"> COLOR: blue; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font=
-weight: normal">#0  0x hmetcnv w:st=3D"on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSpace=
=3D"False" SourceValue=3D"0" UnitName=3D"F">0f w:st=3D"on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSpace=3D"Fals=
e" SourceValue=3D"9" UnitName=3D"a">9a
on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSpace=3D"True" Source=
Value=3D"5088" UnitName=3D"in">5088 in
main_arena () from /o=
pt/aero/crosstool/gcc- ate=3D"False" Day=3D"30" Month=3D"12" Year=3D"1899">4.0.3-gli=
bc-2.3.5/powerpc-603-linux-gnu/powerpc-603-linux-gnu/lib/libc.so.6> p>


style=3D"mso-bidi-font-weight: normal"> size=3D"1"> COLOR: blue; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font=
-weight: normal">(gdb) bt>>


style=3D"mso-bidi-font-weight: normal"> size=3D"1"> COLOR: blue; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font=
-weight: normal">#0  0x hmetcnv w:st=3D"on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSpace=
=3D"False" SourceValue=3D"0" UnitName=3D"F">0f w:st=3D"on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSpace=3D"Fals=
e" SourceValue=3D"9" UnitName=3D"a">9a
on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSpace=3D"True" Source=
Value=3D"5088" UnitName=3D"in">5088 in
tyle=3D"mso-bidi-font-weight: normal"> ze=3D"1"> OLOR: red; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font-we=
ight: normal"> main_arena
: normal"> S" style=3D"FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: Ar=
ial; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: normal"> () from /op=
t/aero/crosstool/gcc- te=3D"False" Day=3D"30" Month=3D"12" Year=3D"1899">4.0.3-glib=
c-2.3.5/powerpc-603-linux-gnu/powerpc-603-linux-gnu/lib/libc.so.6>=
>


style=3D"mso-bidi-font-weight: normal"> size=3D"1"> COLOR: blue; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font=
-weight: normal">#1  0x0fa 1:chmetcnv w:st=3D"on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSp=
ace=3D"False" SourceValue=3D"602" UnitName=3D"a">602a metcnv w:st=3D"on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSpace=
=3D"True" SourceValue=3D"4" UnitName=3D"in">4 in file_ctrl (=
) from /opt/aero/crosstool/gcc- IsLunarDate=3D"False" Day=3D"30" Month=3D"12" Year=3D"1899">4.0.3 date>-glibc-2.3.5/powerpc-603-linux-gnu/powerpc-603-linux-gnu/lib/libcrypto=
..so.0.9.8>>


style=3D"mso-bidi-font-weight: normal"> size=3D"1"> COLOR: blue; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font=
-weight: normal">#2  0x hmetcnv w:st=3D"on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSpace=
=3D"True" SourceValue=3D"10015054" UnitName=3D"in">10015054 in v> dtls_clean () at dtls.c:90>>


style=3D"mso-bidi-font-weight: normal"> size=3D"1"> COLOR: blue; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font=
-weight: normal">#3  0x hmetcnv w:st=3D"on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSpace=
=3D"False" SourceValue=3D"1001560" UnitName=3D"C">1001560c i=
n dtls_thread () at dtls.c:217>>


style=3D"mso-bidi-font-weight: normal"> size=3D"1"> COLOR: blue; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font=
-weight: normal">#4  0x0fe 1:chmetcnv w:st=3D"on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSp=
ace=3D"False" SourceValue=3D"4" UnitName=3D"F">04f cnv w:st=3D"on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSpace=3D"=
True" SourceValue=3D"48" UnitName=3D"in">48 in pthread_start=
_thread () from /opt/aero/crosstool/gcc- =3D"False" IsLunarDate=3D"False" Day=3D"30" Month=3D"12" Year=3D"1899">4.0.=
3
-glibc-2.3.5/powerpc-603-linux-gnu/powerpc-603-linux-gnu/lib=
/libpthread.so.0>>


style=3D"mso-bidi-font-weight: normal"> size=3D"1"> COLOR: blue; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font=
-weight: normal">#5  0x hmetcnv w:st=3D"on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSpace=
=3D"False" SourceValue=3D"0" UnitName=3D"F">0f w:st=3D"on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSpace=3D"Fals=
e" SourceValue=3D"9316" UnitName=3D"F">9316f
st=3D"on" TCSC=3D"0" NumberType=3D"1" Negative=3D"False" HasSpace=3D"True" =
SourceValue=3D"8" UnitName=3D"in">8 in
clone () from /opt/ae=
ro/crosstool/gcc- =3D"False" Day=3D"30" Month=3D"12" Year=3D"1899">4.0.3-glibc-=
2.3.5/powerpc-603-linux-gnu/powerpc-603-linux-gnu/lib/libc.so.6>><=
/SPAN>


style=3D"mso-bidi-font-weight: normal"> size=3D"1"> COLOR: blue; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font=
-weight: normal">Backtrace stopped: previous frame inner to this frame (cor=
rupt stack?)>>


style=3D"mso-bidi-font-weight: normal"> size=3D"1"> COLOR: blue; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font=
-weight: normal">>


NT face=3D"Arial" color=3D"black" size=3D"1"> FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0p=
t">I google the main_arena function, there have many segment fault in this =
function. But I don=E2=80=99t found the
ont-weight: normal"> ng=3D"EN-US" style=3D"FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: blue; FONT-=
FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: normal"> f=
ile_ctrl
<=
SPAN lang=3D"EN-US" style=3D"FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Ari=
al; mso-bidi-font-size: 10.0pt"> function with main_arena, >> N>


NT face=3D"Arial" color=3D"black" size=3D"1"> FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0p=
t">Is it our libc problem? Can you help me?>>

IV>
 

thanks

lei

 

 




ne" href=3D"http://event.mail.163.com/chanel/click.htm?from=3DNO_23&domain=
=3D163" target=3D"_blank"> lue">=E7=BD=91 =E6=98=93 =E8=82=A1 =E5=90=A7=EF=BC=8C =E6=AF=8F =E5=A4=A9 =
=E6=9C=89 500 =E4=B8=87 =E8=82=A1 =E6=B0=91 =E5=9C=A8 =E6=AD=A4 =E8=AE=A8 =
=E8=AE=BA >>

------=_Part_14835_28200274.1194748806900--
__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager majordomo@openssl.org