Hi! ----
valgrind reports a couple of hits in ast-ksh.2013-09-26's tr(1) on SuSE 12.3/AMD64/64bit for a simple usage (note that this requires the valgrind patch from http://lists.research.att.com/pipermail/ast-developers/2013q2/002574.html so valgrind can recognise the libast allocator): -- snip -- $ valgrind --read-var-info=yes --num-callers=200 ~/bin/ksh -c 'export LC_ALL=en_US.UTF-8 ; ulimit -v $((768*1024)) ; builtin tr ; tr O o <<<"hello" ; true' ==2881== Memcheck, a memory error detector ==2881== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. ==2881== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==2881== Command: /home/test001/bin/ksh -c export\ LC_ALL=en_US.UTF-8\ ;\ ulimit\ -v\ $((768*1024))\ ;\ builtin\ tr\ ;\ tr\ O\ o\ \<\<\<"hello"\ ;\ true [snip] ==2881== Conditional jump or move depends on uninitialised value(s) ==2881== at 0x56ED5E: nextchar (tr.c:223) ==2881== by 0x56F5D2: tropen (tr.c:415) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Conditional jump or move depends on uninitialised value(s) ==2881== at 0x56ED68: nextchar (tr.c:223) ==2881== by 0x56F5D2: tropen (tr.c:415) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Conditional jump or move depends on uninitialised value(s) ==2881== at 0x56ED6E: nextchar (tr.c:223) ==2881== by 0x56F5D2: tropen (tr.c:415) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Conditional jump or move depends on uninitialised value(s) ==2881== at 0x56ED78: nextchar (tr.c:223) ==2881== by 0x56F5D2: tropen (tr.c:415) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Conditional jump or move depends on uninitialised value(s) ==2881== at 0x56F5D9: tropen (tr.c:415) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Use of uninitialised value of size 8 ==2881== at 0x56F520: tropen (tr.c:417) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Conditional jump or move depends on uninitialised value(s) ==2881== at 0x56F5C2: tropen (tr.c:431) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Conditional jump or move depends on uninitialised value(s) ==2881== at 0x56ED82: nextchar (tr.c:223) ==2881== by 0x56F5D2: tropen (tr.c:415) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Conditional jump or move depends on uninitialised value(s) ==2881== at 0x56ED87: nextchar (tr.c:223) ==2881== by 0x56F5D2: tropen (tr.c:415) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Conditional jump or move depends on uninitialised value(s) ==2881== at 0x56ED5E: nextchar (tr.c:223) ==2881== by 0x56F893: tropen (tr.c:492) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Conditional jump or move depends on uninitialised value(s) ==2881== at 0x56ED68: nextchar (tr.c:223) ==2881== by 0x56F893: tropen (tr.c:492) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Conditional jump or move depends on uninitialised value(s) ==2881== at 0x56ED92: nextchar (tr.c:223) ==2881== by 0x56F893: tropen (tr.c:492) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Conditional jump or move depends on uninitialised value(s) ==2881== at 0x56ED9C: nextchar (tr.c:223) ==2881== by 0x56F893: tropen (tr.c:492) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Conditional jump or move depends on uninitialised value(s) ==2881== at 0x56F89A: tropen (tr.c:492) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Use of uninitialised value of size 8 ==2881== at 0x56F8A9: tropen (tr.c:497) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== ==2881== Conditional jump or move depends on uninitialised value(s) ==2881== at 0x56F8B1: tropen (tr.c:498) ==2881== by 0x5703EF: b_tr (tr.c:807) ==2881== by 0x46998B: sh_exec (xec.c:1379) ==2881== by 0x46CA12: sh_exec (xec.c:2252) ==2881== by 0x40F7A2: exfile (main.c:610) ==2881== by 0x40E9ED: sh_main (main.c:382) ==2881== by 0x40DB70: main (pmain.c:45) ==2881== hello -- snip -- Note that this only seems to happen for UTF-8-based locales... it does not happen for "C" or "zh_CN.GB18030" ... ---- 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] http://lists.research.att.com/mailman/listinfo/ast-developers
