On Mon, Feb 18, 2013 at 5:51 PM, Glenn Fowler <[email protected]> wrote:
>
> 2013-02-14 alpha posted to www.research.att.com/download/alpha/
>         INIT.2013-02-14.tgz
>         ast-ksh.2013-02-14.tgz
> this is a work in progress
> there are known problems on some architectures

I found two bugs (one (IMO bogus) warning) and a valgrind issue
related to the new "bool" datatype.
Running the following test on SuSE 12.2/AMD64/64bit build gives this output:
-- snip --
$ valgrind --track-origins=yes --read-var-info=yes ~/bin/ksh -c
'compound c=(bool -a bar) ; c.bar[400][300]=true ; print
$((c.bar[400][300]))'
==2555== Memcheck, a memory error detector
==2555== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==2555== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==2555== Command: /home/test001/bin/ksh -c compound\ c=(bool\ -a\
bar)\ ;\ c.bar[400][300]=true\ ;\ print\ $((c.bar[400][300]))
==2555==
==2555== Syscall param mount(type) points to unaddressable byte(s)
==2555==    at 0x5613A4A: mount (in /lib64/libc-2.15.so)
==2555==    by 0x4AAD95: fs3d_mount (fs3d.c:115)
==2555==    by 0x4AABC3: fs3d (fs3d.c:57)
==2555==    by 0x42E557: sh_init (init.c:1470)
==2555==    by 0x40D5A9: sh_main (main.c:142)
==2555==    by 0x40D450: main (pmain.c:45)
==2555==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==2555==
/home/test001/bin/ksh: _Bool: line 1: c.c.bar[0]: no parent
==2555== Conditional jump or move depends on uninitialised value(s)
==2555==    at 0x41BD8F: arith (arith.c:485)
==2555==    by 0x46CF83: arith_exec (streval.c:262)
==2555==    by 0x44D826: comsubst (macro.c:2057)
==2555==    by 0x449F65: varsub (macro.c:1165)
==2555==    by 0x4485A6: copyto (macro.c:631)
==2555==    by 0x446D4B: sh_macexpand (macro.c:242)
==2555==    by 0x4A5700: arg_expand (args.c:867)
==2555==    by 0x4A5153: sh_argbuild (args.c:724)
==2555==    by 0x47748A: sh_exec (xec.c:975)
==2555==    by 0x47BC85: sh_exec (xec.c:2204)
==2555==    by 0x40F0D5: exfile (main.c:588)
==2555==    by 0x40E29A: sh_main (main.c:360)
==2555==  Uninitialised value was created by a stack allocation
==2555==    at 0x46CA63: arith_exec (streval.c:169)
==2555==
1
==2555==
==2555== HEAP SUMMARY:
==2555==     in use at exit: 0 bytes in 0 blocks
==2555==   total heap usage: 424 allocs, 424 frees, 26,696 bytes allocated
==2555==
==2555== All heap blocks were freed -- no leaks are possible
==2555==
==2555== For counts of detected and suppressed errors, rerun with: -v
==2555== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 2 from 2)
-- snip --

First issue is of couse the '/home/test001/bin/ksh: _Bool: line 1:
c.c.bar[0]: no parent".

Second issue is the valgrind hit in arith.c line485.

-----

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

Reply via email to