On Tue, Jun 26, 2012 at 5:35 PM, Glenn Fowler <[email protected]> wrote:
> On Mon, 25 Jun 2012 12:34:57 +0200 Roland Mainz wrote:
>> --f46d0446312c9291a104c349889e
>> Content-Type: text/plain; charset=ISO-8859-1
>> Content-Transfer-Encoding: quoted-printable
>>
>> Attached (as "xmlfragmentparse.sh") is a small demo script which
>> triggers a couple of valgrind hits with ast-ksh.2012-06-20 on SuSE
>> 12.1 Linux/AMD64.
>
>> Example:
>> -- snip --
>> $ LC_ALL=3Den_US.UTF-8 valgrind --read-var-info=3Dyes --num-callers=3D50
>> ~/bin/ksh -o xtrace xmlfragmentparse.sh
>> =3D=3D27652=3D=3D Memcheck, a memory error detector
>> =3D=3D27652=3D=3D Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward =
>> et al.
>> =3D=3D27652=3D=3D Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyri=
>> ght info
>> =3D=3D27652=3D=3D Command: /home/test001/bin/ksh -o xtrace xmlfragmentparse=
>> .sh
>> [snip]
>> + ulimit -M 524288
>> + ulimit -v 524288
>> + ulimit -d 524288
>> + working=3Dfalse
>> + typeset working
>> + xmltext=3D$'<h1 style=3D\'nice\' h=3D"bar"><oook:banana color=3D"<yellow
>> />"><div style=3D"some green"><illegal tag /><br /> a text </div>More
>> [TEXT].<!-- a comment (<disabled>) --></h1>'
>> + typeset -r xmltext
>> + print -u2 -f '%d characters to process...\n' 164
>> 164 characters to process...
>> =3D=3D27652=3D=3D Conditional jump or move depends on uninitialised value(s=
>> )
>> =3D=3D27652=3D=3D    at 0x535986: parse (regnexec.c:1638)
>> =3D=3D27652=3D=3D    by 0x5324E9: parse (regnexec.c:999)
>> =3D=3D27652=3D=3D    by 0x52FEF0: parserep (regnexec.c:413)
>> =3D=3D27652=3D=3D    by 0x535DC9: parse (regnexec.c:1672)
>> =3D=3D27652=3D=3D    by 0x5324E9: parse (regnexec.c:999)
>> =3D=3D27652=3D=3D    by 0x5337C7: parse (regnexec.c:1192)
>> =3D=3D27652=3D=3D    by 0x530231: parserep (regnexec.c:446)
>> =3D=3D27652=3D=3D    by 0x535DC9: parse (regnexec.c:1672)
>> =3D=3D27652=3D=3D    by 0x5315BA: parse (regnexec.c:833)
>> =3D=3D27652=3D=3D    by 0x53169D: parse (regnexec.c:838)
>> =3D=3D27652=3D=3D    by 0x5337C7: parse (regnexec.c:1192)
>> =3D=3D27652=3D=3D    by 0x537609: _ast_regnexec_20120528 (regnexec.c:1969)
>> =3D=3D27652=3D=3D    by 0x52ED12: _ast_regexec_20120528 (regexec.c:53)
>> =3D=3D27652=3D=3D    by 0x4E3146: _ast_strgrpmatch_20120528 (strmatch.c:143=
>> )
>> =3D=3D27652=3D=3D    by 0x4E3343: _ast_strgrpmatch (strmatch.c:206)
>> =3D=3D27652=3D=3D    by 0x454B74: varsub (macro.c:1813)
>> =3D=3D27652=3D=3D    by 0x45079F: copyto (macro.c:633)
>> =3D=3D27652=3D=3D    by 0x44EBD1: sh_mactrim (macro.c:183)
>> =3D=3D27652=3D=3D    by 0x458AB5: nv_setlist (name.c:339)
>> =3D=3D27652=3D=3D    by 0x47FF92: sh_exec (xec.c:1193)
>> =3D=3D27652=3D=3D    by 0x418E2B: exfile (main.c:581)
>> =3D=3D27652=3D=3D    by 0x417FFE: sh_main (main.c:353)
>> =3D=3D27652=3D=3D    by 0x417128: main (pmain.c:45)
>> =3D=3D27652=3D=3D
>> =3D=3D27652=3D=3D Conditional jump or move depends on uninitialised value(s=
>> )
>> =3D=3D27652=3D=3D    at 0x535986: parse (regnexec.c:1638)
>> =3D=3D27652=3D=3D    by 0x5324E9: parse (regnexec.c:999)
>> =3D=3D27652=3D=3D    by 0x52FEF0: parserep (regnexec.c:413)
>> =3D=3D27652=3D=3D    by 0x536116: parse (regnexec.c:1698)
>> =3D=3D27652=3D=3D    by 0x5339CE: parse (regnexec.c:1209)
>> =3D=3D27652=3D=3D    by 0x5339CE: parse (regnexec.c:1209)
>> =3D=3D27652=3D=3D    by 0x531870: parse (regnexec.c:856)
>> =3D=3D27652=3D=3D    by 0x531870: parse (regnexec.c:856)
>> =3D=3D27652=3D=3D    by 0x531870: parse (regnexec.c:856)
>> =3D=3D27652=3D=3D    by 0x5339CE: parse (regnexec.c:1209)
>> =3D=3D27652=3D=3D    by 0x531F92: parse (regnexec.c:935)
>> =3D=3D27652=3D=3D    by 0x5324E9: parse (regnexec.c:999)
>> =3D=3D27652=3D=3D    by 0x5337C7: parse (regnexec.c:1192)
>> =3D=3D27652=3D=3D    by 0x5315BA: parse (regnexec.c:833)
>> =3D=3D27652=3D=3D    by 0x53169D: parse (regnexec.c:838)
>> =3D=3D27652=3D=3D    by 0x53169D: parse (regnexec.c:838)
>> =3D=3D27652=3D=3D    by 0x5337C7: parse (regnexec.c:1192)
>> =3D=3D27652=3D=3D    by 0x5324E9: parse (regnexec.c:999)
>> =3D=3D27652=3D=3D    by 0x5337C7: parse (regnexec.c:1192)
>> =3D=3D27652=3D=3D    by 0x530231: parserep (regnexec.c:446)
>> =3D=3D27652=3D=3D    by 0x535DC9: parse (regnexec.c:1672)
>> =3D=3D27652=3D=3D    by 0x5324E9: parse (regnexec.c:999)
>> =3D=3D27652=3D=3D    by 0x5337C7: parse (regnexec.c:1192)
>> =3D=3D27652=3D=3D    by 0x530231: parserep (regnexec.c:446)
>> =3D=3D27652=3D=3D    by 0x535DC9: parse (regnexec.c:1672)
>> =3D=3D27652=3D=3D    by 0x5315BA: parse (regnexec.c:833)
>> =3D=3D27652=3D=3D    by 0x53169D: parse (regnexec.c:838)
>> =3D=3D27652=3D=3D    by 0x5337C7: parse (regnexec.c:1192)
>> =3D=3D27652=3D=3D    by 0x537609: _ast_regnexec_20120528 (regnexec.c:1969)
>> =3D=3D27652=3D=3D    by 0x52ED12: _ast_regexec_20120528 (regexec.c:53)
>> =3D=3D27652=3D=3D    by 0x4E3146: _ast_strgrpmatch_20120528 (strmatch.c:143=
>> )
>> =3D=3D27652=3D=3D    by 0x4E3343: _ast_strgrpmatch (strmatch.c:206)
>> =3D=3D27652=3D=3D    by 0x454B74: varsub (macro.c:1813)
>> =3D=3D27652=3D=3D    by 0x45079F: copyto (macro.c:633)
>> =3D=3D27652=3D=3D    by 0x44EBD1: sh_mactrim (macro.c:183)
>> =3D=3D27652=3D=3D    by 0x458AB5: nv_setlist (name.c:339)
>> =3D=3D27652=3D=3D    by 0x47FF92: sh_exec (xec.c:1193)
>> =3D=3D27652=3D=3D    by 0x418E2B: exfile (main.c:581)
>> =3D=3D27652=3D=3D    by 0x417FFE: sh_main (main.c:353)
>> =3D=3D27652=3D=3D    by 0x417128: main (pmain.c:45)
>> =3D=3D27652=3D=3D
>> + typeset dummy
>> + dummy=3D'DDD<D><D>DDDDD'
[snip]
>
> I don't get any hits except for explainable leaks
> did you use special compile options?

Erm... I use the map-libc option... beyond that it's a plain debug build.
Note that I only get the valgrind hits in the en_US.UTF-8 locale... in
the "C" locale the hits disappear...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [email protected]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)

_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to